-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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]: JavascriptException: Error: stream.push() after EOF, js engine: hermes #1914
Comments
@sanduluca what was the previous working version you were using? What are the steps to reproduce the issue? Does it happens randomly? |
We were not using the mqtt before this. |
It's hard based on that log to say what could trigger that, could you try to at least provide me a valid stack trace? Something that points me to the line that is triggering the issue. IMO giving that we treat react native as a browser and it is using Line 263 in 2da3b34
MQTT.js/src/lib/BufferedDuplex.ts Line 59 in 2da3b34
I dunno if adding a check before the push could fix the issue @mcollina any hint? |
Try using version 5.9.1 |
Ok, after releasing a few new updates to our users with new mqtt version we still receive // package.json
"mqtt": "^5.9.1", // yarn.lock
mqtt-packet@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/mqtt-packet/-/mqtt-packet-9.0.0.tgz#fd841854d8c0f1f5211b00de388c4ced45b59216"
integrity sha512-8v+HkX+fwbodsWAZIZTI074XIoxVBOmPeggQuDFCGg1SqNcC+uoRMWu7J6QlJPqIUIJXmjNYYHxBBLr1Y/Df4w==
dependencies:
bl "^6.0.8"
debug "^4.3.4"
process-nextick-args "^2.0.1"
mqtt@^5.2.0, mqtt@^5.9.1:
version "5.9.1"
resolved "https://registry.yarnpkg.com/mqtt/-/mqtt-5.9.1.tgz#422ded61d432b995d931ae4d9c470684f33e3289"
integrity sha512-FMENfSUMfCSUCnkuUVAL4U01795SUEfrX0NZ53HNr1r2VNpwKhR5Au9viq9WCFGtgrDAmsll4fkloqFCFgStYA==
dependencies:
"@types/readable-stream" "^4.0.5"
"@types/ws" "^8.5.9"
commist "^3.2.0"
concat-stream "^2.0.0"
debug "^4.3.4"
help-me "^5.0.0"
lru-cache "^10.0.1"
minimist "^1.2.8"
mqtt "^5.2.0"
mqtt-packet "^9.0.0"
number-allocator "^1.0.14"
readable-stream "^4.4.2"
reinterval "^1.1.0"
rfdc "^1.3.0"
split2 "^4.2.0"
worker-timers "^7.1.4"
ws "^8.17.1" The error seems to come from onMessage
Here: Line 264 in 395e066
|
@sanduluca I'm sorry but I'm not able to reproduce this issue anyway, could you try to fix this yourself and submit a PR? For what I know that issue happens when writing to a stream that is destroyed and the check is there now, no clue whatever could cause that :( there is also another check here MQTT.js/src/lib/BufferedDuplex.ts Line 59 in 395e066
As the proxy could be a buffered duplex so there are 2 sreams to handle |
I am also planning to integrate mqtt with react native. We operate at a high scale. Should this crash be concerning in that case? Also if we keep a variable to establish whether the connection is open or not and receive message only if connection is established, will that help? Example of the implementation
} |
Also currently my use case is only to read messages on frontend and not publish. Will this crash occur on reads as well? |
@Virendra121998 I tried to reproduce this on my side without success, I sincerly have no clue what's the reason and I'm not sure if #1932 could be a fix |
MQTTjs Version
5.8.0
Broker
AWS
Environment
React Native (engine: Hermes)
Description
After releasing a new version of out react native app with the mqtt feature we started receiving crashes in Firebase crashlytics.
This is the only issue I found related to this problem
nodejs/readable-stream#207
Code
Minimal Reproduction
Unfortunately we cannot reproduce this locally. We are only recording crashes in Firebase Crashlytics
Debug logs
The text was updated successfully, but these errors were encountered: