ufb / Textmarker

Firefox extension
Mozilla Public License 2.0
214 stars 29 forks source link

[bug] Says it wasn't able to restore all notes even though it was #151

Open neumannjan opened 3 years ago

neumannjan commented 3 years ago

Describe the bug I reload the page, it says: "Highlights have been restored successfully!". Right after that it says "Was not able to restore all highlights. Automatic restoration attempt in 5 seconds.". After that, it says "Was not able to restore all highlights." However, all the restored highlights are successfully there. Textmarker, however, thinks they aren't, moves them to "lost" and doesn't restore them next time again. Although if I disable the "If a highlight wasn't restorable: Don't try again next time" option, it works every time, but I always get the notification that says it didn't work even though it did.

History JSON file attached. Textmarker-backup-1_10_2021__1_47_38___.json.txt

I think the problem is with the particular website linked in the JSON file that I was saving the notes on.

To Reproduce

Go to the website linked in the JSON file. Add a highlight. Close the website and reopen it again to see the bug (highlights should load but then notifications with complaints appear).

Expected behavior Only the first notification "Highlights have been restored successfully!" should appear. Textmarker should not complain about being unable to restore highlights because it did in fact successfully restore them. All such highlights should not be considered "lost".

Which OS, Firefox edition, Textmarker version These infos could be helpful in order to reproduce the buggy behavior OS (i.e. Linux, MacOS, Win7, Win10, Android ...): Linux (on Wayland) FF edition (i.e. Regular, Nightly, ESR, ...): Firefox 84.0.1 (Regular) Textmarker version (i.e. 5.1.2): 5.3.1

ufb commented 3 years ago

@neumannjan Thank you for adding the JSON, that is very helpful. I was able to reproduce this bug. Not sure yet what is causing this strange behavior (haven't worked on Textmarker for quite a while due to fulltime job). When I got the time I'll investigate further and include a bug fix in a future version. Usually a bug that I can reproduce should be fixable, it's just a matter of when I get to it. Hopefully this is a rare exception - or does this also happen on some other websites? Thanks again for your detailed and very helpful bug report :)

neumannjan commented 3 years ago

I haven't been able to use Textmarker enough yet, so I don't know if this happens on some other websites. As far as I tried, I didn't experience the error elsewhere, but I didn't try nearly enough.

Thank you for your quick responses and for genuine interest in issues! Interaction with you is very pleasant, I definitely didn't expect such a quick (and positive) reaction. :) Best regards.