bugsnag / bugsnag-expo

MIT License
11 stars 5 forks source link

Error when uploading source maps from EAS build #62

Closed filipecatraia closed 6 months ago

filipecatraia commented 1 year ago

Describe the bug

After submitting a built to EAS:

  1. Android built successfully and source maps were uploaded.
  2. iOS failed with the following error:
› Executing Flowchase » Upload source maps to Bugsnag
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸   PhaseScriptExecution Upload\ source\ maps\ to\ Bugsnag /Users/expo/Library/Developer/Xcode/DerivedData/Flowchase-dqtytsgkfadtwteridyhlzhrlmyt/Build/Intermediates.noindex/ArchiveIntermediates/Flowchase/IntermediateBuildFilesPath/Flowchase.build/Release-iphoneos/Flowchase.build/Script-026EE93FE26B4D48B5B4D384.sh (in target 'Flowchase' from project 'Flowchase')

To be clear: this causes an iOS build to fail.

Let me know if there's any extra info I can provide, I'd like to help :)

Steps to reproduce

???

Environment

Error messages: ``` › Executing Flowchase » Upload source maps to Bugsnag ▸ ** ARCHIVE FAILED ** ▸ The following build commands failed: ▸ PhaseScriptExecution Upload\ source\ maps\ to\ Bugsnag /Users/expo/Library/Developer/Xcode/DerivedData/Flowchase-dqtytsgkfadtwteridyhlzhrlmyt/Build/Intermediates.noindex/ArchiveIntermediates/Flowchase/IntermediateBuildFilesPath/Flowchase.build/Release-iphoneos/Flowchase.build/Script-026EE93FE26B4D48B5B4D384.sh (in target 'Flowchase' from project 'Flowchase') ```
gingerbenw commented 1 year ago

Hi @filipecatraia! Are you using a monorepo here, or a standalone repo?

filipecatraia commented 1 year ago

@gingerbenw Standalone! I saw the other issue about monorepos :) I ended up removing sourcemaps, otherwise I couldn't build on iOS.

renatoniro commented 1 year ago

👋 Hey there! - commenting to follow along with this thread as I also seem to be seeing the same behaviour with iOS builds failing in EAS at the final step where bugsnag sourcemaps are uploaded (PhaseScriptExecution fails), thus holding up app-store releases. My project is also not a monorepo.

Environment

Bugsnag version: 45.0.0 Expo SDK version (e.g. SDK 44): 45.0.0 @bugsnag/plugin-expo-eas-sourcemaps: 45.1.0 (I have also tried with the latest 46.0.1)

nickdowell commented 1 year ago

We have not (yet) been able to reproduce this build issue.

If you're willing and able to reproduce it in a local build we will hopefully be able to get more logs and determine the cause. The following commands replicate EAS's build process locally:

export EAS_LOCAL_BUILD_ARTIFACTS_DIR=/tmp/eas-build
export EAS_LOCAL_BUILD_SKIP_CLEANUP=1
eas build --platform ios --local

Opening the Xcode project left in $EAS_LOCAL_BUILD_ARTIFACTS_DIR and building it directly in Xcode should provide the more verbose logs that we need. Thanks!

filipecatraia commented 1 year ago

Sadly, the last time I tried to build locally, I ended up in a 4-day quest down the rabbit hole onto the land of madness. If we knew the build IDs, is there any chance you can convince Expo to give us better logs and/or a copy of the build artifacts?

gingerbenw commented 1 year ago

Hi @filipecatraia, you should be able to download the full Xcode logs by expanding the > Xcode logs build stage and hitting "Download".

If you could write to us at support@bugsnag.com with your build ID, we can pass that over to the Expo team for further investigation.

filipecatraia commented 1 year ago

Hey @gingerbenw, these had the issue we're describing here:

Good luck with Expo!

johnkiely1 commented 1 year ago

Apologies for the delays on this, we did manage to get the following from expo


Error: SOURCE_MAP /var/folders/h2/gp9wlkv11lg0qj6y2mnqgc_40000gn/T//bb15bffadd4744905fca39ed5195ffdb-main.jsbundle.map could not be found.
Ensure the --sourcemap-output option is passed to the react-native bundle command.
Command PhaseScriptExecution failed with a nonzero exit code

Unfortunately it's difficult for us to tell or investigate exactly why this file wouldn't be found other than suggesting that sourcemap wasn’t being generated or wasn’t in the correct location. We have tried to reproduce what you are seeing but we have not been able to. Have you managed to get any further or are you still seeing the same issue?

johnkiely1 commented 1 year ago

Going to close this out at there is not a lot more we can do at this point, happy to reopen if you have any additional information you can share.

joaquin03 commented 9 months ago

Is there any news on this? I'm having the same issue.

clr182 commented 9 months ago

Hi @joaquin03 Unfortunately we do not have an update on this issue. However, as per the above suggestions if you are able to reproduce this issue in a local build then we should be able to get more logs and determine the cause.