Closed overhearapp closed 2 months ago
@overhearapp thanks for reporting - when did this happen, and does the problem persist? We're investigating an issue with the /projects
endpoint that could've caused this and should be resolved already.
its been happening the past few days. This is my first attempt at using Sentry so i don't have a previous success to compare to.
Thanks for the quick reply - this is not related to the endpoint then. We'll need to take a closer look, thanks for providing a lot of context!
Btw. please make sure you don't set the auth token in your app.json (see "note": "SENTRY_AUTH_TOKEN",
above) - you probably don't, just wanted to make sure.
additionally I see that Ignite provides this also:
/**
* If you're using Sentry
* Expo https://docs.expo.dev/guides/using-sentry/
*/
import * as Sentry from "@sentry/react-native"
/**
* If you're using Crashlytics: https://rnfirebase.io/crashlytics/usage
*/
// import crashlytics from "@react-native-firebase/crashlytics"
/**
* If you're using Bugsnag:
* RN https://docs.bugsnag.com/platforms/react-native/)
* Expo https://docs.bugsnag.com/platforms/react-native/expo/
*/
// import Bugsnag from "@bugsnag/react-native"
// import Bugsnag from "@bugsnag/expo"
/**
* This is where you put your crash reporting service initialization code to call in `./app/app.tsx`
*/
export const initCrashReporting = () => {
Sentry.init({
dsn: "MY_DSN",
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
})
// Bugsnag.start("YOUR API KEY")
}
/**
* Error classifications used to sort errors on error reporting services.
*/
export enum ErrorType {
/**
* An error that would normally cause a red screen in dev
* and force the user to sign out and restart.
*/
FATAL = "Fatal",
/**
* An error caught by try/catch where defined using Reactotron.tron.error.
*/
HANDLED = "Handled",
}
/**
* Manually report a handled error.
*/
export const reportCrash = (error: Error, type: ErrorType = ErrorType.FATAL) => {
if (__DEV__) {
// Log to console and Reactotron in development
const message = error.message || "Unknown"
console.error(error)
console.log(message, type)
} else {
// In production, utilize crash reporting service of choice below:
// RN
Sentry.captureException(error)
// crashlytics().recordError(error)
// Bugsnag.notify(error)
}
}
DSN redacted.
however if i use this instead of changing App.tsx i still get the same issue.
if my
"SENTRY_AUTH_TOKEN": "@SENTRY_AUTH_TOKEN",
"SENTRY_PROJECT": "@SENTRY_PROJECT",
"SENTRY_ORGANISATION": "@SENTRY_ORGANISATION"
somehow have typos, which i'm pretty sure they don't. would that trigger the error i have above?
also double checking this contains my organisation slug
and this my project slug?
Yes this is where you can look up your Organisation and Project slugs. If you're logged into https://sentry.io and navigate to https://docs.sentry.io/platforms/react-native/manual-setup/expo/ the code snippets will also pre-populate with correct values - you can use that to double-check. Also if the token is incorrect you should get a different error.
Are you on US or EU servers? If you're on EU, you might wanna try a newer version of the SDK which bundles a newer version of our sentry-cli
with some compatibility fixes for the EU data region.
I'm on EU servers. I've updated the SDK using the wizard. now I'm getting this error instead.
i notice that the wizard updated my metro.config.js with:
// Learn more https://docs.expo.io/guides/customizing-metro
const { getSentryExpoConfig } = require('@sentry/react-native/metro');
const {
withSentryConfig
} = require("@sentry/react-native/metro");
/** @type {import('expo/metro-config').MetroConfig} */
const config = getSentryExpoConfig(__dirname);
config.transformer.getTransformOptions = async () => ({
transform: {
// Inline requires are very useful for deferring loading of large dependencies/components.
// For example, we use it in app.tsx to conditionally load Reactotron.
// However, this comes with some gotchas.
// Read more here: https://reactnative.dev/docs/optimizing-javascript-loading
// And here: https://github.com/expo/expo/issues/27279#issuecomment-1971610698
inlineRequires: true,
},
});
// This helps support certain popular third-party libraries
// such as Firebase that use the extension cjs.
config.resolver.sourceExts.push("cjs")
module.exports = withSentryConfig(config);
Hi @overhearapp,
your previous configuration was correct, @sentry/wizard
is not yet compatible with Expo projects.
The Upload Debug Symbols to Sentry
build stage uploads native debug files, source maps are uploaded during bundling JS.
To avoid the failed build due to failed upload you can temporarily use SENTRY_ALLOW_FAILURE=true
.
I was unable to reproduce the same error (using eu org and org token), to investigate further can you use your previous configuration (https://docs.sentry.io/platforms/react-native/manual-setup/expo/) and add the following env SENTRY_CLI_EXTRA_ARGS="--force-foreground --log-level=debug"
and share the output of the failed build phase with us.
Closing this due to inactivity. If this is still an issue feel free to comment here or open a new issue if the context changed.
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: "~5.22.0"
react-native
version: "0.74.2"Are 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:
[Link to issue]
Configuration:
(
@sentry/react-native
)DSN redacted or
(
react-native-sentry
)I have the following issue:
Using eas build for ios I get
Steps to reproduce: Note i'm using the Ignite boilerplate v9.7.1 and Expo 51 installed with npx expo install @sentry/react-native
I've followed Use Sentry instructions from Expo and changed the following files:
App.tsx
i've added this to app.json
metro.config.js
and i'm using eas secrets to store my credentials in eas.json: "production": { "env": {
},
the sentry docs here https://docs.sentry.io/platforms/react-native/manual-setup/expo/ have some other additons I've tried too:
I've redacted my name, slug, updates url and eas projectid etc
Actual result:
see issue above
Expected result:
a successful build.