Code Monkey home page Code Monkey logo

aboutsync's Introduction

About Sync

This desktop-only addon shows information about your Sync account, including showing all server data for your account. It is designed primarily for Sync developers, or advanced users who would like insights into their Sync data.

It is a React app which needs full chrome permissions - ie, the .jsx files have ChromeUtils and are able to reach into the internal sync/fxa/etc implementation to display and edit. It mostly just reads, but it includes destructive functionality; arbitrary editing of sync related stuff, raw sql execution, etc.

It does this by abusing addons "experimental api" support - where the "api" here is "whatever it takes to give ChromeUtils to our jsx". See ext_bootstrap.js. And to register the about page - see "*Redirector.js".

Using the addon

Once installed, type about:sync into the URL bar.

Pull requests are welcome

Availability

Available for Firefox here: https://addons.mozilla.org/firefox/addon/about-sync/

Running from source

This is only possible in Nightly. To proceed, you must use about:config to set extensions.experiments.enabled=true and xpinstall.signatures.required=false.

  • Clone the git repo locally.
  • Run npm install inside the repo.
  • Optionally, run npm run dev which should start a daemon which means any edits you make while Firefox is running should get picked up, and only need a "refresh" rather than a full browser restart to be seen.
  • Visit about:debugging -> "This Nightly" -> "Load Temporary Addon", then select any file in the root directory (eg, chrome.manifest).
  • Open about:sync

Other help:

  • To see verbose debug messages from bootstrap.js, set a boolean preference extensions.aboutsync.verbose=true - messages will be sent to the browser console. Most non-bootstrap code can just use console.log() etc.

Testing a XPI

The CI process creates "dep signed" XPI files which can be used to test - this is useful to test the artifact of a PR, or to pre-test a release XPI before final "production signing".

See the official docs but a tl;dr is:

  • CI will have a dep-signed job which will have the .xpi as an artifact.
  • This can be tested on Nightly only and only if the preference xpinstall.signatures.dev-root is true - this pref does not exist by default, so you need to create it as a bool pref.
  • As with running from source, you also need extensions.experiments.enabled=true

Release Process

Because this addon must be signed by the addons team, the release process is more difficult than for regular addons.

The general process followed by the addons team is documented here, but at the current time, the maintainers of about-sync don't have the required permissions. Therefore, the process is:

  • Bump the version in package.json

    the final version string will be something like X.Y.Zbuildid20220601.073719

  • If needed, bump the strict_min_version in manifest.json. Ensure there is a matching version you're targeting in the version list

    Must use an exact version, {version_number}.* are not allowed to be used

  • Find the exact github revision revision you want as the new build; usually current main. Ensure this revision is tested using the testing process described above

  • Follow the Mozilla Add-on Review Request Intake instructions to create an issue that will kick off the process for an update.

  • You will be notified of an initial build, with will include a "dep-signing" task - however, this doesn't create the .xpi you can submit to AMO. Two additional sign-offs from the addons team is necessary and you will be given another taskcluster link.

  • In this second taskcluster build, you should find a link to a "release signing" taskcluster job, look for the built, signed .xpi and download it locally.

  • This release signing task should also have created a github tag in the aboutsync repository. Check that it has!

  • Upload the xpi to addons.mozilla.org. If you don't have the permission for this, ask for help in the #addons-pipeline channel.

aboutsync's People

Contributors

darktrojan avatar dependabot[bot] avatar eoger avatar gabrielbusta avatar gijsk avatar gitoffthelawn avatar jcristau avatar linabutler avatar mhammond avatar natim avatar skhamis avatar thomcc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aboutsync's Issues

Show local data and SQL tab if Firefox is offline

We currently show an error like Failed to load collection: [Exception... "NS_ERROR_UNKNOWN_HOST" nsresult: "0x804b001e (NS_ERROR_UNKNOWN_HOST)" location: "JS frame :: resource://services-sync/resource.js :: Channel_onStopRequest :: line 422" data: no] underneath "Collections" if the Sync server is unreachable.

I wonder if we could at least show local records, and the SQL query UI for bookmarks. That would be handy for hacking on the train. 🏠🚆🏢

Add a Content Security Policy and load the chrome:// JS in an alternate way

We've worked around this for now in a pretty safe way; so resolving this is not urgent, but I want to have a bug on file to reference.

As described in https://bugzilla.mozilla.org/show_bug.cgi?id=1727803; about:sync triggers a Debug Assertion because it lacks a sufficiently tight CSP.

It also loads Javascript via a data: url; and it would be ideal if it could somehow load it via a chrome:// or resource:// URI.

Blocks https://bugzilla.mozilla.org/show_bug.cgi?id=1728122

about:sync is very hard to read, if you're using Firefox 96 or higher in dark mode

TL;DR: Please force about:sync to always use a white background.

The problem

In Firefox 96 and higher, when your OS is set to dark mode, Firefox uses a dark gray background on various UI pages, including about:sync. (Based on this source.)

Unfortunately, about:sync is very hard to read when it has a dark gray background.

For example:

  • Black text is very difficult to read.
  • White text on a light gray background (e.g. "Please describe how you intend using about:sync") is very difficult to read.
  • Blue text (e.g. tab lastUsed timestamps) are difficult to read.

Recommended contrast ratios

For most text, the WCAG recommends a minimum contrast ratio of at least 4.5:1 or better. Ideally, they recommend a contrast ratio of 7:1 or better. (Source.)

To check the contrast ratios of any webpage, right-click on it and cloose "Inspect". Now click "Accessibility" or press Shift+F12. Finally, next to "Check for Issues", change "None" to "Contrast".

A contrast fixer tool

Text with insufficient contrast can be difficult to read for everyone, but especially for people with low vision. If you do a Web search for contrast fixer tools, you'll find lots of web apps; Contrast Finder is a good one. It will modify any chosen pair of colors, in order to increase the contrast ratio.

Steps to reproduce

One way to reproduce the issue is to simply set your OS to dark mode.

The other way to reproduce the issue is to tell Firefox to pretend that your OS is set to dark mode. Here's how:

  • Visit about:config.
  • If layout.css.prefers-color-scheme.content-override is set, note down its value for future reference.
  • Set layout.css.prefers-color-scheme.content-override to 0.
  • Visit about:sync.
  • Click the Reload button. The issue should immediately become apparent.

Once you're finished looking at the problem, go back to about:config, and click the Reset button to restore layout.css.prefers-color-scheme.content-override to its default value (probably 3).

Recommended solution

The simplest solution is probably to modify about:sync to ignore dark mode, and to always use a white background everywhere. The current about:sync color palette provides mostly-acceptable contrast ratios over top of a white background. If you decide to allow dark backgrounds, you might need to revamp the palette.

Ns Error Factory Exists

I've got this error after Firefox Nightly Browser update:

JavaScript error: chrome://aboutsync/content/AboutSyncRedirector.js, line 43: NS_ERROR_FACTORY_EXISTS: Component returned failure code: 0xc1f30100 (NS_ERROR_FACTORY_EXISTS) [nsIComponentRegistrar.registerFactory]

and
JavaScript error: resource://gre/modules/WebNavigationContent.js, line 215: NS_NOINTERFACE: Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIWebProgress.DOMWindow]

Repeated many times.

Thanks!

lost addon menu entry on restart

Hi, I don't know if it's an extension bug or a nightly bug.
After install and restarting the browser the menu entry in the tools menu disappears.
To make it visible again I have to disable and enable again the extension.

Change name to About Sync

… instead of About Sync extension for Firefox.

2018-05-14 23 32 33 waterfox

  • the word extension is superfluous
  • it also works with Waterfox (pictured).

Thanks :-)

