-
-
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
Sentry.wrapRemixHandleError
missing request information
#10002
Comments
I spent some time debugging this locally and think it may be related to this code: sentry-javascript/packages/remix/src/utils/web-fetch.ts Lines 34 to 47 in 679e149
I do not see any of these internals defined as I debug this, so this function always returns undefined symbols and Remix fails to normalize the request: I wonder why Sentry needs to do this conversion instead of reading the standard |
Hi @clovis1122, thanks for reporting. I have tried to reproduce this locally with the latest SDK and Remix 2.4.1 and did not see any problems with the request data getting attached.
We are replicating the behaviour of Remix (web-fetch) while extracting information from requests for consistency. Could you please provide us a reproduction so we can debug it further? |
@onurtemizkan I took a second look at this. It seems the code relies on Remix's polyfill for NodeJS's fetch API. The
However, this polyfill should not be needed, starting on NodeJS v18 which includes the Fetch API enabled by default. I do not use it in my app (which runs on Node v20). Sentry should not read Remix internals either. A backward-compatible, future-proof solution is to read from the standard request directly.
This implementation can be modified to read from request using the standard interface. The request's URL is available via |
@clovis1122, I opened a PR which adds support for non-polyfilled Thanks again for reporting. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/remix
SDK Version
7.91.0
Framework Version
2.4.1
Link to Sentry event
https://recruitercom.sentry.io/issues/4787393394/?project=4504806528253952&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=24h&stream_index=0
SDK Setup
No response
Steps to Reproduce
Expected Result
Sentry log the error with request information
Actual Result
Sentry is logging the error without request information.
The text was updated successfully, but these errors were encountered: