krakenjs / post-robot

Cross domain post-messaging on the client side using a simple listener/client pattern.
Apache License 2.0
741 stars 92 forks source link

Permission denied to access object on Firefox #78

Closed jducro closed 3 years ago

jducro commented 5 years ago

When I try to use post-robot with firefox I get this error:

Error: postrobot_message_ack postrobot_ready error:
  - postrobot_post_message: Permission denied to access object
Screenshot 2019-04-17 at 12 02 51

Things works fine with Chrome.

Any idea how I could debug that?

Thanks

jducro commented 5 years ago

Here's where I use post-robot: https://github.com/deskpro/apps-libs/blob/master/packages/apps-sdk/src/Widget/WidgetWindowBridge.js#L202

jcubic commented 3 years ago

Not sure if this is related, but I've found that iframe for Cross-Domain localStorage require to have CORS enabled on Firefox, I have no idea why. I've written that in this article: Cross-Domain LocalStorage.

mnicpt commented 3 years ago

@jducro First of all, sorry your question is just now being addressed. Have you tried enabling CORS as @jcubic has mentioned? It doesn't surprise me that Firefox is requiring that. Let me know if it works for. If it doesn't, we can dig a bit more.

jducro commented 3 years ago

@mnicpt the project this was used in is deprecated, I can't test that anymore, I'll close the issue.