User Services/Sync/Debug Sync: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Update instructions for Fenix)
 
Line 26: Line 26:


==Android==
==Android==
* For advanced users:
** Install Android Debugging Tools: http://developer.android.com/sdk/index.html
** put adb in your path so you can call it from anywhere.
** Run this:


adb setprop log.tag.FxSync VERBOSE
These instructions are for advanced users only - unfortunately there are no simpler instructions which are approachable for general users.
adb setprop log.tag.FxAccounts VERBOSE
* Install Android Debugging Tools - the location of this changes over time, [https://developer.android.com/studio installing Android Studio seems the easiest cross-platform way] or [https://www.xda-developers.com/install-adb-windows-macos-linux xda-developers has instructions for each desktop platform]
adb setprop log.tag.FxAccountSyncAdapter VERBOSE
* Tether your device
 
** You also need to enable "developer mode" on your phone and authorize the device - [https://www.xda-developers.com/install-adb-windows-macos-linux xda-developers has some instructions for how to configure it].
** Tether your device and make sure your computer can see it by running:
** You will know you have successfully configured it when your computer can see your Android device by running, from a terminal or command prompt:
  adb devices
  adb devices
** Run this
(Note that you will either need to add the directory containing <code>adb</code> to your <code>PATH</code>, or specify the full path to it in the command above)
  adb logcat | grep -i 'account'
* To view sync-related logging, run:
 
  adb logcat | grep -i -E "(sync15|sync_manager|FirefoxAccount)"
==HTTP Logging==
This may also be helpful to observe http traffic details:
* https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging
* consider install add-ons such as httpFox

Latest revision as of 02:43, 11 May 2022

Often it's helpful to provide diagnostic log data in bugs to help a developer fix an issue. Here are some tips:

Desktop

  1. goto about:config
  2. In the filter field type 'sync.log'
  3. Context click on pref and set it as:
    • services.sync.log.appender.file.logOnSuccess to True
    • services.sync.log.logger.engine.bookmarks to Trace
  4. In Firefox, go here: about:sync-log
  5. You should see Success and Error logs. You can click to open, often you will want to upload this to your bug.

You can also open the console to view errors: Tools > Web Developer > Web Console

How to force reauthentication

When you reset password this will cause all other devices to reauthenticate. To force that, edit this file:

<profile location [1] >/signedInUser.json

and delete some characters from the sessionToken value:

"sessionToken":"abcdef"

[1] Profile locations

Windows XP / 2000 / Vista / 7 	%AppData%\Mozilla\Firefox\Profiles\xxxxxxxx.default\signedInUser.json
Linux 	~/.mozilla/firefox/xxxxxxxx.default/signedInUser.json
Mac OS X 	~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/signedInUser.json

Android

These instructions are for advanced users only - unfortunately there are no simpler instructions which are approachable for general users.

adb devices

(Note that you will either need to add the directory containing adb to your PATH, or specify the full path to it in the command above)

  • To view sync-related logging, run:
adb logcat | grep -i  -E "(sync15|sync_manager|FirefoxAccount)"