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 being undefined. Anything accessing properties of the response then crashes. Reverting to @sentry/vue v8.20.0 fixes the issue.
Example:
fetch("some-long-running-request").then((response) => {
// Now response is sometimes undefined, so the following would lead to a TypeError:
if (response.status === 400) {
// ...
}
})
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 the response.
Possibly related:
Expected Result
Fetch should not resolve before the request is finished, and response should not be undefined.
Actual Result
Fetch resolves before the request has finished, response is undefined, and accessing properties of the response causes errors.
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),
fetchresolves 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
undefinedas the value for theresponse.Possibly related:
Expected Result
Fetch should not resolve before the request is finished, and
responseshould not beundefined.Actual Result
Fetch resolves before the request has finished,
responseisundefined, and accessing properties of the response causes errors.