Expo-Sentry: Error uploading sourcemaps to Sentry: project not found

Please provide the following:

  1. SDK Version: 44
  2. Platforms(Android/iOS/web/all): Android/iOS

When I publish a new release with expo publish, I get the error

Error uploading sourcemaps to Sentry: project not found

I have carefully followed the official sentr-expo documentation Using Sentry - Expo Documentation.
I have created a new project on https://sentry.io/. And in my app.json, I have setup the “postPublish” hooks like so:

"hooks": {
  "postPublish": [
    {
      "file": "sentry-expo/upload-sourcemaps",
      "config": {
        "organization": "__org_name__",
        "project": "__project_name__",
        "authToken": "__authtoken__",
        "setCommits": true
      }
    }
  ]
},

Hey @seyaobey, is your app built with EAS or with the classic build system (expo build)? There is a known issue when using EAS Update (Known issues - Expo Documentation) but it might be more widespread.

Thank you for the reply. I’m using EAS updates

Based on the documentation you provided, “EAS Update” is currently only available to users subscribed to the EAS Production or EAS Enterprise plans. I am on a free plan. I don’t use eas update. I am using eas publish. Is eas publish and eas update the same thing for free plan?

is senty expo in managed workflow can report native crashes?

oh i see, do u have any idea on how to “purposely” make the app crash or have an error from nnative side inn expo? so i can test that it actually works or reports the crash

On Android, try setting a style to something like "1px" instead of 1 :sweat_smile:

1 Like

oh. i see, does that count as a native crash or JS fatal error ?

It’s actually a native crash:

02-18 17:50:01.559  6079  6079 E AndroidRuntime: FATAL EXCEPTION: main
02-18 17:50:01.559  6079  6079 E AndroidRuntime: Process: host.exp.exponent, PID: 6079
02-18 17:50:01.559  6079  6079 E AndroidRuntime: java.lang.IllegalStateException: abi43_0_0.com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 593
02-18 17:50:01.559  6079  6079 E AndroidRuntime:  detail: View tag:595 View Type:class abi43_0_0.com.facebook.react.views.view.ReactViewGroup
02-18 17:50:01.559  6079  6079 E AndroidRuntime:   children(0): [
02-18 17:50:01.559  6079  6079 E AndroidRuntime:  ],
02-18 17:50:01.559  6079  6079 E AndroidRuntime:   viewsToAdd(1): [
02-18 17:50:01.559  6079  6079 E AndroidRuntime: [0,593],
02-18 17:50:01.559  6079  6079 E AndroidRuntime:  ],
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:6)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:2)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:7)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:1)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:761)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:693)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:873)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7050)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: Caused by: abi43_0_0.com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 593
02-18 17:50:01.559  6079  6079 E AndroidRuntime:  detail: View tag:595 View Type:class abi43_0_0.com.facebook.react.views.view.ReactViewGroup
02-18 17:50:01.559  6079  6079 E AndroidRuntime:   children(0): [
02-18 17:50:01.559  6079  6079 E AndroidRuntime:  ],
02-18 17:50:01.559  6079  6079 E AndroidRuntime:   viewsToAdd(1): [
02-18 17:50:01.559  6079  6079 E AndroidRuntime: [0,593],
02-18 17:50:01.559  6079  6079 E AndroidRuntime:  ],
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:35)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:1)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:18)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:10)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.uimanager.UIViewOperationQueue.access$2600(UIViewOperationQueue.java:1)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:6)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	at abi43_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:1)
02-18 17:50:01.559  6079  6079 E AndroidRuntime: 	... 13 more

I think you mean expo publish, which is available in the Free plan. With EAS Update, it seems you use eas update --branch xxx --message "yyy" to publish an update. I am also on the free plan, so I haven’t tried EAS Update.

EAS Update is still in Preview and currently has some known issues (as Adam mentioned), one of which is:

eas update will not create or send source maps to Sentry. This will result in less informative error reports from Sentry.

It looks like your error is coming from here, apparently called from here

If I were trying to debug this, I’d add a copy of the above file to my project and add a bunch of logging and update the “file” in the postPublish hook to point to the local file (e.g. "file": "./upload-sourcemaps"), then see what gets logged. One slight complication with this is that the file above is written in TypeScript. If your app is not using TypeScript you might need to use the compiled version in your debugging instead.

1 Like

do you happen to know what this error below means ive been strugling for days try to reproduce this error but i cant find the problem becaus its only happens in one device out of 2k install in google play… i got the error from google play console crash and ANR report. heres the error :

Input dispatching timed out (665ca29 com.mypackage.name/host.exp.exponent.MainActivity (server) is not responding. Waited 5000ms for MotionEvent)

