Comments (51)
I am going to work on and hopefully improve the sync process for v8.8.
from browser-extension.
I found the reason.
There are conflicting information on MDN which led to the issue.
object
. Object describing the change. This object contains properties for all the keys in the storage area included in the storageArea.set call, even if key values are unchanged.
object
. Object describing the change. This contains one property for each key that changed. The name of the property is the name of the key that changed, and its value is a storage.StorageChange object describing the change to that item.
First one says: "all the keys in the storage area, even if key values are unchanged"
Second one says: "one property for each key that changed."
After further testing both APIs storage.onChanged
& storage.sync.onChanged
:
- Firefox
onChanged
returns all the keys in the storage area, even if all values are unchanged - Chrome
onChanged
returns only the changed values (event doesn't fire when there is no change)
Now that the problem has been found, I am going to re-write the sync process.
from browser-extension.
v8.8 was uploaded to AMO.
FoxyProxy Basic is available now and FoxyProxy Standard will be available after the AMO review.
from browser-extension.
Are you syncing between v8 instances?
from browser-extension.
Yes, all instances now are on v. 8, in all my PCs and in all my browsers
from browser-extension.
I assume both FoxyProxy Sync & Firefox sync are on.
Are all instances on the same machine?
Please try:
- Go to the FoxyProxy Options page
- Open the Dev Tools (F12)
- Go to the Console tab
- Type the following and hit ENTER
browser.storage.sync.get().then(console.log)
What is the result in each of the synced Firefox browsers?
from browser-extension.
@erosman
Yes, Firefox sync is enabled!
I already did this test! This command give some result and the next command of your tutorial downloads the json.
from browser-extension.
Can you post a screenshot?
Is it possible to post the settings?
(you can remove the private information before posting)
from browser-extension.
from browser-extension.
From another firefox, where I imported the settings manually
from browser-extension.
Please let me know...
- Is "Enable Sync" on in all of them?
- Can you show a screenshot of
browser.storage.sync.get().then(console.log)
? - Do the Privoxy servers and TOR servers have the same hostname:port?
from browser-extension.
Please let me know...
* Is "Enable Sync" on in all of them?
Yes
* Can you show a screenshot of `browser.storage.sync.get().then(console.log)`?
* Do the Privoxy servers and TOR servers have the same hostname:port?
Both are on localhost, but the second one is disabled and I left it just as a reminder. Ultimately, these are the same configurations as in v. 7.5, imported manually when you switched to version 8
from browser-extension.
Of course, I could do a manual import of the settings, but I think it is more useful now to solve this problem. Until now, I have never seen, since the v. 8, an automatic synchronization!
from browser-extension.
The screenshot shows the sync data from v7 & v8.
- Use the code on Settings disappeared after the upgrade to v8 to create a backup file of the browser sync data
- If needed repeat for all instances of Firefox
- Run the following in the FoxyProxy Options page -> Dev Tools, which would clear/delete all the sync data
browser.storage.sync.clear()
- In one of the Firefox instances, click SAVE to initiate the creation of new sync data
Let's see how that works out.
from browser-extension.
I'm sorry, but really I must clear ALL sync data????
from browser-extension.
Alternatively, post the sync data so that I can check it.
(you can remove the private information before posting)
from browser-extension.
{
"0": {
"active": true,
"title": "Privoxy",
"type": "http",
"hostname": "127.0.0.1",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#66cc66",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
},
"1": {
"active": false,
"title": "Rasp Privoxy",
"type": "http",
"hostname": "XXXXX",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#df46df",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [],
"exclude": []
},
"2": {
"active": false,
"title": "Rasp Tor",
"type": "socks5",
"hostname": "XXXXX",
"port": "9050",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#6db9cc",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
},
"3": {
"active": false,
"title": "Tor",
"type": "socks5",
"hostname": "127.0.0.1",
"port": "9050",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#cc1d0d",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
},
"ijl831510855683809": {
"active": true,
"address": "127.0.0.1",
"blackPatterns": [],
"color": "#66cc66",
"index": 0,
"pacURL": "",
"password": "",
"port": 8118,
"title": "Privoxy",
"type": 1,
"username": "",
"whitePatterns": [
SOME RULES
],
"proxyDNS": false
},
"oi30qj1504593779192": {
"active": false,
"address": "localhost",
"blackPatterns": [],
"color": "#cc1d0d",
"index": 4,
"port": 9050,
"title": "Tor",
"type": 3,
"whitePatterns": [
SOME RULES
],
"proxyDNS": true,
"username": "",
"password": "",
"pacURL": ""
},
"fzse1g1696685685691": {
"type": 1,
"color": "#df46df",
"title": "Rasp Privoxy",
"active": false,
"address": "XXXXX",
"port": 8118,
"proxyDNS": false,
"username": "",
"password": "",
"whitePatterns": [],
"blackPatterns": [],
"pacURL": "",
"index": 2
},
"logging": {
"size": 100,
"active": false
},
"l7j16r1668524890608": {
"type": 3,
"color": "#6db9cc",
"title": "Rasp Tor",
"active": false,
"address": "XXXXX",
"port": 9050,
"proxyDNS": true,
"username": "",
"password": "",
"whitePatterns": [
SOME RULES
],
"blackPatterns": [],
"pacURL": "",
"index": 3
},
"k20d21508277536715": {
"active": true,
"blackPatterns": [],
"color": "#0055E5",
"index": 1,
"notes": "These are the settings that are used when no patterns match a URL.",
"title": "Default",
"type": 5,
"whitePatterns": [
{
"title": "all URLs",
"pattern": "*",
"type": 1,
"protocols": 1,
"active": true
}
]
},
"mode": "patterns"
}
from browser-extension.
Ah! It seems there are duplicates.... 🙄
from browser-extension.
Please try the following:
- Add a new dummy proxy to one Firefox instance
- Wait for a while (sync is not immediate)
- Check if it is picked up elsewhere
- Check
browser.storage.sync.get().then(console.log)
everywhere to see if the new server was added
from browser-extension.
The new dummy proxy doesn't appear elsewhere, but, just for curiosity, is this the right syntax of the json settings?
This file is from the foxyproxy of my new instance of Firefox Beta, where nothing appears in settings!!!!
from browser-extension.
but, just for curiosity, is this the right syntax of the json settings?
No.. that is messed up.
obj
was a mistake in v8.0 code as per #36, it shouldn't be there since v8.1- it also appears that the
container
&commands
are also messed up
Can you paste the actual above JSON here?
from browser-extension.
{
"mode": "pattern",
"sync": true,
"autoBackup": false,
"showPatternProxy": false,
"passthrough": "",
"container": {
"incognito": "",
"container-1": "",
"container-2": "",
"container-3": "",
"container-4": ""
},
"commands": {
"setProxy": "",
"setTabProxy": "",
"quickAdd": ""
},
"data": [
{
"active": true,
"title": "Privoxy",
"type": "http",
"hostname": "127.0.0.1",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#add8e6",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
},
{
"active": false,
"title": "Tor",
"type": "socks5",
"hostname": "127.0.0.1",
"port": "9050",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#f66151",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
},
{
"active": false,
"title": "Rasp Privoxy",
"type": "http",
"hostname": "XXX.XXX.XXX.XX",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#808000",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [],
"exclude": []
},
{
"active": false,
"title": "Rasp Tor",
"type": "socks5",
"hostname": "XXX.XXX.XXX.XX",
"port": "9050",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#66cdaa",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
}
],
"obj": {
"data": [
{
"active": true,
"title": "Privoxy",
"type": "http",
"hostname": "127.0.0.1",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#66cc66",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
},
{
"active": false,
"title": "Rasp Privoxy",
"type": "http",
"hostname": "XXX.XXX.XXX.XX",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#df46df",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [],
"exclude": []
},
{
"active": false,
"title": "Rasp Tor",
"type": "socks5",
"hostname": "XXX.XXX.XXX.XX",
"port": "9050",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#6db9cc",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
},
{
"active": false,
"title": "Tor",
"type": "socks5",
"hostname": "localhost",
"port": "9050",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#cc1d0d",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [
SOME RULES
],
"exclude": []
}
]
}
}
from browser-extension.
Where is that from?
It appears to be from Export or browser.storage.local.get().then(console.log)
.
In any case, it is fine. The "obj": {}
shouldn't be there, but I dont think it causes a problem.
If it is in browser.storage.local.get().then(console.log)
, you can delete it with
browser.storage.local.remove('obj')
from browser-extension.
From export
from browser-extension.
You can deleteobj
from you settings.
To be sure, since you have a backup, you can reset FoxyProxy and delete everything, then start fresh.
from browser-extension.
Yes, I already deleted all the settings and tried to restart it from scratch, but I never get full syncs and some things are still left out.
I'll do some tests in the next few days and let you know.
from browser-extension.
Here are some sad facts!
- I recreated a new, clean profile from scratch
- Since I couldn't synchronize the various browsers, I import the configuration into all the others browser
- Now four Firefoxes in two machines are identical, with three proxies inactive and one active
- I add a rule in the proxy
- After a few seconds, the rule is added automatically to another Firefox, but all the three inactive proxies disappear! 😢
- After further investigation and downloading the new json, I found that the surviving profile remained in
"data": [
, while the three missing, together with a duplicate of the surviving one, were transferred to"obj": { "data": [
Here is the structure of the new json, omitting the proxy rules and some other minor details:
{
"mode": "pattern",
"sync": true,
"autoBackup": false,
"showPatternProxy": false,
"passthrough": "",
"container": {
"incognito": "",
"container-1": "",
"container-2": "",
"container-3": "",
"container-4": ""
},
"commands": {
"setProxy": "",
"setTabProxy": "",
"quickAdd": ""
},
"data": [
{
"active": true,
"title": "Privoxy",
"type": "http",
"hostname": "127.0.0.1",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#99c1f1",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [,
"exclude": []
}
],
"obj": {
"data": [
{
"active": true,
"title": "Privoxy",
"type": "http",
"hostname": "127.0.0.1",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#66cc66",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [,
"exclude": []
},
{
"active": false,
"title": "Rasp Privoxy",
"type": "http",
"hostname": "xxx.xxx.xxx.xx",
"port": "8118",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#df46df",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [],
"exclude": []
},
{
"active": false,
"title": "Rasp Tor",
"type": "socks5",
"hostname": "xxx.xxx.xxx.xx",
"port": "9050",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#6db9cc",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [,
"exclude": []
},
{
"active": false,
"title": "Tor",
"type": "socks5",
"hostname": "localhost",
"port": "9050",
"username": "",
"password": "",
"cc": "",
"city": "",
"color": "#cc1d0d",
"pac": "",
"pacString": "",
"proxyDNS": true,
"include": [,
"exclude": []
}
]
}
}
from browser-extension.
I am not sure where the obj
comes from. Did you clear the previous sync data?
If you want to text, you need to do the following:
- Clear all the data in all browsers (that means the settings, as well as sync data)
- Enables sync in all browsers
- Set some values in only ONE browser & save
- Wait to see the result
from browser-extension.
How can I remove ALL sync data? By creating new FF profiles?
Or is it sufficient to reset the foxyproxy data? In case, how?
I had simply reset all FoxyProxy profiles using "Restore Defaults" among the options, in all browsers, then imported a json without obj
.
from browser-extension.
How can I remove ALL sync data? By creating new FF profiles?
New profile not needed. Run this on all browsers from FoxyProxy Options page ...
browser.storage.sync.clear()
Or is it sufficient to reset the foxyproxy data? In case, how?
Click "Restore Defaults" and then SAVE
I had simply reset all FoxyProxy profiles using "Restore Defaults" among the options, in all browsers, then imported a json without obj.
That is good.
from browser-extension.
browser.storage.sync.clear()
in all browsers- Restore Defaults" and then SAVE in all browsers
- Import right json in ONE browser
- Toggle sync in another browser --> no result! 😢
from browser-extension.
Ah!
Although I deleted the profile as you told me, from the second Firefox I downloaded the json. Well, it contains an empty data
and always that damn obj
!!!!
from browser-extension.
Restart the browser after clearing everything, to make sure its cache it cleared.
from browser-extension.
No, no, no! It is not possible!!!!!
After deleting the data and restarting the browser, without having made any changes to foxyproxy, I exported the json: IT STILL CONTAINS THE OBJ
SECTION!
from browser-extension.
The sync data is sent elsewhere by Firefox and then sent to other browsers from there.
You can try to clear the sync data and then do not enable sync for a while.
You can also try deleting that 'obj' and see ...
browser.storage.local.remove('obj')
browser.storage.sync.remove('obj')
from browser-extension.
Done!
Tomorrow we'll see what happens. In the meantime, thanks so much for your help!
EDIT
The obj
section remained. I haven't turned on sync
from browser-extension.
Try to uninstall all Firefox instances, restart the browsers and then install again one by one, and check their storage.
from browser-extension.
I can try, but that's definitely not the problem. Now I'm on the laptop, so on another machine, yet the json still contains the obsolete obj
, which is evidently what makes syncing problematic.
In fact, I noticed that when I told you that there was only one rule left, this was the one in data
, while all the others, including the remaining profile, had migrated to obj
.
PS: I'm on a Debian GNU/Linux machine, therefore I can't uninstall Firefox-est without breaking the system. BTW, it will be sufficient to remove the old profile and create a new one.
EDIT
I found that in Chrome the exported json has only these lines related to obj
:
"obj": {
"proxyDNS": false
}
from browser-extension.
Thank you for testing. Let me check again and see what is going wrong.
from browser-extension.
Starting with a new profile, here's what I did:
- sync with mozilla to recover all settings and plugins
- export json from FoxyProxy --> NO
obj
- create some rules from scratch in FP and restart Firefox --> export json from FoxyProxy --> NO
obj
- enable sync and restart Firefox --> export json from FoxyProxy --> NO
obj
- open another version of Firefox and redo points 1-4 here
- NO SYNC in the second Firefox 😢
EDIT
After a few minutes the synchronization worked, but there are still some issues:
- Firefox Beta has all 4 proxies and all rules; its Json is regular
- Firefox ESR has only 3/4 proxies; its json has the 3 proxies in
data
and all 4 again inobj
from browser-extension.
I also tested but obj
did not appear.
I suspect, the ESR has issues.
From experience, sometimes an upgrade is partially completed and the addon ends up with some cached file from the previous version mixed with the new version. In these cases, it is best to uninstall and reinstall the extension.
See also: #73, #76 (comment)
from browser-extension.
Reinstalled FoxyProxy.
I imported settings in ESR, then enabled sync in Beta, but nothing has arrived yet here and lots of minutes have passed.
from browser-extension.
Can you make an edit in the Options page?
Any edit will do, disable a proxy for example.
The edit will cause the sync to be started on SAVE.
Also .....
There is Firefox Sync compatibility between ESR and standard Firefox.
I am asking Mozilla for some clarification.
from browser-extension.
OMG! I added a rule in one FF and after some minutes the addition went to other FF; then, I removed this rule in the latest one and... in FF beta all proxy settings are gone, except the active one!
I can't remember which one I started with, but I think from the beta version.
I don't think there are issues in Sync betwenn ESR e Beta: your link is very obsolete and now ESR is at v. 115, Beta at v. 122.
EDIT
However, I'm giving up: it's clear that there are serious synchronization issues and I have much more to do!
from browser-extension.
I have updated the repo with the reworked sync process.
Here is a zip of the beta for testing
The beta can be tested between 2 Firefox Nightly, or 2 Chrome instances.
foxyproxy.8.8.beta2.chrome.zip
foxyproxy.8.8.beta2.firefox.zip
from browser-extension.
@erosman Unfortunately I can't test this zip, because I can't remove official Firefox installed by default in every Debian GNU/Linux system. 😢
from browser-extension.
@erosman Unfortunately I can't test this zip, because I can't remove official Firefox installed by default in every Debian GNU/Linux system. 😢
No problem.
I don't have multiple computers to try myself.
It would be good to test it before the release.
Maybe someone else can test it.
from browser-extension.
Related Issues (20)
- change background color HOT 5
- PAC mode doesn't work on firefox HOT 3
- 8.x on firefox does not respect network.dns.disableIPv6 HOT 3
- empty proxy username/password becomes "undefined" upon unpgrade 7.5.1 --> 8.7 HOT 4
- PAC mode doesn't work on firefox Android HOT 1
- pattern editor should be at the top of the list HOT 2
- "Proxy by Patterns" is only available when multiple proxies exist, disabling patterns for single proxy setups HOT 8
- Firefox for Android: how to install old versions of FoxyProxy
- Can't use my old patterns file with new version HOT 2
- Automatically refreshes the current tab after switching proxies HOT 7
- Proxy is falling back to dafault settings when proxy is unavailable instead of blocking the request HOT 3
- Proxy by pattern not working as it did before HOT 1
- Exclude patterns not working HOT 11
- Live in-use proxy name indicator in the extension icon HOT 2
- basic functionality no working any more please fix HOT 5
- Unable to use Chrome enterprise policy to configure proxies HOT 7
- Doesn't work on Firefox 120.1.0 on Redmi Note 7 HOT 2
- DSN resolution no longer working with SOCKS5 HOT 6
- Cannot disable/switch proxy via toolbar HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browser-extension.