Open Hathoriel opened 2 days ago
Looks like the Sentry dashboard received the error event, but the build is still having the same error.
Hi @Hathoriel, thank you for the message and all the details,
based on your last update, I assume the build error was not present before adding Sentry to the project.
Is the correct? Or was the issue that error was not reported to Sentry?
At the moment I don't see any relation to Sentry and loading the Appearence.js
.
Does the same happens when using the official export import {Appearance} from 'react-native';
?
Hi @Hathoriel, thank you for the message and all the details,
based on your last update, I assume the build error was not present before adding Sentry to the project.
Is the correct? Or was the issue that error was not reported to Sentry?
Yes It is correct, before this error message was not present.
It looks like the metro/expo is building web and IOs versions in parallel when I run
expo run:ios
Looks like the problem affects only the web build, not the IOs. And errors are sent to the Sentry when something throws. So the IOS version looks good, but the problem is with Web.
I don't need web for now, it would be best if I can something hide it or turn off.
When I commented out import
import { setColorScheme } from "react-native/Libraries/Utilities/Appearance";
The issue disappeared. But now I see different one.
Metro error: Failed to install react-native-quick-crypto: The native `QuickCrypto` Module could not be found.
* Make sure react-native-quick-crypto is correctly autolinked (run `npx react-native config` to verify)
* Make sure you rebuilt the app.
34 | }
35 | message += '\n* Make sure you rebuilt the app.';
> 36 | throw new Error(message);
| ^
37 | }
38 |
39 | // see #333, commenting this may allow the library to work in new architecture
Good that at least something changed. 👍
Thank you for the details,
when Sentry runs in development mode it uses the Metro Dev server to symbolicate the stack trace of errors. This makes request to the server which triggers the web build.
Could you confirm for me, if you disable the local symbolication the errors are not happening? Note this does not effect release build which are symbolicated on the Sentry servers.
To disable the local symbolication add the following to your Sentry.init
options.
integrations(integrations) {
return integrations.filter(i => i.name !== 'DebugSymbolicator');
},
Oh nice @krystofwoldrich, looks like this helped! I don't see any errors now in the console.
Could you confirm for me, if you disable the local symbolication the errors are not happening? Note this does not effect release build which are symbolicated on the Sentry servers.
So It means that release build will be OK? And also source mapping will work?
Thank you so far @krystofwoldrich for your help, much appreciated.
Metro Error Unable to resolve module Appearance.js when running simulator locally with
I installed sentry-react via wizard.
When I run
The app itself not crashes but there are errors in the build and Sentry is not working.
My files: App.json
_layout.tsx
metro.config.js
package.json
Could you please help me what I am doing wrong?
Thank you.