Skip to content

main.jsbundle.map not found in bundle phase #3723

@francescov1

Description

@francescov1

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.20.0

react-native version: 0.73.6

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • 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://[email protected]/...'
  // other options
});

I have the following issue:

I can build and run my app fine locally, but when trying to archive, I get an error related to finding a main.jsbundle.map file

As a temporary fix, I reverted the changes made in the Bundle React Native code and images phase.

Steps to reproduce:

  • Run an archive

Actual result:

Error. See logs below:

+ [[ true == true ]]
+ HBC_SOURCEMAP_FILE='/Users/francescovirga/Library/Developer/Xcode/DerivedData/LighthouseMobile-clqkvaplifyotcdbrajpghsatkgw/Build/Intermediates.noindex/ArchiveIntermediates/LighthouseMobile (Production)/BuildProductsPath/Release-iphoneos/LighthouseMobile.app/main.jsbundle.map'
+ /Users/francescovirga/Projects/lighthouse-mobile/node_modules/@sentry/cli-darwin/bin/sentry-cli /Users/francescovirga/Projects/lighthouse-mobile/node_modules/react-native/scripts/compose-source-maps.js '/Users/francescovirga/Library/Developer/Xcode/DerivedData/LighthouseMobile-clqkvaplifyotcdbrajpghsatkgw/Build/Intermediates.noindex/ArchiveIntermediates/LighthouseMobile (Production)/BuildProductsPath/Release-iphoneos/main.jsbundle.map' '/Users/francescovirga/Library/Developer/Xcode/DerivedData/LighthouseMobile-clqkvaplifyotcdbrajpghsatkgw/Build/Intermediates.noindex/ArchiveIntermediates/LighthouseMobile (Production)/BuildProductsPath/Release-iphoneos/LighthouseMobile.app/main.jsbundle.map' -o '/Users/francescovirga/Library/Developer/Xcode/DerivedData/LighthouseMobile-clqkvaplifyotcdbrajpghsatkgw/Build/Intermediates.noindex/ArchiveIntermediates/LighthouseMobile (Production)/IntermediateBuildFilesPath/LighthouseMobile.build/Release-iphoneos/LighthouseMobile.build/DerivedSources/main.jsbundle.map'
node:internal/fs/sync:25
  return binding.readFileUtf8(path, stringToFlags(flag));
                 ^

Error: ENOENT: no such file or directory, open '/Users/francescovirga/Library/Developer/Xcode/DerivedData/LighthouseMobile-clqkvaplifyotcdbrajpghsatkgw/Build/Intermediates.noindex/ArchiveIntermediates/LighthouseMobile (Production)/BuildProductsPath/Release-iphoneos/main.jsbundle.map'
    at Object.readFileUtf8 (node:internal/fs/sync:25:18)
    at Object.readFileSync (node:fs:441:19)
    at Object.<anonymous> (/Users/francescovirga/Projects/lighthouse-mobile/node_modules/react-native/scripts/compose-source-maps.js:34:8)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/francescovirga/Library/Developer/Xcode/DerivedData/LighthouseMobile-clqkvaplifyotcdbrajpghsatkgw/Build/Intermediates.noindex/ArchiveIntermediates/LighthouseMobile (Production)/BuildProductsPath/Release-iphoneos/main.jsbundle.map'
}

Node.js v20.9.0
Command PhaseScriptExecution failed with a nonzero exit code

Expected result:

No error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions