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

"Connection is not defined" error on Chrome OS #161

Closed
LundGB opened this issue Feb 11, 2020 · 29 comments
Closed

"Connection is not defined" error on Chrome OS #161

LundGB opened this issue Feb 11, 2020 · 29 comments
Labels
Milestone

Comments

@LundGB
Copy link

LundGB commented Feb 11, 2020

Describe the issue you are experiencing
A clear and concise description of your issue:
Bookmarks synced from Firefox on desktop Windows 10 PC can no longer be synced to Chrome browser on Chromebook. Syncing has worked flawlessly for months but has just stopped working suddenly.
How can the issue be reproduced?
Steps to reproduce the behavior:

  1. Install latest 1.5.1 version of Xbrowsersync on Firefox latest version 72.0.2 (64 bit) on Windows 10 desktop PC. Initiate initial sync on https://xbrowsersync.freerangecloud.com/ service
  2. Install latest 1.5.1 version of Xbrowsersync on Chrome browser latest version 79.0.3945.119 (64 bit) on fully up to date Chromebook.
  3. Click on 'Already got a Sync ID?'
  4. Enter sync ID and encription password. Click on 'Sync'.
  5. 'Syncing' message appears and never finishes, even when left for 20 minutes or more.
  6. Setting up a new sync and repeating the process results in the same error. Has previously worked fine with no issues.
  7. No new extensions have been added or updates to other extensions have been carried out on the affected Chrome browser which may conflict with Xbrowsersync.

Screenshots
If applicable, add screenshots to help explain your problem:

Desktop browser
Please complete the following information for all affected desktop browsers:

  • OS: Windows 10
  • Browser: Firefox
  • Version: 72.0.2 (64 bit)

Laptop browser with error
Please complete the following information for all affected laptop browsers:

  • OS: Chrome OS
  • Browser: Chrome
  • Version: 79.0.3945.119 (64 bit)

Application log
Please include the logs from the affected clients:
Download the Application log from the Settings panel and paste the contents here.

2020-02-11 07:50:34.268 [trace] Installed v1.5.1
2020-02-11 07:50:34.288 [trace] Starting up
2020-02-11 07:50:34.352 [trace] {"displayHelp":true,"displayPermissions":true,"appVersion":"1.5.1","platform":{"name":"chrome","version":"79.0.3945","mobile":false,"os":"Chrome OS x86_64"}}
2020-02-11 07:50:45.676 [trace] Optional permissions granted

End of log

@nero120
Copy link
Member

nero120 commented Feb 11, 2020

Unfortunately I do not have a chrome book, and there are no errors in the log so I can't see what's wrong. Can you try syncing in Chrome on your Windows 10 machine that you're running Firefox on and see if you get the same issue?

@zampanoo
Copy link

Same problem here: update 1.5.1 broke syncing with chrome browser on chromebook. Reinstalling did not help.

2020-02-11 21:16:10.644 [trace] Installed v1.5.1
2020-02-11 21:16:10.662 [trace] Starting up
2020-02-11 21:16:10.699 [trace] {"displayHelp":true,"displayPermissions":true,"appVersion":"1.5.1","platform":{"name":"chrome","version":"79.0.3945","mobile":false,"os":"Chrome OS x86_64"}}
2020-02-11 21:16:22.951 [trace] Optional permissions granted

@nero120
Copy link
Member

nero120 commented Feb 11, 2020

@LundGB @zampanoo I need more info to figure out what's going on here, can either/both of you do the following please:

  1. Browse to chrome://extensions
  2. Toggle the "Developer mode" switch to enabled
  3. Under xBrowserSync in the list of extensions, click on background.html where it says "Inspect views"
  4. The console tab should be visible in the DevTools window, clear the current entries (Ctrl+L), then open the xBrowserSync extension and attempt to sync
  5. Paste the contents of the console in this thread

Also, you need to do the same for the extension window itself (it has a different console context to the background page):

  1. Open the xBrowserSync extension, right click anywhere in the extension window and click on "Inspect"
  2. Select the console tab in DevTools, then attempt to sync
  3. Paste the contents of the console in this thread

@LundGB
Copy link
Author

LundGB commented Feb 11, 2020

Will do tommorow. However, today I have done a fresh install of Chrome on my desktop computer with no extensions, so no possible conflicts. A clean test. Syncing from Firefox to Chrome browser on Windows 10 desktop worked fine. So it seems to be a platform specific issue, which is the result of either: (a) changes incorporated in version 1.5.1 of Xbrowsersync which inadvertently broke syncing on Chromebooks, or (b) changes made by Google in the Chrome OS on Chromebook which broke the ability to use Xbrowsersync on such devices. Unfortunately, Chromebooks are updated regularly whether such updates are desired by the device owner or not, so not easy or impossible to roll back.

@nero120
Copy link
Member

nero120 commented Feb 11, 2020

Thanks @LundGB. Yes that's what I'm thinking, however I'm hoping that it's not a coincidence and that there is a change in v1.5.1 that is causing the issue on the chromebook platform as at least then I can fix it! 🙏

@LundGB
Copy link
Author

LundGB commented Feb 12, 2020

Console logs:
Chrome extension list log:
Empty - no log produced

Xbrowsersync window console log:

app.min.js:127 ReferenceError: Connection is not defined
at Object.isNetworkConnected [as IsNetworkConnected] (app.min.js:1373)
at app.min.js:1866
at q (app.min.js:142)
at checkNetworkIsOnline (app.min.js:1865)
at Object.checkServiceStatus [as CheckServiceStatus] (app.min.js:1711)
at Object.startSyncing [as syncForm_ConfirmSync_Click] (app.min.js:5803)
at app.min.js:267
at e (app.min.js:198)
at m.$eval (app.min.js:154)
at m.$apply (app.min.js:154)
(anonymous) @ app.min.js:127
(anonymous) @ app.min.js:99
$apply @ app.min.js:155
(anonymous) @ app.min.js:198
sg @ app.min.js:40
d @ app.min.js:40

This based on setting up a new sync. Sync failed.

Hope this helps. This is a great project and I hope that @nero120 you can fix this issue for Xbrowsersync users. I love the ethos of the project and I appreciate how hard you are working on it. I plan to make a donation to the project. Good luck! Let me know if there is anything else I can do on this end to assist.

@zampanoo
Copy link

Thanks Nero, for looking into the issue. Would love to see the project continue. Logs below.

I do not thinlk that my Chromebook updated before the new xbrowsersync version was installed.

BTW, the syncing arrow spins round both on the large paenl after entering pw & un. And there is another little spinning arrow next to the api.xbrowsersync.

Thanks again, Stefan

First console log: empty

Second console log:
app.min.js:127 ReferenceError: Connection is not defined
at Object.isNetworkConnected [as IsNetworkConnected] (app.min.js:1373)
at app.min.js:1866
at q (app.min.js:142)
at checkNetworkIsOnline (app.min.js:1865)
at Object.checkServiceStatus [as CheckServiceStatus] (app.min.js:1711)
at Object.startSyncing [as syncForm_ConfirmSync_Click] (app.min.js:5803)
at app.min.js:267
at e (app.min.js:198)
at m.$eval (app.min.js:154)
at m.$apply (app.min.js:154)

@nero120
Copy link
Member

nero120 commented Feb 12, 2020

Thanks @LundGB @zampanoo, I can indeed fix this! Could one of you please run the following commands in the console and paste the output here, it would help me:

JSON.stringify(window.navigator.connection)
JSON.stringify(window.navigator.onLine)

I'll try to release a fix within a week or two, in the meantime please downgrade to v1.5.0.

@nero120 nero120 added the bug label Feb 12, 2020
@nero120 nero120 added this to the v1.5.2 milestone Feb 12, 2020
@LundGB
Copy link
Author

LundGB commented Feb 12, 2020

First command output:
No output. {}
Second command output:
"true"

Commands were run in Xbrowsersync popup.

How do you downgrade to 1.5.0?

@nero120
Copy link
Member

nero120 commented Feb 12, 2020

Lovely thanks @LundGB.

To downgrade:

  • Download xbrowsersync_1.5.0_chrome.zip from the v1.5.0 release page
  • In Chrome, browse to chrome://extensions and ensure Developer mode is enabled.
  • Remove the existing xBrowserSync extension.
  • Drag the downloaded zip file onto the window so that "Drop to install" appears, then drop the file.

Chrome will display warnings intermittently as the extension was not installed from the Chrome Web Store, but you can safely ignore these warnings.

@zampanoo
Copy link

zampanoo commented Feb 12, 2020 via email

@LundGB
Copy link
Author

LundGB commented Feb 12, 2020

I am happy to test any new version prior to release, if that would be helpful.

@nero120
Copy link
Member

nero120 commented Feb 12, 2020

@LundGB thanks I'll take you up on that!

@zampanoo
Copy link

I installed vs 1.5.0 as described. Syncing does work but the extension does not seem to stick: after rebooting it's gone.

@LundGB
Copy link
Author

LundGB commented Feb 13, 2020

Same here as @zampanoo. I installed 1.5.0 which worked yesterday, but it had disappeared by itself this morning! What?

@nero120
Copy link
Member

