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

Suddenly running into "Privacy Badger failed to initialize" in Firefox #3036

Closed
Ablesius opened this issue Dec 6, 2024 · 14 comments · Fixed by #3059
Closed

Suddenly running into "Privacy Badger failed to initialize" in Firefox #3036

Ablesius opened this issue Dec 6, 2024 · 14 comments · Fixed by #3059

Comments

@Ablesius
Copy link

Ablesius commented Dec 6, 2024

I don't know much else, the add-on just suddenly showed the "Privacy Badger failed to initialize" error and a link to this page.

Firefox version 133.0, uname -a: Linux T460 6.12.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 22 Nov 2024 16:04:27 +0000 x86_64 GNU/Linux

@ghostwords
Copy link
Member

ghostwords commented Dec 6, 2024

Hello and thanks for opening an issue!

Next time this happens, could you open Privacy Badger's background page console, and see if there are any errors that will help us figure out what's going on?

To open the background page console:

  1. Visit about:debugging
  2. Select "This Firefox"
  3. Click the Inspect button in the listing for Privacy Badger
  4. Select the Console tab

Let me know if you have any questions.

Previously: #2966

@ghostwords ghostwords changed the title PrivacyBadger breaks on https://www.smartgoods.de/ Suddenly running into "Privacy Badger failed to initialize" Dec 6, 2024
@ghostwords ghostwords added question Further information is requested bug labels Dec 6, 2024
@ghostwords
Copy link
Member

Also, which version of Privacy Badger do you have?

@Ablesius
Copy link
Author

Ablesius commented Dec 8, 2024

Hi there!

PB version: 2024.7.17

I returned to the page where it happened, but now it seems to just work. Maybe it was just a glitch. I'll keep my eyes open for the problem, but now it's kind of unclear when/if I can recreate the issue!

@josteins1

This comment has been minimized.

@ghostwords

This comment has been minimized.

@MadeinDave
Copy link

Same here with Firefox 134.0.2 (64 bit) and PB 2024.7.17, it fails on browser startup.

@ghostwords
Copy link
Member

Hi @MadeinDave, are there any messages or errors in Privacy Badger's console when this happens?

@MadeinDave
Copy link

MadeinDave commented Feb 3, 2025

Hi @MadeinDave, are there any messages or errors in Privacy Badger's console when this happens?

Sorry for the late response, the error occurs on the first run of Firefox and the PB icon went red for a couple of seconds, before the extension works back.
Going under about:debugging just show some error messages:

Privacy Badger is ready to rock! background.js:123:13
Dropping malformed content script message  
Object { type: "getBlockedFrameUrls" }
  from https://github.com/EFForg/privacybadger/issues/3036#issuecomment-2523279890 webrequest.js:1188:17
Dropping malformed content script message  
Object { type: "checkWidgetReplacementEnabled" }
  from https://github.com/EFForg/privacybadger/issues/3036#issuecomment-2523279890 webrequest.js:1188:17

@ghostwords
Copy link
Member

ghostwords commented Feb 3, 2025

Thanks for checking but the messages in your log are unrelated. If there are any relevant messages, we would only see them when Privacy Badger is in the "failed to initialize" state.

@ghostwords ghostwords pinned this issue Feb 4, 2025
@MadeinDave
Copy link

MadeinDave commented Feb 7, 2025

Thanks for checking but the messages in your log are unrelated. If there are any relevant messages, we would only see them when Privacy Badger is in the "failed to initialize" state.

In the about:debugging tab, inside inspector console doesn't show nothing more.
I can only see the PB icon turning red with a tooltip saying it fail to start, but it last just some seconds...

Image
Image

@ghostwords
Copy link
Member

Oh! So your "failed to initialize" problem resolves itself after a few seconds without you having to do anything. Interesting! How often does the "failed to initialize" problem occur?

Also, to clarify, when you saw "failed to initialize" and visited about:debugging, did you click the "Analizza" button for Privacy Badger, and then did you select the Console tab? But there were no messages in the console?

@MadeinDave
Copy link

How often does the "failed to initialize" problem occur?

Almost every first Firefox startups...

Also, to clarify, when you saw "failed to initialize" and visited about:debugging, did you click the "Analizza" button for Privacy Badger, and then did you select the Console tab? But there were no messages in the console?

Most of the time the console its pretty empty, or the messages are the same from the last attachment

@ghostwords
Copy link
Member

I'll add more debugging output to the next Privacy Badger update so that we can at least see where the problem lies.

@ghostwords
Copy link
Member

ghostwords commented Feb 14, 2025

We may have a fix for this Firefox issue in the next update. My guess is that Privacy Badger hangs waiting for "session" storage to return. The thing is, we don't even need to read from session storage at this time in Firefox, so if that's the problem, we have a straightforward fix.

I don't know why reading from session storage would take a long time in Firefox. It's possibly something about the Firefox profile, in which case this could be worked around by creating a new profile and moving all your stuff there.

@ghostwords ghostwords changed the title Suddenly running into "Privacy Badger failed to initialize" Suddenly running into "Privacy Badger failed to initialize" in Firefox Feb 14, 2025
@ghostwords ghostwords removed the question Further information is requested label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants