Closed rauldeheer closed 1 year ago
I downgraded sentry-expo
to version 4.2.0
and everything works now.
Is this a duplicate of #285?
I'm on Expo 47 and did the following;
npm uninstall @sentry/react-native --save
npm install sentry-expo@4.2.0 --save
And then in my App.js I have the following:
import * as Sentry from "sentry-expo";
import { CaptureConsole } from "@sentry/integrations";
LogBox.ignoreLogs(["Sentry Logger [warn]: Session tracking in non-browser environment with @sentry/browser is not supported."]);
Sentry.Browser.init({
dsn: Constants.expoConfig.extra.sentry.dsn,
enableInExpoDevelopment: true,
debug: !!__DEV__,
integrations: [
new CaptureConsole({
levels: ["error"],
}),
],
});
It is a workaround that still does logging to Sentry in local dev. Not yet tried in production
npx create-expo-app my-app
cd my-app
npx expo install sentry-expo
npx expo install expo-application expo-constants expo-device expo-updates @sentry/react-native
// App.js
import * as Sentry from 'sentry-expo';
Sentry.init({
dsn: '***',
enableInExpoDevelopment: true,
debug: true, // If true
, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to false
in production
});
* add config expo plugins (on managed project)
### Same on bare workflow after sentry-wizard install and eas build
functional sentry with sentry-expo@6.0.0 would be very helpful
I did what @rauldeheer did and that seems to fix it for me too. But now the CLI nags me;
Some dependencies are incompatible with the installed expo version:
sentry-expo@4.2.0 - expected version: ~6.0.0
Yeah, the nagging is an issue. Also, having expo doctor auto-fix issues will update it to the broken version.
I was sad to see that upgrading from 5.x to 6.x when I went from expo sdk 46 to 47 didn't address the issue.
I downgraded
sentry-expo
to version4.2.0
and everything works now.
It works fine on development enviroment but on productions doesn't work. When you open the app in production enviroment the app crashes and throw following error in sentry dashboard "NativeArgumentsParseException: RNSentry.captureEnvelope got 3 arguments, expected 4"
I have Sentry working with Expo 47 and EAS build. I have more info in this ticket if people want to see my config setup: https://github.com/expo/sentry-expo/issues/285. Hopefully that helps some of you all.
@gregdburns @NikkiDelRosso I can confirm that Expo 47 and sentry-expo@6.0.0 working great on Sentry Cloud. This is where it finds the subtlety, it does not work on our self-hosted sentry due to the old version we use.
@ExGiX That error happens because of a miss match of the JS SDK and the native functions. You have to rebuild the whole app including the native bits.
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.
I have same issue on 48 sdk also. I add sentry how in documentation but sentry not display on the sentry ui.
Also seeing a build issue on expo 47 & 48. Had to uninstall sentry-expo to get a green build
Ok, after days of being stuck on this issue, I finally found my problem. I never created a SENTRY_AUTH_TOKEN env variable 🤦♂️
@raulsanchez1024 Hi, Im sorry about that. This sound like something that should be in the docs, what page were you looking at?
@rauldeheer, hi, that works for me too, but subversions are recognized as issues by expo-doctor. and higher versions of sentry support many advantages. anyone have a solution to get the higher version working?
Any updates on this?
There's a variety of different issues reported in this thread, along with a number of solutions/discoveries that addressed them. I'm going to close this issue as there doesn't seem to be anything actionable left for us. Feel free to open a new issue if you're experiencing any issues.
the original problem still exists and the only working solution is downgrading to version 4.2.0 that cant be the final soluton?
Summary
I'm setting up Sentry just as it is described in the documentation here, but my Sentry dashboard remains empty when I submit an intentional error. I'm not getting any errors or warnings except for this one:
Because I've intentionally used the environment variables as described in the docs.
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, iOS
SDK Version (managed workflow only)
47.0.8
Environment
expo-env-info 1.0.5 environment info: System: OS: macOS 13.0 Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.12.0 - ~/.nvm/versions/node/v18.12.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 9.1.1 - ~/.nvm/versions/node/v18.12.0/bin/npm IDEs: Xcode: /undefined - /usr/bin/xcodebuild npmPackages: expo: ~47.0.8 => 47.0.8 react: 18.1.0 => 18.1.0 react-native: 0.70.5 => 0.70.5 npmGlobalPackages: eas-cli: 2.8.0 Expo Workflow: managed
Reproducible demo or steps to reproduce from a blank project
I've followed the exact steps as described in the docs. So:
App.tsx:
Then I create an error and capture it manually:
AnyFile.tsx:
As you can see I'm actually logging the eventId that Sentry supposedly makes, according to the js-docs. I'm receiving an ID as expected.