nero120 commented Feb 13, 2020

That's strange, I haven't experienced that on Chrome v80.0.3987.106 (Official Build) (64-bit) on Win10. Did either of you see this alert:

image

@nero120
Copy link
Member

nero120 commented Feb 14, 2020

@LundGB @zampanoo I've released a beta for Chrome with a possible fix for your issue here. Could you both please give it a try and let me know how it goes?

@LundGB
Copy link
Author

LundGB commented Feb 14, 2020

I have tried the beta, both with an existing sync and with a new sync. It failed both times with an error message even though credentials were 100% correct:
"Invalid credentials - Check your sync ID and password, and ensure the active service is where the sync was created"
In the extension, there was an error noted: "Error: [10106] NoDataFound" There are hundreds of lines in the log created. Let me know if you want me to post them here, or carry out any other investigation on your behalf.

@nero120
Copy link
Member

nero120 commented Feb 14, 2020

@LundGB sorry I should have said, with beta releases I hard code the service to the test service (https://api-test.xbrowsersync.org/). You can't use your existing sync so just create a new one. The test service is cleared down regularly.

@LundGB
Copy link
Author

LundGB commented Feb 14, 2020

OK. Good news and bad news. The sync worked fine on the Chromebook - it completed very quickly. I then rebooted Chromebook due to the 'disappearing extension' problem. When I rebooted, extension had vanished. This is apparently a thing.
I have 'Sync Extensions' ticked in my Google account. I don't think I can use my Chromebook without being logged into my evil Google account. I could try reinstalling and unticking this option, as it appears that it is during the reboot process that evil Google decides that a particular extension is unwanted. I don't know if there might be an obscure Chromebook setting that might get around this for Chromebook users. I will do some digging.

@nero120
Copy link
Member

nero120 commented Feb 14, 2020

@LundGB that's great news, the fixed worked! Don't worry about the disappearing extension as it won't be long before I release the fix and you can go back to using the version from the chrome store. Or yes, you should be able to disable syncing of extensions which should stop it being removed. Thanks for your help!

Also just to say, make sure you aren't syncing bookmarks to your Google account (I'm guessing you're not) otherwise you'll get conflicts.

@LundGB
Copy link
Author

LundGB commented Feb 16, 2020

OK. Thanks. Just one question, Rich. I thought Xbrowsersync synced every 15 minutes. However, when I am reorganising bookmarks, it seems to sync every few minutes, displaying a message that latest changes may not have synced. Is there anyway to have any control over frequency of syncing or to pause syncing? Perhaps simply disconnecting from the internet while I reorganise bookmarks is the way to go?

@nero120
Copy link
Member

nero120 commented Feb 16, 2020

@LundGB yes it does indeed sync every 15 minutes, however there is a known issue currently in xBrowserSync for Chrome and Firefox where if you move a bookmark into a sibling folder or certain other folders you can get an issue. There are other issues with moving bookmarks in Firefox as well.

Can you attach a log file containing the error occurs?

@LundGB
Copy link
Author

LundGB commented Feb 16, 2020

Log file attached. It is a long log from Firefox. I think I had an error on the 15th. There may also be errors logged from a few days ago as well. I tried to produce an error myself today, but couldn't.
You may be able to spot something useful.
xbs_log_20200216104914.txt

@zampanoo
Copy link

Rearranging of bookmarks was always buggy for me too. It was impossible to move an item into a folder above it in both hierarchy and sidebar position - the hack was to first move it up in hierarchy but into a folder below in sidebar position. And from there into the desired position, somewhere above... (Sorry, probably sounds silly and won't help anybody.)

@LundGB
Copy link
Author

LundGB commented Feb 17, 2020

@zampanoo By sidebar position, do you mean subfolder position or nested subfolders? Perhaps you can give an example of what you mean? I have been trying to reproduce the error without success. It can't be random, so I must occasionally trigger it by certain bookmark moves.

@nero120 nero120 changed the title Sync apparently no longer possible on Chrome browser "Connection is not defined" error on Chrome OS Feb 28, 2020
@LundGB
Copy link
Author

LundGB commented Mar 14, 2020

Any news on when a new version will be released which includes a fix for this issue? Let me know if I can help in any way.

@nero120
Copy link
Member

nero120 commented Mar 16, 2020

@LundGB just moved house so things are a bit chaotic at the moment, bear with me!

@nero120 nero120 closed this as completed in 1913534 Apr 9, 2020
@nero120
Copy link
Member

nero120 commented Apr 9, 2020

@LundGB @zampanoo v1.5.2 has now (finally) been released that includes a fix for this issue. Sorry about the wait guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants