-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Require cycle fetch #2080
Comments
@KrisLau which SDK version? please edit your issue with the but template |
@marandaneto Done sorry! |
@KrisLau we'd need to know the Sentry React Native version, See https://github.com/getsentry/sentry-react-native/releases I don't see anything related to Sentry in the Actual result error message. @AbhiPrasad Are you aware of such cycle warning with node and/or tracing? |
@marandaneto @AbhiPrasad Looks like this could be caused because the JS sdk uses |
Fetch instrumentation is part of both As only the |
Thanks for the input, I'm not entirely sure, @jennmueng ideas? |
Related to facebook/react-native#23130 |
Apparently, we have to do something like #1144
|
I think the solution is to have a case for React Native here |
That's a good point but if you look at https://github.com/getsentry/sentry-react-native/pull/1144/files |
In that case it was a straightforward case of I'm struggling a bit to work it all out in my head, but my gut says that there's something here with both us and |
@marandaneto @lobsterkatie I've been able to pinpoint the source of the warning, because we also initialize the browser backend in the React native backend, the browser backend will initialize the fetch transport. Initializing that browser backend with a noop transport removes the warning. Will look into this deeper and find the best way to fix this as we will still need to use the fetch transport when native is disabled. |
Ok after further investigation here are the lines that triggers the require cycle. when the browser backend calls I assume it's something with how React Native lazy-initializes some functionality and fetch seems to be one of them. The line calling fetch("").catch((e) => {}); Also, calling |
@lobsterkatie or @AbhiPrasad Since this relies on the browser SDK, do you have any ideas on how to fix this? thanks. |
We currently don't have the cycles to investigate as we are focusing on the major JS SDK bump. The major version does change how transports work, so let's re-visit this after that! |
Thanks @AbhiPrasad |
That's fixed by the JS SDK bump, https://github.com/getsentry/sentry-react-native/releases/tag/4.1.0 |
Environment
How do you use Sentry?
Sentry SaaS (sentry.io)
Which SDK and version?
Steps to Reproduce
Expected Result
No require cycle upon running the app
Actual Result
Getting a require cycle warning from
sentry-react-native
:The text was updated successfully, but these errors were encountered: