-
-
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
Fetch resolves before response has been received; response is undefined #13187
Comments
Hey @andreasphil thanks for reaching out. The PR you mentioned should not affect your original fetch call, as we just try to clone the response and resolve it in parallel. Does the endpoint you are calling make use of SSE? Anyway, I'll try to verify your issue and get back to you. |
@chargome Thanks for the quick reply! Yes, it might be unrelated. I'm not familiar with the Sentry code base, just did some quick scanning of the changelogs since v8.20 to see if anything catches my attention. We're not using SSE. Thanks for looking into it and let me know if you need more information. |
We have been hit by the same issue and are rolling back to 8.20.0. It looks to be related to #12723 |
@esetnik are you also using the @sentry/vue SDK? |
No we are using |
@andreasphil I couldn't reproduce this issue with a long running browser fetch request from vue (15s) - everything still worked with 8.22. Will try to see if useFetch has any impact. Do you have any details on how the request is handled on the server side? @esetnik Could you also provide more details on your setup, maybe we can pin down the issue faster this way. A small reproducible example would be really helpful for fixing this issue. |
@chargome On the server side we're using a pretty standard Java Spring Boot REST API. This is one of the controllers for the requests that were starting to reliably cause issues after the SDK update. FWIW all our code is public in the repo I linked (frontend + backend). It's not a small codebase though so I don't expect you to read all of it, but maybe it still helps. Unfortunately I'm not sure if I will find the time to create a reproducible example but I'll see what I can do next week. |
@andreasphil thanks, let's see if we can reproduce it somehow. |
I believe it's related to aborted fetch requests. We use an AbortController to abort the requests and seem to be seeing this only on endpoints where we actually frequently abort fetch requests. |
@esetnik good catch, I was about to say something similar. I did some debugging with our app including the Sentry SDK, here are some findings:
This is where I'm going to stop for today but hope that helps. And again, thanks for looking into it! |
thanks for validating @andreasphil and to everyone who runs into this, sorry for the trouble, we're on this to fix! Appreciate all the help. |
Hi all, we just released version |
Version 8.22 caused issues for us, see: getsentry/sentry-javascript#13187 This should be fixed now, so upgrade to 8.23 and allow automatic updating again. RISDEV-0000
@lforst I can confirm the issue is fixed for us. Thank you! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/vue
SDK Version
8.22.0
Framework Version
Vue 3.4.35
Link to Sentry event
No response
Reproduction Example/SDK Setup
Unfortunately I don't have a reproduction, but this is our setup:
(Note that I debugged useFetch and it seems to not be a useFetch issue, see Steps to Reproduce below)
Steps to Reproduce
Summary: for some long-running (a few seconds, but <10s),
fetch
resolves before the actual request has finished. This leads to the fetch response beingundefined
. Anything accessing properties of the response then crashes. Reverting to @sentry/vue v8.20.0 fixes the issue.Example:
Looking at the network dev tools and server logs, I can verify that the request is fulfilled successfully. However it seems that fetch resolves before the request has finished, with
undefined
as the value for theresponse
.Possibly related:
Expected Result
Fetch should not resolve before the request is finished, and
response
should not beundefined
.Actual Result
Fetch resolves before the request has finished,
response
isundefined
, and accessing properties of the response causes errors.The text was updated successfully, but these errors were encountered: