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

Cannot read property 'sendMessage' of undefined #533

Open
davebleekerpm opened this issue Jul 20, 2021 · 1 comment
Open

Cannot read property 'sendMessage' of undefined #533

davebleekerpm opened this issue Jul 20, 2021 · 1 comment

Comments

@davebleekerpm
Copy link

Our bug tracking system is reporting "Cannot read property 'sendMessage' of undefined" coming from the faye library.
This does not happen everytime or for all users or on a specific action or message.

The full stack we have so far is:

Error: Cannot read property 'sendMessage' of undefined
at c._sendEnvelope in

Upon further investigating we found that the error was either that _transport or dispatched or undefined at the moment of this error. Creating a safeguard on our end would result in this being overwritten upon deploy, when it will do a npm install to fetch the latest faye package.

Is this a known issue, and is there any resolution for this?

Kind regards,
Dave Bleeker

@jcoglan
Copy link
Collaborator

jcoglan commented Jul 20, 2021

It looks like you're referring to the Dispatcher._sendEnvelope() function. This has a guard the start to check that this._transport exists, and the call to this._transport.sendMessage() is synchronous with that guard. You'd need to find a way for this._transport to become unset between the guard passing and sendMessage() being called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants