Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync issue #36

Closed
Doc73 opened this issue Oct 11, 2023 · 24 comments
Closed

Sync issue #36

Doc73 opened this issue Oct 11, 2023 · 24 comments
Labels
app: Firefox Specific to Firefox area: storage.sync storage.sync issues bug Something isn't working done ✓

Comments

@Doc73
Copy link

Doc73 commented Oct 11, 2023

Dear Dev,
I apologize for this bug report, as I'm probably missing something.
I noticed that this new version (8.0) is unable to synchronize either with the old version (Standard) or with itself installed on other devices.
Among the Firefox functions I can't find any debugging methods.
I've never actually had an account of yours, but I've always used Firefox sync.
Maybe this possibility no longer exists or not yet?
Thanks so much anyway for the clarification.
Domenico

@erosman
Copy link
Collaborator

erosman commented Oct 11, 2023

When you export FoxyProxy options in v8 (Options -> Export), What is the size of the saved JSON?

@Doc73
Copy link
Author

Doc73 commented Oct 11, 2023

17 kb

@erosman
Copy link
Collaborator

erosman commented Oct 11, 2023

Thank you, so It is not a size issue.
I dont use sync so I cant test it myself but I will look into it.

@erosman erosman added the area: storage.sync storage.sync issues label Oct 11, 2023
@erosman
Copy link
Collaborator

erosman commented Oct 13, 2023

I have tested sending sync and there is no problem.
I haven't tested the receiving end as I don't have any other device to sync with.

Please note the following in FoxyProxy v8+ ...

Sending

  • Sync data is sent out only if Sync option is enabled
  • Only proxies (and their patterns), & Global Exclude data are sent for sync
  • Sync data is sent when above are changed i.e. when Options are edited and saved
  • Browsers send sync data periodically (not immediately)

    storage.sync: Synchronization process
    In Firefox, extension data is synced every 10 minutes or whenever the user selects Sync Now in Settings > Sync or Firefox account.

Receiving

  • Sync data is received only if Sync option is enabled
  • Sync is received on extension start-up and when Sync data is changed (listening to sync storage change event)

@Doc73
Copy link
Author

Doc73 commented Oct 13, 2023

I have always used the Firefox sync function, even with the previous version of this plugin, and always with success.

In my tests I tried both with two versions of Firefox installed on the same machine (Firefox-esr and Firefox) and between different machines. Syncing just doesn't work!

If it helps, I use Debian as my operating system. I haven't tried on Windows yet.

For the moment I have returned to the old version of this plugin, which is fully functional.

@TriMoon
Copy link
Contributor

TriMoon commented Oct 22, 2023

@erosman

  • Sync is received on extension start-up and when Sync data is changed (listening to sync storage change event)

Maybe it doesn't explicitly pull the sync data on startup, especially when upgrading from older version? 🤔
In other words: Explicitly trigger the sync data receiver instead of waiting for Firefox to do that.

Maybe @Doc73 could manually toggle the Sync checkbox in the options ON->OFF->ON to see if that fixes it.
(I also use FF-Sync only, but have no other browser to sync with at moment.)

Warning

Currently i experience extra empty proxy settings, prepended to the proxy list, in older version after using the new version,
so the old config gets confused/corrupted when you switch back, that's why i prefer to use a different manifest-ID to test both.

@erosman
Copy link
Collaborator

erosman commented Oct 22, 2023

Maybe it doesn't explicitly pull the sync data on startup...

It does.
Sync out is sent by Firefox.

@ericjung
Copy link
Contributor

ericjung commented Oct 22, 2023

According to this, sync only works with addons installed from addons.mozilla.org. See “ Why is Functionality Limited to Add-ons from addons.mozilla.org” So sync is not going to work when installing 8.x locally.

@Doc73
Copy link
Author

Doc73 commented Oct 22, 2023

@TriMoon
No, it doesn't work.
I installed this addon from Mozilla webstite

@erosman
Copy link
Collaborator

erosman commented Oct 22, 2023

As pointed out by ericjung, sync works between addons installed from addons.mozilla.org.
That means, the Sync wont work for temporality installed addons.

I don't know what the situation is with Chrome Sync.

@Doc73
Copy link
Author

Doc73 commented Oct 22, 2023

@erosman
My addon is installed from addons.mozilla.org, as I said above

@erosman
Copy link
Collaborator

erosman commented Oct 22, 2023

Are you trying to Sync FoxyProxy Basic v8 with another FoxyProxy Basic v8?

@Doc73
Copy link
Author

Doc73 commented Oct 22, 2023

Yes, sure!

@erosman
Copy link
Collaborator

erosman commented Oct 22, 2023

I see.... I got it mixed up with the temporarily installed FoxyProxy v8.
Sorry about that.

Nonetheless, Firefox sync doesn't work with temporarily installed addons (like my dev version), therefore, it is harder to find out the problem.

If you want, you can do the following to test a few things...

  • Go to the Options page
  • Enable Sync
  • Make some changes to the Proxies (deactivating one would do)
  • Click SAVE
  • Open the Dev Tools (F12)
  • Go to the Console tab
  • Type the following and hit ENTER
browser.storage.sync.get().then(console.log) 
  • You should see some data
Object { 0: {…}, 1: {…}, 2: {…}, 3: {…}, 4: {…}, 5: {…}, 6: {…}, 7: {…}, 8: {…}, 9: {…} }

Now, go to the other machine (after a while). It must have Sync enabled.

  • Go to the Options page
  • Open the Dev Tools (F12)
  • Type the same code as above
  • Check the result

@Doc73
Copy link
Author

Doc73 commented Oct 22, 2023

When I type browser.storage.sync.get().then(console.log), I see nothing!

@erosman
Copy link
Collaborator

erosman commented Oct 22, 2023

It should look like this...

image

@Doc73
Copy link
Author

Doc73 commented Oct 22, 2023

Ah, I was wrong!
I see
Object { 0: {…}, 1: {…}, 2: {…}, 3: {…}, proxyDNS: true }
in both FF instances, but still no sync.

@erosman
Copy link
Collaborator

erosman commented Oct 22, 2023

Good....
To verify, you only changed values in one place, right?
You can test it by changing Proxy DNS.

If so, then the data is transferred. I will check the receiving end again.

@Doc73
Copy link
Author

Doc73 commented Oct 22, 2023

Yes

@erosman
Copy link
Collaborator

erosman commented Oct 22, 2023

I think, I found the problem. There is a typo in the code.

Can you possibly do this and send a screenshot or paste the result?
You can cover or delete the private data.

Same as before, open the Dev Tools but type:

browser.storage.local.get().then(console.log) 

@Doc73
Copy link
Author

Doc73 commented Oct 22, 2023

Schermata del 2023-10-22 22-00-12

@erosman
Copy link
Collaborator

erosman commented Oct 22, 2023

That is it.... it is the typo. 🤦‍♂️

It is fixed now for v8.1.
Sorry about that and thank you for helping out. 👍

@erosman erosman added bug Something isn't working done ✓ labels Oct 22, 2023
@Doc73
Copy link
Author

Doc73 commented Oct 22, 2023

Great! I'll wait for new version!

@erosman erosman added the app: Firefox Specific to Firefox label Nov 18, 2023
@erosman
Copy link
Collaborator

erosman commented Nov 22, 2023

FoxyProxy Basic 8.1 will be uploaded within a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: Firefox Specific to Firefox area: storage.sync storage.sync issues bug Something isn't working done ✓
Projects
None yet
Development

No branches or pull requests

4 participants