Skip to content

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

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

Closed
Ablesius opened this issue Dec 6, 2024 · 23 comments · Fixed by #3059 or #3089
Closed

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

Ablesius opened this issue Dec 6, 2024 · 23 comments · Fixed by #3059 or #3089

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
@rhubarbdedubarb
Copy link

hello, i have just ran into the same issue, i will share a screen shot of the about debugging in case it is of any use

Image

@ghostwords
Copy link
Member

Thank you, that's helpful!

We're working on another fix for this issue now: #3089

Can you tell us anything more about when this happens? Did this happen on reopening Firefox? Is your Firefox set up to reopen previous windows and tabs? How many windows/tabs would you say you have open when this happens?

@richterdavid
Copy link

I'm seeing the same symptoms.

about:debugging#/runtime/this-firefox shows

Warning details

Reading manifest: Warning processing storage: An unexpected property was found in the WebExtension manifest.

The PB extension icon shows

Please tell us about the following error:
Privacy Badger failed to initialize

Firefox 138.0 (64-bit) for Windows 11.

PB version 2025.3.27

@ghostwords
Copy link
Member

Hi @richterdavid, can you tell us anything more about when this happens? Did this happen on reopening Firefox? Does the problem go away on its own? How many windows/tabs would you say you have open when this happens? Is your Firefox set up to reopen previous windows and tabs?

@hyperfocusdee
Copy link

Hello,

Privacy Badger has an exclamation point and a red message that says "Privacy Badger failed to initialize." This occurs when opening a fresh browser and when I have multiple tabs and windows open. It's been like this for at least 3 days and hasn't gone away after the browser is closed and after several computer restarts.

Version 2025.3.27

Image

@ghostwords
Copy link
Member

Thanks @hyperfocusdee for the detailed report! We should have yet another fix for this type of problem in the next update.

In the meantime, does uninstalling and reinstalling Privacy Badger help?

@richterdavid
Copy link

Hi @richterdavid, can you tell us anything more about when this happens? Did this happen on reopening Firefox? Does the problem go away on its own? How many windows/tabs would you say you have open when this happens? Is your Firefox set up to reopen previous windows and tabs?

It happened apparently randomly and has gone away on its own, although there may have been a browser restart or computer reboot in the process there. FF is set to reopen previous windows and tabs. I have 1 window and maybe 60 or so tabs; I don't have a great way of counting tabs right now.

@hyperfocusdee
Copy link

Thanks @hyperfocusdee for the detailed report! We should have yet another fix for this type of problem in the next update.

In the meantime, does uninstalling and reinstalling Privacy Badger help?

It appears that uninstalling and reinstalling helped. Thanks :)

@ghostwords
Copy link
Member

We should have fixed all known causes of "Privacy Badger failed to initialize" as of Privacy Badger version 2025.5.14.

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