it says host.exp.exponent.MainActivity, idk what that means since im using expo managed workflow. and its only JS.

i have to mention that i also have an api call, OTA check for updates on the first time app loads just before react navigation mounted

As far as I understand it, that basically just means that the app took longer than 5 seconds to respond to something (e.g. maybe while the user was trying to scroll?). Why that would be, I’m not sure. I think in a normal Android app written in Java it could be because you’re doing too much work on the main thread, but you don’t have control over that in React Native.

But I suppose it’s possible that it could be because the phone has a small amount of RAM and a slow CPU and maybe had a bunch of other stuff going on at the same time. :person_shrugging:

Does the ANR report give you more info than just that message? I see this Stack overflow question has a much more detailed ANR report, for example.

While your code is just JavaScript, the app also contains native code written in Java.

1 Like

hi sir, i also have the same problem for reproducing error from google play console. because i use managed workflow and i hve no knowledge in java

java.lang.IndexOutOfBoundsException: 
  at android.text.TextLine.measure (TextLine.java:353)
  at android.text.Layout.getHorizontal (Layout.java:1213)
  at android.text.Layout.getHorizontal (Layout.java:1190)
  at android.text.Layout.getPrimaryHorizontal (Layout.java:1160)
  at android.text.Layout.getPrimaryHorizontal (Layout.java:1149)
  at android.widget.Editor$ActionPinnedPopupWindow.computeLocalPosition (Editor.java:3324)
  at android.widget.Editor$PinnedPopupWindow.show (Editor.java:3628)
  at android.widget.Editor$ActionPinnedPopupWindow.show (Editor.java:3471)
  at android.widget.Editor$EmailAddPopupWindow.show (Editor.java:4995)
  at android.widget.Editor$1.run (Editor.java:1528)
  at android.os.Handler.handleCallback (Handler.java:914)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loop (Looper.java:225)
  at android.app.ActivityThread.main (ActivityThread.java:7563)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:539)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:994)

i have this error. and idk what do i have to do. and this error only happens in one device. i dont find this error on dev or other phones.

oh i also got

"HeapTaskDaemon" daemon prio=5 tid=8 WaitingForTaskProcessor

and

"main" prio=5 tid=1 Native
#00  pc 0000000004a95958  /data/app/~~jmPBnnfaohIvgYeYXUCMeA==/com.google.android.trichromelibrary_457708234-SRAAwU6v6n4G3APLc1odmQ==/base.apk!libmonochrome_64.so (???)
  #00  pc 0000000004aad418  /data/app/~~jmPBnnfaohIvgYeYXUCMeA==/com.google.android.trichromelibrary_457708234-SRAAwU6v6n4G3APLc1odmQ==/base.apk!libmonochrome_64.so (???)
  #00  pc 0000000002173790  /data/app/~~jmPBnnfaohIvgYeYXUCMeA==/com.google.android.trichromelibrary_457708234-SRAAwU6v6n4G3APLc1odmQ==/base.apk!libmonochrome_64.so (???)
  #00  pc 0000000002173d38  /data/app/~~jmPBnnfaohIvgYeYXUCMeA==/com.google.android.trichromelibrary_457708234-SRAAwU6v6n4G3APLc1odmQ==/base.apk!libmonochrome_64.so (???)
  #00  pc 0000000002400fc8  /data/app/~~jmPBnnfaohIvgYeYXUCMeA==/com.google.android.tr…

and other stuff that i dont find it very helpful or refering to anything i do in my source code.

But I suppose it’s possible that it could be because the phone has a small amount of RAM and a slow CPU and maybe had a bunch of other stuff going on at the same time. :person_shrugging:

judging from this comment, does this means theres nothing really i can do to fix this since in user’s end.

It’s hard to say for sure without more info, but that’s possible.

EDIT: Searching for “HeapTaskDaemon” turns up some interesting results.

“Heap” is basically to do with memory used by your app, so it’s possible that your app is using a large percentage of memory available on this device, but I’m not really sure.

Maybe you could try testing on a device or emulator with a small amount of RAM.

1 Like

ohh i see thank u so muchh

Thanks for the suggestion. Are you suggesting to fork sentry-expo in my project and then modify the code? I don’t understand exactly what you mean by

If I were trying to debug this, I’d add a copy of the above file to my project and add a bunch of logging and update the “file” in the postPublish hook to point to the local file

You should not need to fork it. You should be able to copy just that file into your own project and then reference:

          "file": "./upload-sourcemaps",

instead of:

          "file": "sentry-expo/upload-sourcemaps",

Ok. Thank you for the suggestion