getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.58k stars 338 forks source link

Source maps for Android not working #4027

Closed dwxw closed 2 months ago

dwxw commented 3 months ago

OS:

Platform:

SDK:

SDK version: 5.29.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)

Sentry.init({
  dsn: 'https://...@sentry.io/...'
  // other options
});

or

(react-native-sentry)

Sentry.config(
  'https://...@sentry.io/...'
  // other options
 ).install();

I have the following issue:

Source maps for Android are not working.

I'm making a release build (with flavours) and in the build output I get:

> Task :app:createBundleDevReleaseJsAndAssets
info Bundle Debug ID: ffaa2691-7cdd-4e40-9a69-00f837ec6c5e
info Writing bundle output to:, [redacted]/android/app/build/generated/assets/createBundleDevReleaseJsAndAssets/index.android.bundle
info Writing sourcemap output to:, [redacted]/android/app/build/intermediates/sourcemaps/react/devRelease/index.android.bundle.packager.map
info Done writing bundle output
info Done writing sourcemap output

When I generate a crash with that build I get a debug id of

Image

When I look in the project source maps, there is no artifact added.

There is evidence in the log that something is being uploaded, but that might be the debug symbols rather than the source maps. These two tasks run successfully at the end of the build.

> Task :app:uploadSentryProguardMappingsDevRelease
> Task :app:uploadSentryNativeSymbolsForDevRelease

I then try manually uploading the bundle with the sentry cli:

node_modules/@sentry/cli/bin/sentry-cli sourcemaps upload \
  --debug-id-reference \
  --strip-prefix /path/to/project/root \
  index.android.bundle index.android.bundle.map

But this creates a different debug id.

Image

The artifact does now appear in the project, but doesn't match the stacktrace:

Image

So to summarise, I don't understand why the artifact isn't being automatically uploaded and I don't understand why uploading the files produced by the build have a different debug id. Please could you help me get the source maps working.

krystofwoldrich commented 3 months ago

Hi @dwxw, thank you for the message.

The node_modules/@sentry/cli/bin/sentry-cli sourcemaps upload doesn't create the Debug ID it reads it from the bundle file and source map. This means the manually uploaded bundle and source map is not the same as the one generated during the application build.

For the automatic upload check if the Gradle Integration is enabled -> https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-gradle-integration

For the manual source maps generation let us know which guide are you using? -> https://docs.sentry.io/platforms/react-native/sourcemaps/uploading/


Task :app:uploadSentryProguardMappingsDevRelease Task :app:uploadSentryNativeSymbolsForDevRelease

Yes, these are the native debug files.

For the automatic source map upload find task which contains _SentryUpload_ in it name.

dwxw commented 3 months ago

Thank you @krystofwoldrich. I have the gradle integration correctly configured afaict. The bundle and source maps are generated in the build directory. They are just not being uploaded to Sentry. There is no task with SentryUpload. The debug symbols are being uploaded.

Trying it manually I was using the Hermes guide. I was only trying the final step to uploaded the automatically generated bundle and source files from my build directory to see if not uploading was the problem. Ideally I would like the gradle integration to work.

Does the upload only work when I bundle rather than assemble? Is there a way I can force the upload like on iOS? I'm trying this locally on my Android device.

krystofwoldrich commented 3 months ago

@dwxw Thank you for the details, the SentryUpload task it responsible for uploading the source maps,

it's attached to the bundle${your_build_variant_name}JsAndAssets task. Is this task executed during your bundle process?

The upload task is not created when the variant contains Debug.

dwxw commented 3 months ago

I've checked the bundle build. I always get createBundleProdMaestroJsAndAssets or whatever build variant I choose. The task writes the soucemap and bundle and says assets copied, some warnings, and then moves onto some other tasks. The only mention of Sentry is > Task :app:uploadSentryProguardMappingsProdMaestro and > Task :app:uploadSentryNativeSymbolsForDevMaestro later on in the build.

info Bundle Debug ID: 44dfeeca-b334-465f-9d86-a7f69650505e
info Writing bundle output to:, /[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle
info Writing sourcemap output to:, /[redacted]/android/app/build/intermediates/sourcemaps/react/prodMaestro/index.android.bundle.packager.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 91 asset files
info Done copying assets
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:1692:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"
          typeof DebuggerInternal !== 'undefined' &&
                 ^~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:6933:7: warning: the variable "setTimeout" was not declared in function "logCapturedError"
      setTimeout(function () {
      ^~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:5043:31: warning: the variable "nativeFabricUIManager" was not declared in anonymous function " 166#"
  var _nativeFabricUIManage = nativeFabricUIManager,
                              ^~~~~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:5071:21: warning: the variable "clearTimeout" was not declared in anonymous function " 166#"
    cancelTimeout = clearTimeout;
                    ^~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:9699:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 166#"
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:12042:5: warning: the variable "setImmediate" was not declared in function "handleResolved"
    setImmediate(function () {
    ^~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16295:12: warning: the variable "fetch" was not declared in anonymous function " 406#"
    fetch: fetch,
           ^~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16296:14: warning: the variable "Headers" was not declared in anonymous function " 406#"
    Headers: Headers,
             ^~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16297:14: warning: the variable "Request" was not declared in anonymous function " 406#"
    Request: Request,
             ^~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16298:15: warning: the variable "Response" was not declared in anonymous function " 406#"
    Response: Response
              ^~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16455:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"
      var reader = new FileReader();
                       ^~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16506:36: warning: the variable "Blob" was not declared in anonymous function " 417#"
        } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
                                   ^~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16508:40: warning: the variable "FormData" was not declared in anonymous function " 417#"
        } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
                                       ^~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16510:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 417#"
...e if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body...
                                 ^~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16629:26: warning: the variable "AbortController" was not declared in anonymous function " 423#"
          var ctrl = new AbortController();
                         ^~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16761:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 427#"
        var xhr = new XMLHttpRequest();
                      ^~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:16308:71: warning: the variable "self" was not declared in anonymous function " 409#"
...undefined' && globalThis || typeof self !== 'undefined' && self ||
                                      ^~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:26192:27: warning: the variable "performance" was not declared in anonymous function " 686#"
  if ("object" === typeof performance && "function" === typeof performance.no...
                          ^~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:26215:26: warning: the variable "navigator" was not declared in anonymous function " 686#"
  "undefined" !== typeof navigator && undefined !== navigator.scheduling && u...
                         ^~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:26325:37: warning: the variable "MessageChannel" was not declared in anonymous function " 686#"
  };else if ("undefined" !== typeof MessageChannel) {
                                    ^~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:26340:34: warning: the variable "nativeRuntimeScheduler" was not declared in anonymous function " 686#"
... = "undefined" !== typeof nativeRuntimeScheduler ? nativeRuntimeScheduler....
                             ^~~~~~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:35429:34: warning: the variable "requestAnimationFrame" was not declared in function "start 9#"
...    this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
                              ^~~~~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:60966:11: warning: the variable "_WORKLET" was not declared in function "assertEasingIsWorklet"
      if (_WORKLET) {
          ^~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:63759:26: warning: Direct call to eval(), but lexical scope is not supported.
            workletFun = eval('(' + initData.code + '\n)');
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:63782:112: warning: the variable "_toString" was not declared in function "valueUnpacker"
...recognized by value unpacker: "${_toString(objectToUnpack)}".`);
                                    ^~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:68762:27: warning: the variable "HTMLElement" was not declared in function "findDescendantWithExitingAnimation"
    if (!(node instanceof HTMLElement)) {
                          ^~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:68789:24: warning: the variable "MutationObserver" was not declared in function "addHTMLMutationObserver"
    var observer = new MutationObserver(function (mutationsList) {
                       ^~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:70720:41: warning: the variable "getComputedStyle" was not declared in function "fixElementPosition"
...entBorderTopValue = parseInt(getComputedStyle(parent).borderTopWidth);
                                ^~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:83828:26: warning: the variable "_getAnimationTimestamp" was not declared in function "computeEasingProgress"
      var elapsedTime = (_getAnimationTimestamp() - startingTimestamp) / 1000;
                         ^~~~~~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:84197:5: warning: the variable "jest" was not declared in function "beforeTest"
    jest.useFakeTimers();
    ^~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:101607:9: warning: the variable "clearInterval" was not declared in function "close 4#"
        clearInterval(this._intervalId);
        ^~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:107140:13: warning: the variable "addEventListener" was not declared in anonymous function " 3275#"
            addEventListener(type, registerInteractionTransaction, {
            ^~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:115760:48: warning: the variable "CSSRule" was not declared in function "adoptStyleSheets"
              rules: Array.from(sheet.rules || CSSRule, function (r, index) {
                                               ^~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:122290:11: warning: the variable "cancelAnimationFrame" was not declared in anonymous function " 3761#"
          cancelAnimationFrame(rafId);
          ^~~~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:122391:13: warning: the variable "createImageBitmap" was not declared in anonymous function " 3766#"
            createImageBitmap(canvas).then(function (bitmap) {
            ^~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125415:24: warning: the variable "indexedDB" was not declared in function "getIDB"
            if (typeof indexedDB !== 'undefined') {
                       ^~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125418:24: warning: the variable "webkitIndexedDB" was not declared in function "getIDB"
            if (typeof webkitIndexedDB !== 'undefined') {
                       ^~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125421:24: warning: the variable "mozIndexedDB" was not declared in function "getIDB"
            if (typeof mozIndexedDB !== 'undefined') {
                       ^~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125424:24: warning: the variable "OIndexedDB" was not declared in function "getIDB"
            if (typeof OIndexedDB !== 'undefined') {
                       ^~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125427:24: warning: the variable "msIndexedDB" was not declared in function "getIDB"
            if (typeof msIndexedDB !== 'undefined') {
                       ^~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125446:35: warning: the variable "openDatabase" was not declared in function "isIndexedDBValid"
            var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iP...
                                  ^~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125460:20: warning: the variable "IDBKeyRange" was not declared in function "isIndexedDBValid"
            typeof IDBKeyRange !== 'undefined';
                   ^~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125482:34: warning: the variable "BlobBuilder" was not declared in function "createBlob"
            var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : ...
                                 ^~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125482:85: warning: the variable "MSBlobBuilder" was not declared in function "createBlob"
...efined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuild...
                                  ^~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125482:140: warning: the variable "MozBlobBuilder" was not declared in function "createBlob"
...ned' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuil...
                                 ^~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125482:190: warning: the variable "WebKitBlobBuilder" was not declared in function "createBlob"
...ndefined' ? MozBlobBuilder : WebKitBlobBuilder;
                                ^~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125743:28: warning: the variable "btoa" was not declared in anonymous function " 3870#"
              var base64 = btoa(e.target.result || '');
                           ^~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:125756:51: warning: the variable "atob" was not declared in function "_decodeBlob"
          var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));
                                                  ^~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:126975:27: warning: the variable "localStorage" was not declared in function "isLocalStorageValid"
            return typeof localStorage !== 'undefined' && 'setItem' in localS...
                          ^~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:173574:32: warning: the variable "crypto" was not declared in function "rng"
      getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValu...
                               ^~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:192974:18: warning: the variable "FileList" was not declared in function "extractFiles"
      if (typeof FileList !== 'undefined' && value instanceof FileList) clone...
                 ^~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:193000:19: warning: the variable "File" was not declared in function "isExtractableFile"
    return typeof File !== 'undefined' && value instanceof File || typeof Blo...
                  ^~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:300901:25: warning: the variable "DOMMatrix" was not declared in function "parseCss"
    var m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatri...
                        ^~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:300901:64: warning: the variable "WebKitCSSMatrix" was not declared in function "parseCss"
... === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
                                 ^~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:364040:24: warning: Direct call to eval(), but lexical scope is not supported.
                return eval(payload); // eslint-disable-line no-eval
                       ^~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:365145:40: warning: the variable "notificationData" was not declared in anonymous function " 11311#"
        notification.data = JSON.parse(notificationData.data);
                                       ^~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:372956:31: warning: the variable "normalizeDigits" was not declared in function "checkNumberGroupingIsValid"
    var normalizedCandidate = normalizeDigits(candidate, true
                              ^~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:372963:28: warning: the variable "MetadataManager" was not declared in function "checkNumberGroupingIsValid"
    var alternateFormats = MetadataManager.getAlternateFormatsForCountry(numb...
                           ^~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:372964:37: warning: the variable "util" was not declared in function "checkNumberGroupingIsValid"
    var nationalSignificantNumber = util.getNationalSignificantNumber(number);
                                    ^~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:372998:25: warning: the variable "formatNumber" was not declared in function "getNationalNumberGroups"
    var rfc3966Format = formatNumber(number, 'RFC3966', metadata); // We remo...
                        ^~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:373011:53: warning: the variable "NON_DIGITS_PATTERN" was not declared in function "allNumberGroupsAreExactlyPresent"
...= normalizedCandidate.split(NON_DIGITS_PATTERN); // Set this to the last g...
                               ^~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:373037:43: warning: the variable "CountryCodeSource" was not declared in function "allNumberGroupsRemainGrouped"
...r.getCountryCodeSource() !== CountryCodeSource.FROM_DEFAULT_COUNTRY) {
                                ^~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:373059:65: warning: the variable "Character" was not declared in function "allNumberGroupsRemainGrouped"
...rRegion(region, true) != null && Character.isDigit(normalizedCandidate.cha...
                                    ^~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:377459:16: warning: the variable "SharedArrayBuffer" was not declared in function "from 2#"
    if (typeof SharedArrayBuffer !== 'undefined' && (isInstance(value, Shared...
               ^~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:403640:25: warning: the variable "Atomics" was not declared in anonymous function " 13327#"
    '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
                        ^~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:403657:38: warning: the variable "FinalizationRegistry" was not declared in anonymous function " 13327#"
...lizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefine...
                              ^~~~~~~~~~~~~~~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:403696:25: warning: the variable "WeakRef" was not declared in anonymous function " 13327#"
    '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
                        ^~~~~~~
/[redacted]/android/app/build/generated/assets/createBundleProdMaestroJsAndAssets/index.android.bundle:464293:256: warning: the variable "event" was not declared in anonymous function " 16527#"
....\nEvent: ").concat(JSON.stringify(event)));
                                      ^~~~~

> Task :app:processProdMaestroMainManifest

Looking in the source maps in Sentry.io there's still nothing uploaded from Android (iOS working correctly).

I'm thinking I should try integrating into a clean project next. Do you have any other tips to help debug what's happening?

krystofwoldrich commented 3 months ago

Thank you for the details this task should be finished by the source map upload https://github.com/getsentry/sentry-react-native/blob/b096e3b8965c1a7b01a2d1c9fdef25f44b2d840d/sentry.gradle#L41

Would you be able to build the application with --scan for additional details about the tasks?

Would you be able to share a reproducible example that we could debug?

dwxw commented 3 months ago

I tried a clean project and new integration and I understand what I'm looking for now.

./gradlew bundleRelease

> Task :app:createBundleReleaseJsAndAssets
(node:48494) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
debug Reading Metro config from /Users/davidwhite/Projects/RN074/metro.config.js
warning: the transform cache was reset.
                Welcome to Metro v0.80.10
              Fast - Scalable - Integrated

info Bundle Debug ID: 0979806b-29c8-4310-b456-106d2079e612
info Writing bundle output to: /Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle
info Writing sourcemap output to: /Users/davidwhite/Projects/RN074/android/app/build/intermediates/sourcemaps/react/release/index.android.bundle.packager.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 1 asset files
info Done copying assets
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:1327:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"
          typeof DebuggerInternal !== 'undefined' &&
                 ^~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:6555:7: warning: the variable "setTimeout" was not declared in function "logCapturedError"
      setTimeout(function () {
      ^~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:4665:31: warning: the variable "nativeFabricUIManager" was not declared in anonymous function " 134#"
  var _nativeFabricUIManage = nativeFabricUIManager,
                              ^~~~~~~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:4693:21: warning: the variable "clearTimeout" was not declared in anonymous function " 134#"
    cancelTimeout = clearTimeout;
                    ^~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9323:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 134#"
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:11743:5: warning: the variable "setImmediate" was not declared in function "handleResolved"
    setImmediate(function () {
    ^~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16015:12: warning: the variable "fetch" was not declared in anonymous function " 373#"
    fetch: fetch,
           ^~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16016:14: warning: the variable "Headers" was not declared in anonymous function " 373#"
    Headers: Headers,
             ^~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16017:14: warning: the variable "Request" was not declared in anonymous function " 373#"
    Request: Request,
             ^~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16018:15: warning: the variable "Response" was not declared in anonymous function " 373#"
    Response: Response
              ^~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16175:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"
      var reader = new FileReader();
                       ^~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16226:36: warning: the variable "Blob" was not declared in anonymous function " 384#"
        } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
                                   ^~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16228:40: warning: the variable "FormData" was not declared in anonymous function " 384#"
        } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
                                       ^~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16230:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 384#"
...e if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body...
                                 ^~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16349:26: warning: the variable "AbortController" was not declared in anonymous function " 390#"
          var ctrl = new AbortController();
                         ^~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16483:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 394#"
        var xhr = new XMLHttpRequest();
                      ^~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:16028:71: warning: the variable "self" was not declared in anonymous function " 376#"
...undefined' && globalThis || typeof self !== 'undefined' && self ||
                                      ^~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:26288:27: warning: the variable "performance" was not declared in anonymous function " 689#"
  if ("object" === typeof performance && "function" === typeof performance.no...
                          ^~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:26311:26: warning: the variable "navigator" was not declared in anonymous function " 689#"
  "undefined" !== typeof navigator && undefined !== navigator.scheduling && u...
                         ^~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:26421:37: warning: the variable "MessageChannel" was not declared in anonymous function " 689#"
  };else if ("undefined" !== typeof MessageChannel) {
                                    ^~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:26436:34: warning: the variable "nativeRuntimeScheduler" was not declared in anonymous function " 689#"
... = "undefined" !== typeof nativeRuntimeScheduler ? nativeRuntimeScheduler....
                             ^~~~~~~~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:35535:34: warning: the variable "requestAnimationFrame" was not declared in function "start 9#"
...    this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
                              ^~~~~~~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:68973:9: warning: the variable "clearInterval" was not declared in function "close 4#"
        clearInterval(this._intervalId);
        ^~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:74532:13: warning: the variable "addEventListener" was not declared in anonymous function " 1984#"
            addEventListener(type, registerInteractionTransaction, {
            ^~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:83167:48: warning: the variable "CSSRule" was not declared in function "adoptStyleSheets"
              rules: Array.from(sheet.rules || CSSRule, function (r, index) {
                                               ^~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:89728:11: warning: the variable "cancelAnimationFrame" was not declared in anonymous function " 2471#"
          cancelAnimationFrame(rafId);
          ^~~~~~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:89829:13: warning: the variable "createImageBitmap" was not declared in anonymous function " 2476#"
            createImageBitmap(canvas).then(function (bitmap) {
            ^~~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92859:24: warning: the variable "indexedDB" was not declared in function "getIDB"
            if (typeof indexedDB !== 'undefined') {
                       ^~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92862:24: warning: the variable "webkitIndexedDB" was not declared in function "getIDB"
            if (typeof webkitIndexedDB !== 'undefined') {
                       ^~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92865:24: warning: the variable "mozIndexedDB" was not declared in function "getIDB"
            if (typeof mozIndexedDB !== 'undefined') {
                       ^~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92868:24: warning: the variable "OIndexedDB" was not declared in function "getIDB"
            if (typeof OIndexedDB !== 'undefined') {
                       ^~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92871:24: warning: the variable "msIndexedDB" was not declared in function "getIDB"
            if (typeof msIndexedDB !== 'undefined') {
                       ^~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92890:35: warning: the variable "openDatabase" was not declared in function "isIndexedDBValid"
            var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iP...
                                  ^~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92904:20: warning: the variable "IDBKeyRange" was not declared in function "isIndexedDBValid"
            typeof IDBKeyRange !== 'undefined';
                   ^~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92926:34: warning: the variable "BlobBuilder" was not declared in function "createBlob"
            var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : ...
                                 ^~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92926:85: warning: the variable "MSBlobBuilder" was not declared in function "createBlob"
...efined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuild...
                                  ^~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92926:140: warning: the variable "MozBlobBuilder" was not declared in function "createBlob"
...ned' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuil...
                                 ^~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92926:190: warning: the variable "WebKitBlobBuilder" was not declared in function "createBlob"
...ndefined' ? MozBlobBuilder : WebKitBlobBuilder;
                                ^~~~~~~~~~~~~~~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:93192:28: warning: the variable "btoa" was not declared in anonymous function " 2580#"
              var base64 = btoa(e.target.result || '');
                           ^~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:93205:51: warning: the variable "atob" was not declared in function "_decodeBlob"
          var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));
                                                  ^~~~
/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:94429:27: warning: the variable "localStorage" was not declared in function "isLocalStorageValid"
            return typeof localStorage !== 'undefined' && 'setItem' in localS...
                          ^~~~~~~~~~~~

> Task :app:createBundleReleaseJsAndAssets_SentryUpload_com.rn074@1.0+1_1
Copy `debugId` from packager source map to Hermes source map...
Done.
Check generated source map for Debug ID: 0979806b-29c8-4310-b456-106d2079e612

Sentry Source Maps upload will include the release name and dist.
Sentry-CLI arguments: [/Users/davidwhite/Projects/RN074/node_modules/@sentry/cli/bin/sentry-cli, react-native, gradle, --bundle, /Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle, --sourcemap, /Users/davidwhite/Projects/RN074/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map, --release, com.rn074@1.0+1, --dist, 1]
  INFO    2024-08-21 15:21:24.448860 +01:00 Loaded file referenced by SENTRY_PROPERTIES (/Users/davidwhite/Projects/RN074/android/sentry.properties)
  DEBUG   2024-08-21 15:21:24.450230 +01:00 sentry-cli version: 2.31.2, platform: "darwin", architecture: "arm64"
  INFO    2024-08-21 15:21:24.450385 +01:00 sentry-cli was invoked with the following command line: "/Users/davidwhite/Projects/RN074/node_modules/@sentry/cli-darwin/bin/sentry-cli" "react-native" "gradle" "--bundle" "/Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle" "--sourcemap" "/Users/davidwhite/Projects/RN074/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map" "--release" "com.rn074@1.0+1" "--dist" "1"
  INFO    2024-08-21 15:21:24.450950 +01:00 Issuing a command for Organization: wahedtech Project: sentry-playground
Processing react-native sourcemaps for Sentry upload.
  INFO    2024-08-21 15:21:24.450974 +01:00   bundle path: /Users/davidwhite/Projects/RN074/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle
  INFO    2024-08-21 15:21:24.450978 +01:00   sourcemap path: /Users/davidwhite/Projects/RN074/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
  DEBUG   2024-08-21 15:21:24.460247 +01:00 Non-file bundle found
> Analyzing 2 sources
> Rewriting sources
  DEBUG   2024-08-21 15:21:24.577175 +01:00 > Adding debug id 0979806b-29c8-4310-b456-106d2079e612 reference to ~/index.android.bundle
> Adding source map references
  DEBUG   2024-08-21 15:21:24.577293 +01:00 request GET https://sentry.io/api/0/organizations/wahedtech/chunk-upload/
  DEBUG   2024-08-21 15:21:24.577476 +01:00 using token authentication
  DEBUG   2024-08-21 15:21:24.577497 +01:00 retry number 0, max retries: 0
  DEBUG   2024-08-21 15:21:24.722594 +01:00 > GET /api/0/organizations/wahedtech/chunk-upload/ HTTP/1.1
  DEBUG   2024-08-21 15:21:24.722609 +01:00 > Host: sentry.io
  DEBUG   2024-08-21 15:21:24.722612 +01:00 > Accept: */*
  DEBUG   2024-08-21 15:21:24.722615 +01:00 > Connection: TE
  DEBUG   2024-08-21 15:21:24.722617 +01:00 > TE: gzip
  DEBUG   2024-08-21 15:21:24.722619 +01:00 > User-Agent: sentry-cli/2.31.2
  DEBUG   2024-08-21 15:21:24.723348 +01:00 > Authorization: Bearer sntrys_e***
  DEBUG   2024-08-21 15:21:24.926547 +01:00 < HTTP/1.1 200 OK
  DEBUG   2024-08-21 15:21:24.926570 +01:00 < server: nginx
  DEBUG   2024-08-21 15:21:24.926582 +01:00 < date: Wed, 21 Aug 2024 14:21:24 GMT
  DEBUG   2024-08-21 15:21:24.926587 +01:00 < content-type: application/json
  DEBUG   2024-08-21 15:21:24.926591 +01:00 < vary: Accept-Encoding,Accept-Language, Cookie
  DEBUG   2024-08-21 15:21:24.926596 +01:00 < allow: GET, POST, HEAD, OPTIONS
  DEBUG   2024-08-21 15:21:24.926599 +01:00 < access-control-allow-methods: GET, POST, HEAD, OPTIONS
  DEBUG   2024-08-21 15:21:24.926612 +01:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
  DEBUG   2024-08-21 15:21:24.926617 +01:00 < access-control-expose-headers: X-Sentry-Error, X-Sentry-Direct-Hit, X-Hits, X-Max-Hits, Endpoint, Retry-After, Link
  DEBUG   2024-08-21 15:21:24.926621 +01:00 < access-control-allow-origin: *
  DEBUG   2024-08-21 15:21:24.926629 +01:00 < x-sentry-rate-limit-remaining: 39
  DEBUG   2024-08-21 15:21:24.926632 +01:00 < x-sentry-rate-limit-limit: 40
  DEBUG   2024-08-21 15:21:24.926636 +01:00 < x-sentry-rate-limit-reset: 1724250085
  DEBUG   2024-08-21 15:21:24.926640 +01:00 < x-sentry-rate-limit-concurrentremaining: 24
  DEBUG   2024-08-21 15:21:24.926643 +01:00 < x-sentry-rate-limit-concurrentlimit: 25
  DEBUG   2024-08-21 15:21:24.926647 +01:00 < content-language: en
  DEBUG   2024-08-21 15:21:24.926656 +01:00 < x-frame-options: deny
  DEBUG   2024-08-21 15:21:24.926660 +01:00 < x-content-type-options: nosniff
  DEBUG   2024-08-21 15:21:24.926664 +01:00 < x-xss-protection: 1; mode=block
  DEBUG   2024-08-21 15:21:24.926671 +01:00 < content-security-policy: object-src 'none'; worker-src blob:; media-src *; frame-src app.pendo.io demo.arcade.software js.stripe.com sentry.io; frame-ancestors 'self' *.sentry.io; style-src * 'unsafe-inline'; font-src * data:; img-src * blob: data:; base-uri 'none'; connect-src 'self' *.algolia.net *.algolianet.com *.algolia.io sentry.io *.sentry.io s1.sentry-cdn.com o1.ingest.sentry.io api2.amplitude.com app.pendo.io data.pendo.io reload.getsentry.net t687h3m0nh65.statuspage.io sentry.zendesk.com ekr.zdassets.com maps.googleapis.com; default-src 'none'; script-src 'self' 'unsafe-inline' 'report-sample' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; report-uri https://o1.ingest.sentry.io/api/54785/security/?sentry_key=f724a8a027db45f5b21507e7142ff78e&sentry_release=75a768f93fb331822733be985060c9e3a05eaebe
  DEBUG   2024-08-21 15:21:24.926681 +01:00 < x-envoy-attempt-count: 1
  DEBUG   2024-08-21 15:21:24.926684 +01:00 < x-envoy-upstream-service-time: 79
  DEBUG   2024-08-21 15:21:24.926688 +01:00 < x-served-by: getsentry-web-rpc-production-6559685bb8-s5whr
  DEBUG   2024-08-21 15:21:24.926692 +01:00 < x-sentry-proxy-url: http://10.2.0.67:8999/api/0/organizations/wahedtech/chunk-upload/
  DEBUG   2024-08-21 15:21:24.926695 +01:00 < x-served-by: getsentry-control-web-default-common-production-58cf7fbb9fq9n5z
  DEBUG   2024-08-21 15:21:24.926704 +01:00 < x-served-by: frontend-default-5f45cd9978-7qpcp
  DEBUG   2024-08-21 15:21:24.926708 +01:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
  DEBUG   2024-08-21 15:21:24.926711 +01:00 < via: 1.1 google
  DEBUG   2024-08-21 15:21:24.926715 +01:00 < Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
  DEBUG   2024-08-21 15:21:24.926719 +01:00 < Transfer-Encoding: chunked
  DEBUG   2024-08-21 15:21:24.929652 +01:00 response status: 200
  DEBUG   2024-08-21 15:21:24.929667 +01:00 body: {"url":"https://us.sentry.io/api/0/organizations/wahedtech/chunk-upload/","chunkSize":8388608,"chunksPerRequest":64,"maxFileSize":2147483648,"maxRequestSize":33554432,"concurrency":8,"hashAlgorithm":"sha1","compression":["gzip"],"accept":["debug_files","release_files","pdbs","sources","bcsymbolmaps","il2cpp","portablepdbs","artifact_bundles","artifact_bundles_v2"]}
Uploading sourcemaps for release com.rn074@1.0+1 distribution 1
> Bundled 2 files for upload
> Bundle ID: 2bc09369-1828-5765-a6ee-647382633e0b
  DEBUG   2024-08-21 15:21:25.140767 +01:00 request POST https://sentry.io/api/0/organizations/wahedtech/artifactbundle/assemble/
  DEBUG   2024-08-21 15:21:25.140777 +01:00 using token authentication
  DEBUG   2024-08-21 15:21:25.140785 +01:00 json body: {"checksum":"b7be9cefa27a538cf76c3343d6b70d84f750875b","chunks":["b7be9cefa27a538cf76c3343d6b70d84f750875b"],"projects":["sentry-playground"],"version":"com.rn074@1.0+1","dist":"1"}
  DEBUG   2024-08-21 15:21:25.140789 +01:00 retry number 0, max retries: 5
  DEBUG   2024-08-21 15:21:25.140879 +01:00 > POST /api/0/organizations/wahedtech/artifactbundle/assemble/ HTTP/1.1
  DEBUG   2024-08-21 15:21:25.140884 +01:00 > Host: sentry.io
  DEBUG   2024-08-21 15:21:25.140887 +01:00 > Accept: */*
  DEBUG   2024-08-21 15:21:25.140889 +01:00 > Connection: TE
  DEBUG   2024-08-21 15:21:25.140892 +01:00 > TE: gzip
  DEBUG   2024-08-21 15:21:25.140895 +01:00 > User-Agent: sentry-cli/2.31.2
  DEBUG   2024-08-21 15:21:25.140908 +01:00 > Authorization: Bearer sntrys_e***
  DEBUG   2024-08-21 15:21:25.140910 +01:00 > Content-Type: application/json
  DEBUG   2024-08-21 15:21:25.140912 +01:00 > Content-Length: 181
  DEBUG   2024-08-21 15:21:25.346970 +01:00 < HTTP/1.1 200 OK
  DEBUG   2024-08-21 15:21:25.346989 +01:00 < server: nginx
  DEBUG   2024-08-21 15:21:25.346998 +01:00 < date: Wed, 21 Aug 2024 14:21:25 GMT
  DEBUG   2024-08-21 15:21:25.347002 +01:00 < content-type: application/json
  DEBUG   2024-08-21 15:21:25.347006 +01:00 < vary: Accept-Encoding,Accept-Language, Cookie
  DEBUG   2024-08-21 15:21:25.347009 +01:00 < allow: POST, OPTIONS
  DEBUG   2024-08-21 15:21:25.347012 +01:00 < access-control-allow-methods: POST, OPTIONS
  DEBUG   2024-08-21 15:21:25.347018 +01:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
  DEBUG   2024-08-21 15:21:25.347032 +01:00 < access-control-expose-headers: X-Sentry-Error, X-Sentry-Direct-Hit, X-Hits, X-Max-Hits, Endpoint, Retry-After, Link
  DEBUG   2024-08-21 15:21:25.347035 +01:00 < access-control-allow-origin: *
  DEBUG   2024-08-21 15:21:25.347038 +01:00 < x-sentry-rate-limit-remaining: 39
  DEBUG   2024-08-21 15:21:25.347040 +01:00 < x-sentry-rate-limit-limit: 40
  DEBUG   2024-08-21 15:21:25.347043 +01:00 < x-sentry-rate-limit-reset: 1724250086
  DEBUG   2024-08-21 15:21:25.347047 +01:00 < x-sentry-rate-limit-concurrentremaining: 24
  DEBUG   2024-08-21 15:21:25.347049 +01:00 < x-sentry-rate-limit-concurrentlimit: 25
  DEBUG   2024-08-21 15:21:25.347052 +01:00 < content-language: en
  DEBUG   2024-08-21 15:21:25.347055 +01:00 < x-frame-options: deny
  DEBUG   2024-08-21 15:21:25.347058 +01:00 < x-content-type-options: nosniff
  DEBUG   2024-08-21 15:21:25.347061 +01:00 < x-xss-protection: 1; mode=block
  DEBUG   2024-08-21 15:21:25.347067 +01:00 < content-security-policy: script-src 'self' 'unsafe-inline' 'report-sample' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; worker-src blob:; connect-src 'self' *.algolia.net *.algolianet.com *.algolia.io sentry.io *.sentry.io s1.sentry-cdn.com o1.ingest.sentry.io api2.amplitude.com app.pendo.io data.pendo.io reload.getsentry.net t687h3m0nh65.statuspage.io sentry.zendesk.com ekr.zdassets.com maps.googleapis.com; style-src * 'unsafe-inline'; default-src 'none'; object-src 'none'; font-src * data:; media-src *; frame-ancestors 'self' *.sentry.io; img-src * blob: data:; base-uri 'none'; frame-src app.pendo.io demo.arcade.software js.stripe.com sentry.io; report-uri https://o1.ingest.sentry.io/api/54785/security/?sentry_key=f724a8a027db45f5b21507e7142ff78e&sentry_release=75a768f93fb331822733be985060c9e3a05eaebe
  DEBUG   2024-08-21 15:21:25.347072 +01:00 < x-envoy-attempt-count: 1
  DEBUG   2024-08-21 15:21:25.347075 +01:00 < x-envoy-upstream-service-time: 81
  DEBUG   2024-08-21 15:21:25.347078 +01:00 < x-served-by: getsentry-web-rpc-production-6559685bb8-cn6rw
  DEBUG   2024-08-21 15:21:25.347081 +01:00 < x-sentry-proxy-url: http://10.2.0.67:8999/api/0/organizations/wahedtech/artifactbundle/assemble/
  DEBUG   2024-08-21 15:21:25.347084 +01:00 < x-served-by: getsentry-control-web-default-common-production-58cf7fbb9fh29q6
  DEBUG   2024-08-21 15:21:25.347087 +01:00 < x-served-by: frontend-default-5f45cd9978-m7nxn
  DEBUG   2024-08-21 15:21:25.347090 +01:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload
  DEBUG   2024-08-21 15:21:25.347093 +01:00 < via: 1.1 google
  DEBUG   2024-08-21 15:21:25.347096 +01:00 < Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
  DEBUG   2024-08-21 15:21:25.347100 +01:00 < Transfer-Encoding: chunked
  DEBUG   2024-08-21 15:21:25.350428 +01:00 response status: 200
  DEBUG   2024-08-21 15:21:25.350441 +01:00 body: {"state":"not_found","missingChunks":["b7be9cefa27a538cf76c3343d6b70d84f750875b"]}
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: wahedtech
> Project: sentry-playground
> Release: com.rn074@1.0+1
> Dist: 1
> Upload type: artifact bundle

Source Map Upload Report
  Scripts
    ~/index.android.bundle (sourcemap at index.android.bundle.map, debug id 0979806b-29c8-4310-b456-106d2079e612)
  Source Maps
    ~/index.android.bundle.map (debug id 0979806b-29c8-4310-b456-106d2079e612)

> Task :sentry_react-native:processReleaseManifest
package="io.sentry.react" found in source AndroidManifest.xml: /Users/davidwhite/Projects/RN074/node_modules/@sentry/react-native/android/src/main/AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported, and the value is ignored.
Recommendation: remove package="io.sentry.react" from the source AndroidManifest.xml: /Users/davidwhite/Projects/RN074/node_modules/@sentry/react-native/android/src/main/AndroidManifest.xml.

> Task :sentry_react-native:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/davidwhite/Projects/RN074/node_modules/@sentry/react-native/android/src/main/java/io/sentry/react/RNSentryOnDrawReporterManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :app:createBundleReleaseJsAndAssets_SentryCollectModules_com.rn074@1.0+1_1
Sentry Logger [info]: Reading source map from /Users/davidwhite/Projects/RN074/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
Sentry Logger [info]: Saving modules to /Users/davidwhite/Projects/RN074/android/app/src/main/assets/modules.json
Sentry Logger [info]: Resolving modules from paths /Users/davidwhite/Projects/RN074/node_modules
Sentry Logger [info]: Modules collected and saved to: /Users/davidwhite/Projects/RN074/android/app/src/main/assets/modules.json

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 1m 16s
74 actionable tasks: 70 executed, 4 up-to-date

The equivalent task for Task :app:createBundleReleaseJsAndAssets_SentryUpload_com.rn074@1.0+1_1 isn't happening in our other app for some reason. Let me keep digging. I don't think it will be easy to send a reproduction of the problem.

dwxw commented 2 months ago

I've spent some more time investigating, unfortunately still no closer. The _SentryUpload_ and _SentryCollectModules_ tasks don't run in our production app. They work fine in my clean RN app. I've debugged the sentry.gradle file and I can see these tasks being injected into the createBundle task. Unfortunately I'm not able to recreate the problem in a simple project. It feels like a race condition, the tasks are injected, but when gradle runs it doesn't use that modified createBundle task.

I'm unable to use the --scan feature, but I did use --profile. The tasks are there in the working project.

Working project Image

Not working project Image

Is it possible to show you on another channel?

dwxw commented 2 months ago

Figured it out. It wasn't possible for any task to be chained into dependencies of another task in our project. Our project had a setting in settings.gradle org.gradle.configureondemand=true. This feature is an optimization to make the builds run faster. Turns out it also doesn't run injected tasks. Gradle does say it's an "incubating feature", and it isn't enabled in a clean React Native project. Disabled it and Android source maps working. Might be worth mentioning somewhere as it was a big of a head scratch why things weren't working.

Thanks for your help @krystofwoldrich.