cadeyrn / bookmarks-organizer

With the Bookmarks Organizer it's easy to put order in your bookmarks. The Bookmarks Organizer finds no longer working bookmarks, redirects, duplicates and more!
https://addons.mozilla.org/en-US/firefox/addon/bookmarks-organizer/
Mozilla Public License 2.0
180 stars 31 forks source link

Progress bar stuck in the middle / end during the scan #229

Closed Illegal-Services closed 10 months ago

Illegal-Services commented 10 months ago

Describe the bug The progress bar stuck in the middle / end during the scan in all my firefox profiles, even after reinstalling Bookmarks Organizer Am I the only one ? Also it seems like when dealing with less bookmarks it works fine?? I didn't had this problem before 1 week or something

To Reproduce Steps to reproduce the behavior: idk man it's a weird issue from my side I believe?

Expected behavior The progress bar to complete and show the different Warnings and Errors just like usual.

Screenshots image

Version information:

Additional context nul

Illegal-Services commented 10 months ago

oh man I just noticed that launching the same thing on a VM works, I believe my Firefox browser is the problem, I'll try reinstalling it, I guess that will works to fix it

Illegal-Services commented 10 months ago

Also, scanning using the github main branch source code, in about:debugging, works fine (there are a bunch of errors in the console but it works)

Illegal-Services commented 10 months ago

so I found another way to fix, it's by scanning with about:debugging console opened, then it works, if it's not opened, when the bar will stuck itself the background script will stop I believe opening the console force the background script to stay alive?

Illegal-Services commented 10 months ago

I tried on 2 different profiles, with 2 different bookmarks databases, and the Background script is always stopping at 30 seconds

Illegal-Services commented 10 months ago

https://github.com/cadeyrn/bookmarks-organizer/assets/62464560/3c33f023-33a2-4262-8427-37bb4965d275

Illegal-Services commented 10 months ago

I'm thinking it's probably something wrong with my browser, and not with Bookmarks Organizer but what the hell is that and why and how lol

Illegal-Services commented 10 months ago

or it's a bug introduced in a newest version of Firefox (i'm using latest atm)

cadeyrn commented 10 months ago

If it always happens after exactly 30 seconds, it sounds like a bug in Firefox or something the add-on's code have to handle better. Did this already happen with the same version of Bookmarks Organizer and previous versions of Firefox?

Illegal-Services commented 10 months ago

omg yes that's the issue, I updated Firefox from my VM to latest version, (it was working on v116.something) and now on v117 it breaks.

Illegal-Services commented 10 months ago

So that's either an issue from Firefox OR a new feature that we devs have to implement to keep the background pages alive.

Illegal-Services commented 10 months ago

"Did this already happen with the same version of Bookmarks Organizer and previous versions of Firefox?"

No, but I guess I Figured the bug now, above. I'm kindda lazy to hit Firefox github pages, I'll see the changelog of firefox v117 now

Illegal-Services commented 10 months ago

So I read that changelog, nothing seems to appear about background scripts, tho they did enhance the console. https://www.mozilla.org/en-US/firefox/117.0/releasenotes/ and it's kindda related because quick remember from my above messages, opening the console makes it working, cuz it forces the background script to stay alive.

Illegal-Services commented 10 months ago

firefox_2023-09-03_13-36

13:35:36.870 Background event page was not terminated on idle because a DevTools toolbox is attached to the extension. view-source:moz-extension://17aa0c3f-5a07-4450-a1ed-5cb20c0775b1/_generated_background_page.html

mhmmm interesting, in the console I see Firefox tried to close it but cuz of console it didn't.

cadeyrn commented 10 months ago

I can confirm that Firefox stops the background script after 30 seconds in Firefox 117, but not in Firefox 116.0.3. I'll investigate.

Illegal-Services commented 10 months ago

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/117

here they didn't mention anything about Background scripts, it really seems like an Firefox new issue tbh

cadeyrn commented 10 months ago

Yes, I guess it's a bug. I'll try to find the culprit with the help of mozregression (https://mozilla.github.io/mozregression/)

cadeyrn commented 10 months ago

Caused by https://bugzilla.mozilla.org/show_bug.cgi?id=1830767. I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1851373

Thanks for reporting the issue to me!

Illegal-Services commented 10 months ago

your welcome ^-^

Illegal-Services commented 10 months ago

firefox_2023-09-04_07-04

i found interesting to note that I'm creating a web extension on my side, and I'm not even using background.js right now (it's a moduled type popup.js, it does not call the background.js at all (it's included in the manifest.json but the background.js file is empty right now), and I still manage to have the same problem than if I was using a background.js lmfao

Illegal-Services commented 10 months ago

I'm gonna try to remove completely the background.js from my manifest and see if the bug still occurs lol

Illegal-Services commented 10 months ago

well yeah that worked, no more warning message

Illegal-Services commented 10 months ago

oh so the popup.js even with this error message and the dev console closed, it still finishes to complete, basically the only thing it does is close the empty background script page, tbh I don't even see a reason for it to run since that background.js file is well.. literally empty

Illegal-Services commented 10 months ago

cringe

cadeyrn commented 10 months ago

@Illegal-Services Does the attached version work for you? You can test it via about:debugging (it's not signed).

bookmarks_organizer-4.1.1b1.zip

If it's work, I will prepare an update for distribution on addons.mozilla.org.

Illegal-Services commented 10 months ago

@cadeyrn Hello, that version indeed passed my tests, yes.

cadeyrn commented 10 months ago

Bookmarks Organizer 4.1.1 has been released on addons.mozilla.org now.