Add simple validation for history payloads

We just saw a "null" payload in the wild (cleartext, I think). Can we check for and report these in about:sync?

Interested to know the ID and date of the record so we can find out which device uploaded it and find the root cause.

Add a way to reset an engine

@mhammond mused on IRC:

one interesting side-effect of storing lastSync etc in places is that there's no obvious way to "reset" an engine without nuking the server data. This probably isn't a significant problem in practice, but I do recall having suggested to users to reset the lastSync pref in at least a couple of cases

It might be a good idea to add a "Reset" button that calls resetClient, which would reset the sync ID, last sync time, sync statuses, etc.

About Sync v0.0.52 has stopped working (Firefox Version 78.0.1)

About Sync v0.0.51 works
after update to 0.0.52, about:sync is no longer displayed under about:about
Calling about:sync directly fails, brings an error message
Firefox version 78.0.1 (Windows)
Downgrade to v0.0.51 and it works again.
I had the same thing with earlier versions of Firefox, but no longer know which 7x version.

Fix profile fetching post-bug 1574052

The profile section just shows TypeError: this.props.fxAccounts.getSignedInUserProfile is not a function now. We'll want to use getSignedInUser in 72+.

about:sync is reported as "Not compatible with multiprocess", by Add-on Compatibility Reporter

STR:

  1. In a fresh profile with Firefox Nightly, install the about:sync and Add-on Compatibility Reporter add-ons.
  2. Click the puzzle-piece in your Firefox toolbar (the compatibility-reporter icon)

ACTUAL RESULTS:
It says:

About Sync extension for Firefox
Version 0.0.5
Not compatible with multiprocess.

EXPECTED RESULTS:
About Sync should be made compatible with multiprocess (e10s).

(Note: I don't know what is responsible for it being flagged as incompatible; I'm just noticing that it is, and reporting it.)

Please expose an "export to html/json" format that would allow importing synced tabs as bookmarks

Observations:

  • Firefox Android exposes a "share tab" feature, but afaict there's no feasible option that would allow me to import them as bookmarks.
  • Firefox Android does not offer an easy way to bulk bookmark open tabs
  • Firefox Android does not offer a way to bulk open "Synced Tabs" from other devices.
  • Firefox for Desktop exposes "Synced Tabs" in a variety of ways, none of which can be used for bulk operations

so it seems that using AboutSync and manually munging data is ... the best? only? approach.

It would be fantastic if AboutSync could integrate the JS bits from this StackOverflow answer in a way that a user can simply export a firefox-bookmarks-compatible JSON of the Synced Tabs of a given device.

https://stackoverflow.com/a/68309779

Fetching logs fails on first sync

@rbillings and I saw this during our Sync fest today. When opening the add-on for the first time, we fail to fetch logs with unixErrno: 2 at DiectoryIterator.prototype.next. I wonder if that's because the logs directory doesn't exist yet?

About sync, can't get it working

About sync, can't get it working.

I hope I'm at the right place for this here.

I installed AbouSync because it could be interesting. It is greyed out, as well en other add-ons
What is the cause it is greyed out?
I want to put this add-on in the toolbar. Unfortunately, it also won't work.
about sync

Do I do something wrong?

Win 11 23H2
Firefox 121.0.1 (64)
AMD Ryzen 7 7735U with Radeon Graphics

about:debugging page indicates that the About Sync extension has an invalid version number

STR:

  1. Install the About Sync add-on from https://addons.mozilla.org/en-US/firefox/addon/about-sync/
  2. Visit about:debugging and scroll down to the entry for About Sync (under "Extensions")

ACTUAL RESULTS:
There's a warning box -- if you expand it, it shows the following:

Warning details

Reading manifest: Warning processing version: version must be a version string consisting of at most 4 integers of at most 9 digits without leading zeros, and separated with dots

Here's a screenshot:
image

