-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
Infinite looping on app startup #3205
Comments
Hi, You can fix it like this: https://docs.expo.dev/guides/using-sentry/#troubleshooting import * as Sentry from 'sentry-expo';
import * as Network from 'expo-network';
const devServerPort = 8081;
let devServerIpAddress: string | null = null;
Network.getIpAddressAsync().then(ip => {
devServerIpAddress = ip;
});
Sentry.init({
tracesSampleRate: 1.0,
integrations: [
new Sentry.Native.ReactNativeTracing({
shouldCreateSpanForRequest: url => {
return !__DEV__ || !url.startsWith(`http://${devServerIpAddress}:${devServerPort}/logs`);
},
}),
],
}); |
@krystofwoldrich The fix doesn't seem to work for me. I still get the infinite logs. |
same here. |
1 similar comment
same here. |
Thank you for the comments. Could anyone check what are the HTTP requests causing the issue? Note you might need to adjust the devServerPort or remove it from like this: import * as Sentry from 'sentry-expo';
import * as Network from 'expo-network';
let devServerIpAddress: string | null = null;
Network.getIpAddressAsync().then(ip => {
devServerIpAddress = ip;
});
Sentry.init({
tracesSampleRate: 1.0,
integrations: [
new Sentry.Native.ReactNativeTracing({
shouldCreateSpanForRequest: url => {
return !__DEV__ || !url.startsWith(`http://${devServerIpAddress}`);
},
}),
],
}); Does the new snippet fix the code? |
It works! Thx @krystofwoldrich
LOG Sentry Logger [log]: Integration installed: ModulesLoader
LOG Sentry Logger [log]: Unhandled promise rejections will be caught by Sentry.
LOG Sentry Logger [log]: Integration installed: ReactNativeErrorHandlers
LOG Sentry Logger [log]: Integration installed: Release
LOG Sentry Logger [log]: Integration installed: InboundFilters
LOG Sentry Logger [log]: Integration installed: FunctionToString
LOG Sentry Logger [log]: Integration installed: Breadcrumbs
LOG Sentry Logger [log]: Integration installed: LinkedErrors
LOG Sentry Logger [log]: Integration installed: Dedupe
LOG Sentry Logger [log]: Integration installed: HttpContext
LOG Sentry Logger [log]: Integration installed: EventOrigin
LOG Sentry Logger [log]: Integration installed: SdkInfo
LOG Sentry Logger [log]: Integration installed: ReactNativeInfo
LOG Sentry Logger [log]: Integration installed: DebugSymbolicator
LOG Sentry Logger [log]: Integration installed: RewriteFrames
LOG Sentry Logger [log]: Integration installed: DeviceContext
LOG Sentry Logger [log]: [ReactNativeTracing] Native frames instrumentation initialized.
LOG Sentry Logger [log]: [ReactNativeTracing] Not instrumenting route changes as routingInstrumentation has not been set.
LOG Sentry Logger [log]: Integration installed: ReactNativeTracing
LOG Sentry Logger [log]: Integration installed: ExpoBareIntegration
LOG Sentry Logger [log]: Setting idle transaction on scope. Span ID: 9fedaf8f2c349972
LOG Sentry Logger [log]: [Tracing] starting ui.load transaction - App Start
LOG Sentry Logger [log]: Starting heartbeat
LOG Sentry Logger [log]: pinging Heartbeat -> current counter: 0
LOG Sentry Logger [log]: [ReactNativeTracing] Starting ui.load transaction "App Start" on scope
LOG Sentry Logger [log]: [Tracing] Starting 'app.start.warm' span on transaction 'App Start' (9fedaf8f2c349972).
LOG Sentry Logger [log]: [Tracing] finishing IdleTransaction 2023-09-29T15:13:27.624Z ui.load
LOG Sentry Logger [log]: [StallTracking] Stall measurements were not added to transaction due to exceeding the max count.
LOG Sentry Logger [log]: [Tracing] flushing IdleTransaction
LOG Sentry Logger [log]: [Measurements] Adding measurements to transaction {
"app_start_warm": {
"value": 32896.54296875,
"unit": "millisecond"
}
}
LOG Sentry Logger [log]: [Tracing] Finishing ui.load transaction: App Start.
LOG Sentry Logger [log]: [NativeFrames] Native frames timed out for ui.load transaction App Start. Not adding native frames measurements.
LOG Sentry Logger [log]: Integration installed: ModulesLoader
LOG Sentry Logger [log]: Unhandled promise rejections will be caught by Sentry.
LOG Sentry Logger [log]: Integration installed: ReactNativeErrorHandlers
LOG Sentry Logger [log]: Integration installed: Release
LOG Sentry Logger [log]: Integration installed: InboundFilters
LOG Sentry Logger [log]: Integration installed: FunctionToString
LOG Sentry Logger [log]: Integration installed: Breadcrumbs
LOG Sentry Logger [log]: Integration installed: LinkedErrors
LOG Sentry Logger [log]: Integration installed: Dedupe
LOG Sentry Logger [log]: Integration installed: HttpContext
LOG Sentry Logger [log]: Integration installed: EventOrigin
LOG Sentry Logger [log]: Integration installed: SdkInfo
LOG Sentry Logger [log]: Integration installed: ReactNativeInfo
LOG Sentry Logger [log]: Integration installed: DebugSymbolicator
LOG Sentry Logger [log]: Integration installed: RewriteFrames
LOG Sentry Logger [log]: Integration installed: DeviceContext
LOG Sentry Logger [log]: [ReactNativeTracing] Native frames instrumentation initialized.
LOG Sentry Logger [log]: [ReactNativeTracing] Not instrumenting route changes as routingInstrumentation has not been set.
LOG Sentry Logger [log]: Integration installed: ReactNativeTracing
LOG Sentry Logger [log]: Integration installed: ExpoBareIntegration [Update] On Android when Dev Client App is restarted the lopping occurs and after some time return the error: ERROR Sentry Logger [error]: Error while sending event: [Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.
[[10,26],[1,0],[[11473,100,1696006958024,false]],13142]] |
@gloredo Thanks, happy to hear the fix works.
|
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: 5.5.0
react-native
version: 0.72.3Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
Configuration:
(
@sentry/react-native
)I have following issue:
Sentry is infinitely looping with an app startup log. Refreshing my development client fixes it. It only happens when I open it for the first time.
Screenshot.-.20.July.2023.mp4
This started after upgrading to SDK 49.
Steps to reproduce:
I'm not sure how to reproduce this, or why it's happening.
Actual result:
Infinite looping.
Expected result:
No infinite looping.
The text was updated successfully, but these errors were encountered: