x0a / uBO-YouTube

Easier way to exempt your favorite YouTube channels from adblocking.
GNU General Public License v3.0
124 stars 8 forks source link

extension doesn't work in hardened firefox #37

Closed ghost closed 3 years ago

ghost commented 3 years ago

Recently reinstalled the add-on into my hardened firefox stable and found that when I click "Options" in the pop out menu I cannot grant permission, change settings. The only things that work in the add-on options page is the "Whitelist > Ads > Misc" header and import/exporting settings (to a certain degree). Importing opens the file picker but shows "Could not set settings, encountered error: Error: Could not establish connection. Receiving end does not exist.". It also appears that the add-on doesn't even inject the add-on's css/buttons on youtube.

ghost commented 3 years ago

Forgot to add: I have Container Tabs, Ublock Origin, and ClearUrls. With hardened user.js file.

x0a commented 3 years ago

Hey Zachary,

Thank you for your report. Could you navigate to about:debugging#/runtime/this-firefox, click Inspect next to this extension and post a screenshot of the logs? Feel free to redact any visible subscription/whitelist data.

Also your user.js file could be useful if it has customizations. For reference, I tested with https://github.com/pyllyukko/user.js/ and could not replicate the issue.

Should look like this:

Capture

ghost commented 3 years ago

Of course here is the screenshot and my user.js. Capture

user.js - https://hastebin.com/zoxajevuxo.less

ghost commented 3 years ago

I noticed that when I click the buttons/switches it spams the "Could not establish connection" message. I have no idea what that means.

x0a commented 3 years ago

I noticed that when I click the buttons/switches it spams the "Could not establish connection" message. I have no idea what that means.

Basically it means that the background script error'd out before it could execute the addListener command. So the background script can't respond to any messages sent by any UI or execute any further commands. Thanks to the user.js file I've isolated this to the user_pref("dom.storage.enabled", false); // Disable DOM storage in the user.js file.

However I cant test this because something about user.js files prevents me from loading my extension in debugger mode. I'll likely release a fix without testing to test it (ironic) but based on my testing it should work.

ghost commented 3 years ago

Awesome, thanks for taking time to debug this issue. Until then I will just use it in Vivaldi (thanks to the native Opera whitelist method). Thanks for making this amazing extension.

x0a commented 3 years ago

Thanks again for your patience!

This should now be fixed in v0.14.2, which is now available at Mozilla Addons. Can you check it out and see how well it runs?


Firefox update instructions

  1. Open the Settings menu by clicking at the top right.
  2. Click on Addons
  3. Open the Addons management menu by clicking the gear
  4. Click on Check for updates. This should update all extensions.
ghost commented 3 years ago

Just updated it now and it works! Something I would like to note for other users, if you have container tabs in Firefox, make sure the extension options page is in the same container tab as YouTube in order for "Import from Subscriptions" to work. Thanks again for fixing this issue.

x0a commented 3 years ago

Happy to hear it! I'll add a note in the README later on.

Feel free to open a new issue if you encounter anything else