EXPECTED RESULTS:
No such warning (i.e. we probably need a conforming version numbering scheme).

If you look at the Version field on https://addons.mozilla.org/en-US/firefox/addon/about-sync/ , you can see that indeed our version number does not conform to this "at most 4 integers of at most 9 digits without leading zeros, and separated with dots" scheme -- we have right now:

Version
    0.21.0buildid20220714.054802

Convert aboutsync to import ES modules directly.

The vast majority of browser modules have been converted to ES modules. I think all the ones that aboutsync uses were converted before FF 114, which would therefore be compatible with the current minimum version for aboutsync.

Having aboutsync migrated, would mean that we can go ahead with bug 1774888 and remove older functions.

Can't view tabs send to another device

I think I checked all the info shown by the subject addon and still can't see "sent tabs" there.
I mean not the general list of tabs synchronized between devices but only tabs which are sent by "Send Tab to Device" and still are not retrieved by the destination device.

Why I need that: Firefox duplicated some of my devices for some reason and I noticed it too late - after sending some tabs to already inactive device entries. Now I want to get that URLs back but have no way for that. That sent tabs should be still stored on the sync server, so it should be possible to read them from there.

About Sync version 0.21.0buildid20220714.054802, updated 16 Jul 2022
Firefox 104.0, Linux

Shutdown attempts to load config.js as an old style module

I noticed a use of Cu.import here:

aboutsync/ext_bootstrap.js

Lines 175 to 178 in b4fd012

const { Config } = Cu.import("chrome://aboutsync/content/config.js", {});
Config.finalize();
// And unload it, so changes will get picked up if we reload the addon.
Cu.unload("chrome://aboutsync/content/config.js");

In the startup function, that gets imported as an ES module:

const { Config } = ChromeUtils.importESModule("chrome://aboutsync/content/config.js");

So it looks wrong that it is being treated differently.

Additionally, since ES modules can't be unloaded, it may need to be handled slightly differently. I believe that one workaround has been to use something like ChromeUtils.importESModule("chrome://aboutsync/content/config.js?r=" + Math.rand());

Add an "export everything" option

Disclaimer: I'm an experienced user at most, but no FF developer.

I'd like an option to export everything stored in the FF sync account.

Use case: When FF crashes, especially on mobile, it tends to lose data (e.g. open tabs). So I'd like to back up the synced data periodically. At present, I open about:sync, click the tab "Records (table)" for every category and copy the contents to a text file manually.

As there already is an export option which, unfortunately, only exports bookmark information, this has a chance to be a trivial change.

about:sync is blank with About Sync 0.0.22 with Waterfox 56.2.0

Waterfox: https://github.com/MrAlex94/Waterfox

  • a few months ago Waterfox 56.0 was based on Firefox 56.0.2
  • and so on.

about:sync is blank

Caused by mhammond@339bb7d maybe?

I guess that this issue also bugs:

  • 0.0.22 with Firefox ESR 52.8 and (future) 52.9.

Workaround

  1. https://addons.mozilla.org/addon/about-sync/versions/?page=1#version-0.0.21
  2. install version 0.0.21
  3. disallow automatic updates to the extension and then take care with any use of about:addons to manually check for updates.

Credit

mornaq at https://www.reddit.com/comments/8jfu1v/-/dz3kyb4/?context=1 for drawing attention to this issue.

about-sync noticed a sync failure

Hi,
I am seeing this a lot last 2 days:

screen shot 2017-06-09 at 11 54 00

Not sure if it is safe to post the log here, but anyway, I opened tab on another device and I can see it on my main device.

I'm on latest firefox on latest macOS, extesion 0.0.11

Could not convert JavaScript argument arg 0

Error: [Exception... "Could not convert JavaScript argument arg 0 [nsISupports.QueryInterface]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: chrome://aboutsync/content/build.js :: getSqlColumnNames :: line 27476" data: no]

using version 0.0.2.1

Add a way to flush the logs

If sync never seems to complete for a user, they will struggle to extract a useful log unless they capture it from stdout. It would be great to have a button that flushes the logs as soon as it is called without waiting for a sync to complete.

about:sync

Given the name of the add-on it would be nice if about:sync was an alias for chrome://aboutsync/content/index.html

addon installed, but about:sync missing on Firefox for Android 68.1a1 (Nightly)

I'm using Firefox for Android 68.1a1 (2019-08-04). I was able to find aboutsync in AMO and install it, but I get and error "the address isn't valid" when I visit about:sync in mobile. I tried restarting the application. I tried tapping into the addon via about:addons. (The only options there are 'Disable' and 'Uninstall'.)

Does that version of Firefox use the same Sync engine that desktop Firefox (version 68+) uses?

Alerts: aboutsync: not installing aboutsync extension into window of type alert:alert

Hi, I'm have repeated messages related to:
Alerts: aboutsync: not installing aboutsync extension into window of....
At my console and terminal.

Is possible to configure the add-on to hide this if necessary.

I'm using the console to debug some applications parts and it's useful hide this alerts if check marked or something like this.

Thanks...

Addon prevents first sync

Via bug 1332698

STR:

  1. Create a fresh profile and add some bookmarks to it
  2. Sign in to Fx account
  3. Notification pops up "Sync will start momentarily"

Expected: Sync should start after 10 seconds of FxA sign-in

Actual: Sync doesn't start automatically

Note: When I close and reopen the browser sync starts momentarily. I have observed this issue several times.

This only happens with about:sync installed.

Not open url and TypeError: XPCOMUtils.generateQI is not a function

I have this error recently:
JavaScript error: chrome://aboutsync/content/AboutSyncRedirector.js, line 13: TypeError: XPCOMUtils.generateQI is not a function

And I cant open about:sync url because the browser says:
Hmm. That address doesn’t look right.

I have other error but I don't know if related:

JavaScript error: chrome://browser/content/parent/ext-browser.js, line 0: Error: Invalid tab ID: 58
[Parent 6141, Gecko_IOThread] WARNING: pipe error (371): Conexão fechada pela outra ponta: file /builds/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 356
console.log:  *** aboutsync:  not installing aboutsync extension into window of type alert:alert
JavaScript error: resource://gre/modules/WebRequestContent.js, line 124: TypeError: window is null
JavaScript error: resource://gre/modules/WebRequestContent.js, line 124: TypeError: window is null
JavaScript error: resource:///actors/NetErrorChild.jsm, line 611: TypeError: docShell.failedChannel is null
JavaScript error: chrome://aboutsync/content/AboutSyncRedirector.js, line 13: TypeError: XPCOMUtils.generateQI is not a function
JavaScript error: chrome://aboutsync/content/AboutSyncRedirector.js, line 13: TypeError: XPCOMUtils.generateQI is not a function
JavaScript error: resource://gre/modules/WebRequestContent.js, line 124: TypeError: window is undefined
JavaScript error: chrome://aboutsync/content/AboutSyncRedirector.js, line 13: TypeError: XPCOMUtils.generateQI is not a function
JavaScript error: , line 0: EvalError: call to eval() blocked by CSP
JavaScript error: , line 0: EvalError: call to eval() blocked by CSP
JavaScript error: resource://gre/modules/WebRequestContent.js, line 124: TypeError: window is null
JavaScript error: resource://gre/modules/WebRequestContent.js, line 124: TypeError: window is null
JavaScript error: resource:///actors/NetErrorChild.jsm, line 611: TypeError: docShell.failedChannel is null

Using:

Name 	Firefox
Version 	63.0a1
Build ID 	20180821100053

Thanks!

Tags not anonymized

At least I think this is the case, haven't dug in too deeply but Chris' bookmarks seem to have some recognizable words in the tags field. Had been meaning to let you know about this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.