-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
[BUG] sendViaRelay works in Chrome but not Firefox #445
Comments
This is likely the case - if you're already investigating this, can you take a look at what port API is FF supporting and do they expose them under the chrome namespace or the browser namespace? - We might need to add the polyfill to messaging API in the next version. Would love some help on investigating this! |
ah @louisgv, this looks like a known problem:
It looks like Mozilla has a pretty extensive polyfill for going from There's of course this little gem from the Chromium bug report:
Which means that places like sendMessage's callback need to be changed? I don't have the skill to switch things over to using the polyfill, but would be happy to test a build of |
One issue with this polyfill is that it's more or less just a promisified module over The error it throws break a bunch of stuff in a manner that has no way to go around them lol @kenkantzer-truss The new Relay API should decoupled from the chrome.runtime stuff so you can now walk around this issue. I've created a PR to switch over to the new promise API as well, which will hopefully fix the issue you are having with chrome runtime: |
oo, thanks @louisgv - is this PR in @plasmohq/messaging 0.1.4 yet? happy to I give it a try! |
@weltan yup, please try it out! |
What happened?
Firstly, thanks for making this framework - I have a chrome extension, works great.
I'm trying to port the extension to firefox. I've narrowed down the issue to a hanging call to
@plasmohq/messaging
:As context, I'm calling
sendViaRelay
within our web app, which is within an iframe, inside of popup.ts:This is working in Chrome (the only trick there was making sure to set
all_frames: true
), but for some reason, Firefox doesn't seem to likesendViaRelay
(I'd show a console log error message, but sadly, firefox doesn't allow you to see console messages for iframes within popup - makes this more challenging!).Is
sendViaRelay
and firefox not playing nice a known thing?Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
Firefox
Relevant log output
(OPTIONAL) Contact Details
[email protected]
Code of Conduct
The text was updated successfully, but these errors were encountered: