-
Notifications
You must be signed in to change notification settings - Fork 189
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
Manifest V3 migration #1522
base: master
Are you sure you want to change the base?
Manifest V3 migration #1522
Conversation
@LiliaDoe @GrosPoulet This branch is at the state that it currently loads as a valid Manifest V3 extension and actually works for a couple sites that I tried. Feel free to experiment with it, I need all the feedback I can get before I merge it into main branch. |
Will do! Would you prefer it tested on chrome? Else, I'll test it mainly on firefox |
Testing in Firefox would be perfect. I mostly use Chrome so it's good to have some coverage between different browsers. |
My testing thus far has found a couple things.
Everything else works great so far on Firefox! |
Firefox 136 still needs background.scripts in the manifest to work. This adds it
Thank you for testing! I also noticed this "Receiving end does not exist" error when saving options but I haven't yet been able to figure out what is causing it. |
Migration docs say that unlike background pages, service workers could shut down at any time and lose all their registered listeners. So maybe that is what's causing the problem. |
I was seeing the error on the master branch too in reddit, while debugging that Reddit video issue. Edit: I double checked today, and I don't see the error showing on master branch now. Maybe it was on my end |
@LiliaDoe I've made some fixes recently - the options can be saved now without errors but they don't seem to be updating other pages immediately, so a reload is required. Other than that, everything seems to work. Can you please re-check? I think I can live with options requiring a reload if it lets us restore the extension in Chrome web store. |
@extesy https://www.furaffinity.net/ still does not work, showing the same error. Direct image links on the site still work as expected. This makes me think the error message is being sent when part of the prepareFromDocument function is triggered: chrome.runtime.sendMessage({action:'ajaxRequest', url: url, method: 'GET'}, function(data) { The error occurs on many other sites, but without affecting functionality. Options can be saved for me as well, despite the connection error showing. I'm not sure how to fix it. The background worker is online when it happens. It's like the listener just doesn't exist. It may be related to the listener not registering in time: https://developer.chrome.com/docs/extensions/develop/migrate/to-service-workers#register-listeners |
@LiliaDoe How about now? I checked https://www.furaffinity.net and I don't see connection errors in console. |
@extesy I see it working on Chrome too, but the error still persists on Firefox. I'll see if the Mozilla docs have anything about this (https://extensionworkshop.com/documentation/develop/manifest-v3-migration-guide/) Edit: I found an error in the background page. importScripts is throwing an error, but only in Firefox:
Fixing it didn't seem to fix it not working, though. Also, onMessage in background.js doesn't seem to be called at all in Firefox |
@LiliaDoe I fixed |
|
https://developer.chrome.com/docs/extensions/develop/migrate