Closed mrlika closed 4 months ago
This also seems like it breaks in production environment. It is a big blocker to use Sentry with Expo at the moment.
+1. I am also seeing this in non-ExpoGo environments.
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
Hi @mrlika,
sentry-expo
was recently deprecated in favor of @sentry/react-native
which supports Expo out of the box now.
I've tried the example code in the Expo sample app. And the output is as expected RESULT [0, 1, 2, 3, 4, 5, 6]
.
<Button
title="Capture message"
onPress={() => {
// Sentry.captureMessage('Captured message');
function* g(n: number) {
let i = 0;
while (i !== n) yield Promise.resolve(i++);
}
async function run() {
console.log('RESULT', await Promise.all(g(7)));
}
run();
}}
/>
Let us know if @sentry/react-native
fixes it for you and if not please open a new issue in https://github.com/getsentry/sentry-react-native
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.
Summary
Sentry in Expo Go environment breaks Promise.all + generator. The code sample:
This code should output
RESULT [0, 1, 2, 3, 4, 5, 6]
, but it outputsRESULT []
after the first and next hot reloads (i.e. code changes) if Senty is on in the Expo Go environment. It breaks all the following calls to Promise.all + generator.Setting
enableInExpoDevelopment: false
inSentry.init
fixes the issue.Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
49
Environment
Reproducible demo or steps to reproduce from a blank project