-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
FLV.js Stream Release Issue with Sentry #13950
Comments
Hey, thank you for the detailed report! Just to be sure, you are not using If replay is not added, then the problem is most likely what you alluded to already. We'll look into it! |
Hi @mydea I have actually tested both versions—one with replayIntegration and one without it—and the issue occurs in both cases. |
Thanks for investigating. We will probably make the stream instrumentation opt-in then, as it appears that this is not 100% safe for us to patch and hard to handle all edge cases - see #13951 |
A PR closing this issue has just been released 🚀This issue was referenced by PR #13951, which was included in the 8.35.0-beta.0 release. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
Sentry Browser CDN bundle
SDK Version
via cdn (https://js.sentry-cdn.com/bfb3eb790cf5b7cc59d23d07aa079024.min.js)
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
Hi Sentry team,
In my project, I am using flv.js to stream video, and it has been working well. However, after integrating Sentry.js, I encountered two issues:
Issue 1:
There was a memory leak, which I believe has been addressed in this issue.
Issue 2:
The stream cannot be released. When using
flv.js
'sdestroy()
method, the connection is not properly closed, even though this API works fine without Sentry integration.Since Issue 1 seems to have been resolved, I am focusing solely on Issue 2 in this report.
Steps to Reproduce
index.html
with the following content:index.js
with the following content:Expected Result
The resources should be properly released after 10 seconds, as shown in below
Actual Result
The connection is not released and stays open, as shown in below
Additional Information:
I also noticed that in
packages/utils/src/instrument/fetch.ts
,response.clone()
is used to split off a newReadableStream
. Since flv.js on Chrome does not use abort signals but instead cancels the stream using thecancel()
API, flv.js is unaware of the Sentry-generatedReadableStream
branch. As a result, flv.js cannot cancel Sentry's stream branch, causing Chrome to think there is still an active reader, preventing the release of resources.Below is the related part of flv.js:
At line 174:
At line 212:
The text was updated successfully, but these errors were encountered: