webext-bridge icon indicating copy to clipboard operation
webext-bridge copied to clipboard

onMessage on Window does only accept messages from content-script. Messages from Background or Popup are never-resolving Promises.

Open thomasf1 opened this issue 1 year ago • 3 comments

Version

6.0.1

Current Behavior

A onMessage listener in the window context currently only reacts to messages from content-script. Messages from Background or Popup are never-resolving Promises.

Expected Behavior

Messages from Background or Popup to the window context should work.

Steps To Reproduce

  1. add setNamespace and a onMessage listener & on the window context
  2. add allowWindowMessaging and a send message to the content-script context -> the sendMessage resolves / works
  3. add a send message to the popup context -> the sendMessage never resolves / doesn´t work

Anything else?

No response

thomasf1 avatar Nov 01 '24 11:11 thomasf1

Same here. Can someone confirm this?

shaneapen avatar Dec 14 '24 13:12 shaneapen

Same here. Can someone confirm this?

Hey... Did figure that out: it was a missing "tabs" permission. Was then giving up on it rather then adding extra permissions.

thomasf1 avatar Dec 14 '24 13:12 thomasf1

Thanks for the reply @thomasf1 ! I do have tabs permission added in my manifest though.

shaneapen avatar Dec 14 '24 13:12 shaneapen