-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Issue with source maps and missing artifacts #1350
Comments
What pops out to me as unusual is Also, given that it's what's being set inside the event as well, means this value is being set during runtime somewhere as well, maybe auto-set by sentry-expo? The team over at |
In sentry-expo, we default to Sentry's default (because we want all the errors for build-time sourcemaps to be mapped correctly 😄 ), as you can see here:
So maybe you are passing in a Is there anything in the xcode build logs that indicate those build scripts for uploading sourcemaps are failing? |
Now that I looked at this a second time with fresh eyes, I'm reminded that Sentry dashboard creates a new release for events with release names that don't match any existing ones. So that's probably what you're seeing with the empty releases, so I would look at whatever is setting that value during runtime. |
Hi, guys. Thanks for looking into this for me – it's very much appreciated!
I'm not explicitly passing
As with the previous point, I haven't explicitly set anything like that so unless a version of Does my overall setup look correct? Also, do you have any specific places where you suggest I could look for anything else? I've covered as much as I can in the original post above but if there's anything else then I'd be happy to send it as well. Thanks again, guys. Have a great day and weekend ahead. |
Could it maybe be related to how I'm updating builds? Right now, let's say I'm on version
Whether the last step is running locally or building an Archive for upload, a new Release will be created in Sentry. In the case of this example, it'd be app.json {
"name": "xxx",
"displayName": "xxx",
"expo": {
"name": "xxx",
"slug": "xxx",
"version": "0.0.35",
"sdkVersion": "40.0.0",
"description": "xxx",
"privacy": "unlisted",
"platforms": ["ios", "android"],
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "xxx",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#f9f9f9"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"buildNumber": "82",
"bundleIdentifier": "xxx",
"supportsTablet": false,
"usesAppleSignIn": true,
"infoPlist": {
"LSApplicationQueriesSchemes": ["instagram", "twitter", "fb"]
},
"config": {
"usesNonExemptEncryption": false,
"googleSignIn": {
"reservedClientId": "xxx"
}
}
},
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "xxx",
"project": "xxx-ios",
"authToken": "xxx"
}
}
]
},
"android": {
"package": "xxx"
}
}
} |
Just reproduced this on a blank-ish bare workflow app @darrylyoung - after building for release in Xcode (and seeing that the "Upload sourcemaps" shell script was run: no artifacts for that release in Sentry dashboard- but only on iOS (Android sourcemaps were uploaded perfectly fine during Will update here if I figure out what's going on here |
Actually, looks like the issue I'm running into is #888 |
Ok I've successfully reproduced it as well, if you add the flag So try replacing the "Bundle React Native code and images" build script with this, and see if it works? @darrylyoung @cruzach export NODE_BINARY=node
export EXTRA_PACKAGER_ARGS="--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map"
export SENTRY_PROPERTIES=sentry.properties
export SENTRY_LOG_LEVEL="info"
# If you are using RN 0.46+
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode --force-foreground I'll be raising this issue to others internally I don't know why it does this. |
Hi, @jennmueng. Thanks for the suggestion. I just tried that and I can see 2 artifacts in the new release. There have been 0 artifacts in previous releases so this clearly helped. For context, I used the following and the only change was the addition of
Thanks to both of you for your help so far with this. Update: I just saw an issue for that latest release (the one with 2 artifacts) and at the top of the issue I see:
|
@darrylyoung That error at the top looks like the source map filename was not mapped correctly, it should be replaced to Edit: Oh I looked at your initial issue—if you're still using expo you should call not call the init from |
Hi again, @jennmueng. Thanks for the suggestion. I've just made that change and I still have that same issue.
For context, here's my setup after your suggestion: sentry.config
App.tsx import * as Sentry from 'sentry-expo'
Sentry.init(sentryConfig)
// Sentry.Native.captureException(error) package.json
I'm also seeing the following in the issue, in case that helps: Update Actually, I have two new issues in this new release and one of them has no messages/warnings about source code not being found while the other does. The one with the source code not found message looks like this: I've since had another issue show up and it came at the exact same time as another issue which looked like the one above. That is, it seems like issues come through normally but also come with an issue that's somehow related but has no source maps, etc. |
I'm facing this issue too with SDK 1.9.0 as well as 2.1.0. My setup is more similar to the one in #888 though. Unfortunately, using In my case, after looking through the Xcode build logs, I found this warning in the
It seems to be coming from this line in Sentry CLI. I'm not very good at Rust, but hopefully this might help someone debug the issue. |
Hi @darrylyoung, I'm wondering if you found out what causes the URL pointing to the device path instead of the uploaded artifact. I'm not using Expo but having the same issue. |
Hi, @leonskim. No, unfortunately not. Have you tried the |
@darrylyoung Still the same. Didn't work with |
The same happens for me as well. I'm not using expo, but a raw RN project. Android works perfectly fine and source maps are uploaded automatically. On iOS I do see the info "Sentry: React Native symbol handling started" when archiving with XCode, but they never show up as artifacts in an iOS Release on Sentry. After reading through this issue I tried using Edit: My bad, I added |
This is a big problem. There's nothing in the docs about it, just says "by default sourcemaps are uploaded with the react native sdk" luckily found this issue, and was able to add I just installed the latest version today and it wasn't working, would be good to get this patched. |
@ghasemikasra39 hi, what kind of build have you done? For me, it works only with release/archived versions. When I build debug version dysm file is not uplaoded. |
@likrot It only works on |
@jennmueng do you know if we should do something about this? |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
@marandaneto This issue seems to me to also be just #1424, which relies on getsentry/sentry-cli#932 (comment). Let's close this one in favor of #1424. |
In my case adding --force-foreground did not help, but removing NODE_ARGS environment variable did — getsentry/sentry-cli#1039 |
Environment
How do you use Sentry?
Which SDK and version?
sentry-expo
:3.0.4
@sentry/react-native
:2.2.0
Steps to Reproduce
yarn ios
or from within Xcode) – let's say version0.0.35
, build76
0.0.35 (76)
in the Sentry projectExpected Result
Artifacts would be available.
Actual Result
There are 0 artifacts in the release.
Setup information
I started my project as an Expo managed app and eventually ejected to the bare workflow.
Everything was working as expected (source maps and artifacts were available) while on
@sentry/react-native
version1.9.0
but things broke when I upgraded to2.1.0
and they haven't been right since, regardless of what I've tried. Looking through the Source Maps section in Sentry, I last see a release with artifacts just before I did the1.9.0
->2.1.0
upgrade but none since. Looking back at my changes then, I know I did something wrong – I started using:import * as Sentry from '@sentry/react-native'
instead ofimport { Native as Sentry } from 'sentry-expo'
Since then, I've resorted to using
import { Native as Sentry } from 'sentry-expo'
again after trying to debug this with somebody from Expo – I was told that I didn't need to usesentry-expo
as well as@sentry/react-native
but that it'd give some extra features if I did.Here's some setup information:
sentryConfig.ts
App.tsx
sentry.properties
Xcode – Bundle React Native code and images
Xcode – Upload Debug Symbols to Sentry
export SENTRY_PROPERTIES=sentry.properties ../node_modules/@sentry/cli/bin/sentry-cli upload-dsym
Am I missing a manual step here or is there maybe an issue with my setup? I thought that when running/building a new version/build, a new Sentry release would automatically be created and everything would be handled. Here's a screenshot of the Tags in a recent issue (from a release that has 0 artifacts):
I can see that
dist
is clearly taken from mybuild
number andrelease
is a combination of theversion
and thebuild
numbers. This is clearly done automatically as I don't set that explicitly anywhere.The only way I've been able to create a new release and get artifacts/source maps is if I run
expo publish
manually. When doing this, I get a new release created but it has a name like0.0.35-r.-DrbHnWJw
and no issues seem to show up under that release. That release, however, does have artifacts, e.g.whereas the automatically-created releases don't:
Apologies for the length of this issue but I've been stuck with this for a while now and I wanted to give as much context as possible, hoping that it's simply a setup issue on my side. Thanks in advance! Have a a nice day.
The text was updated successfully, but these errors were encountered: