wincohi / bookmark-notes

a firefox webextension to bring back pre-62 bookmark annotations
Mozilla Public License 2.0
23 stars 4 forks source link

Sync not working #38

Open Migliutin opened 6 years ago

Migliutin commented 6 years ago

The notes are not getting synced between:

wincohi commented 6 years ago

The add-on only syncs in tandem with Firefox Sync, so if you're not logged into a Firefox account and syncing on both devices, your notes won't be synced either. If you are signed in on both systems, make sure that in about:preferences#sync, "Add-ons" is checked, then sync manually.

As far as I'm aware, there's no way for an extension to automatically initiate a sync, so you'll have to press the Sync button manually if all conditions have been met but you still aren't seeing your notes on both platforms.

Migliutin commented 6 years ago

Sync is up and running, but Notes are not getting synced. Here is the strict sequence of the steps I followed:

  1. [Windows] I installed the Bookmark Notes addon.
  2. [Windows] on Sync preferences I checked the Add-ons item (Bookmarks was already checked).
  3. [Windows] I exported my bookmarks in HTML format.
  4. [Windows] I imported them in Boomark Notes.
  5. [Windows] I made sure the import was successful.
  6. [Windows] I manually fired Sync (many a time).
  7. [Linux] at Firefox startup the Bookmark Notes addon was automatically installed
  8. [Linux] I made sure that in the Sync Preferences both the Bookmarks and the Add-ons items were checked.
  9. [Linux] I manually fired Sync (many a time).
  10. [Linux] bookmarks have been synced, Notes haven't.
wincohi commented 6 years ago

I can't reproduce this. I was able to sync between Windows 10 and Linux (Manjaro) both ways without an issue. In this case, I was using fresh profiles and a new, clean Sync account in Dev Edition v63 on both platforms, with add-on version 1.2.0.

wincohi commented 6 years ago

If you can reproduce the issue, could you perhaps try to troubleshoot it? Head to about:debugging, make sure "Enable add-on debugging" is checked, and click the Debug button below the Bookmark Notes entry.

When the dev tools come up, check the console and note any errors, make sure Sync has completed, then paste the following code:

browser.storage.sync.get().then((res) => console.log(res))

In a moment, it should return an object: notes { ... }. Can you expand that and tell me if your notes are in there?

Migliutin commented 6 years ago

Sorry about the delay, busy week 😩

[ON WINDOWS] the console shows plenty of error messages. Most of them (roughly translated from Italian) are of the following types:


Error: ID already exists: append ext-menus.js
Error: ID already exists: convert ext-menus.js 


Error: ID already exists: append ext-menus.js
XML interpretation error: non well-formed
Indirizzo: https://userstylesapi.com/tic/stats
Row number 1, column 1: stats:1:1
Error: ID already exists: convert ext-menus.js 


Error: ID already exists: append ext-menus.js
[Show/hide message details.] Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist.
background.js:63
Error: ID already exists: convert ext-menus.js 


Error: ID already exists: convert ext-menus.js
Error: ID already exists: append ext-menus.js
[Show/hide message details.] Unchecked lastError value: Error: Invalid tab ID: 84
background.js:101
XML interpretation error: non well-formed
Indirizzo: https://userstylesapi.com/tic/stats
Row number 1, column 1: stats:1:1
[Show/hide message details.] TypeError: _urlToStyles[id] is undefined[Further info] messaging.js:144:21
XML interpretation error: non well-formed
Indirizzo: https://userstylesapi.com/tic/stats
Row number 1, column 1: stats:1:1
[Show/hide message details.] TypeError: _urlToStyles[id] is undefined[Further info] messaging.js:144:21
Error: ID already exists: convert ext-menus.js 

The output to the command browser.storage.sync.get().then((res) => console.log(res))instead is: bookmark_notes_windows

I haven't checked on Linux yet — I'll post the output there too ASAP

wincohi commented 6 years ago

None of those errors look like they come from this add-on. It also looks like your notes are present in synced storage as they should be, so no problems there.

When you check on the other system, if the notes are there upon running the command but they still aren't being recognized by the add-on, then we'll try the following:

browser.bookmarks.get("-AwE_qoe2GBG").then((bookmark) => console.log(bookmark))

You can replace the bit between the quotation marks with any of the IDs in your note list, but I just want to know whether the above command fetches the correct bookmark or gives an error.

Migliutin commented 6 years ago

This is the command browser.storage.sync.get().then((res) => console.log(res)) output on Linux:

immagine

It looks like the notes aren't there

wincohi commented 6 years ago

That's interesting, especially since I can't reproduce it on my end. Do you have any other add-ons that sync data using the built-in API? If so, do they sync properly?

Edit: Adding the help wanted tag so that anyone else who has the issue can (hopefully) reach out as well.

Migliutin commented 6 years ago

I couldn't tell, so far I've synced just bookmarks.

After checking the Add-ons item on Sync preferences, though, the install of Bookmark Notes on Windows caused the automatic install of the addon on Linux as well.

Do you reckon that's enough to prove the add-ons sync is working correctly?

Migliutin commented 6 years ago

On second thought: I recently installed Stylish.

Even then the addon was automatically installed in Linux after installing on Windows, but the styles were not synced (I had to manually reinstall them).

I don't know if that was the expected behaviour, though.

Migliutin commented 6 years ago

I made some tests, and the problem seems to be entirely on the Linux side. I tried the following steps:

  1. [Linux] I exported my bookmarks in HTML format.
  2. [Linux] I tried to import them in Boomark Notes.

The import fails, the notes are not there. I guess the problem was not related to the sync, after all.

Some idea of what I could try now?