Skip to content
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

tabId is null when stream.send from background script #82

Open
hinryd opened this issue Mar 1, 2024 · 0 comments · May be fixed by #85
Open

tabId is null when stream.send from background script #82

hinryd opened this issue Mar 1, 2024 · 0 comments · May be fixed by #85
Labels
🧐 Bug: Needs Confirmation Something isn't working, but needs to be confirmed by a team member.

Comments

@hinryd
Copy link

hinryd commented Mar 1, 2024

Version

6.0.1

Current Behavior

When a stream is started by the content script, the tabId information in the endpoint data seems to get lost when it reaches the background script. Consequently, when attempting to send a message back to the content script using stream.send(), a TypeError is thrown.

I attempted a potential fix based on issue #66, which involved commenting out two specific lines of code. However, this resulted in an infinite loop in the aboutIncomingMessage function.

I'm not entirely familiar with the downstream logic, so any assistance in resolving this issue would be greatly appreciated.

Expected Behavior

stream.send() should send the message successfully

Steps To Reproduce

// content-script
const stream = openStream('test-channel', 'background')
// background
onOpenStreamChannel('test-channel', (stream) => {
  stream.onMessage((data) => {
    stream.send(data)
  })
})

Anything else?

No response

@hinryd hinryd added the 🧐 Bug: Needs Confirmation Something isn't working, but needs to be confirmed by a team member. label Mar 1, 2024
@thnt thnt linked a pull request Apr 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧐 Bug: Needs Confirmation Something isn't working, but needs to be confirmed by a team member.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant