Repository navigation
main.jsbundle.map: No such file or directory when iOS project name includes spaces #41844
Description
Activity
Duplicates #41652
@maykonmichel I saw that your PR actually is different than this other one: #40937
Can you look into it and verify if it solves your issue instead?Can you look into it and verify if it solves your issue instead?
It doesn't. Actually makes it worse as app is crashing for me.
*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Property 'Reproducer' doesn't exist ReferenceError: Property 'Reproducer' doesn't exist at global (address at /Users/maykon/Library/Developer/CoreSimulator/Devices/A2F4DE2D-DC69-43A7-B897-744B56C8813E/data/Containers/Bundle/Application/A87E55DB-E847-458E-A806-71BA6CA1DFAF/Reproducer App.app/main.jsbundle:1:13284)', reason: 'Unhandled JS Exception: Property 'Reproducer' doesn't exist ReferenceError: Property 'Reproducer' doesn't exist at global (address at /Users/maykon/Library/Developer/Core...' *** First throw call stack: ( 0 CoreFoundation 0x0000000180491128 __exceptionPreprocess + 172 1 libobjc.A.dylib 0x000000018008412c objc_exception_throw + 56 2 Reproducer App 0x000000010078ed6c RCTFormatError + 0 3 Reproducer App 0x00000001007a4edc __28-[RCTCxxBridge handleError:]_block_invoke + 516 4 libdispatch.dylib 0x00000001010980f0 _dispatch_call_block_and_release + 24 5 libdispatch.dylib 0x000000010109993c _dispatch_client_callout + 16 6 libdispatch.dylib 0x00000001010a95e4 _dispatch_main_queue_drain + 1228 7 libdispatch.dylib 0x00000001010a9108 _dispatch_main_queue_callback_4CF + 40 8 CoreFoundation 0x00000001803f1a30 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 9 CoreFoundation 0x00000001803ec148 __CFRunLoopRun + 1936 10 CoreFoundation 0x00000001803eb5a4 CFRunLoopRunSpecific + 572 11 GraphicsServices 0x000000018e9fbae4 GSEventRunModal + 160 12 UIKitCore 0x00000001852f02e4 -[UIApplication _run] + 868 13 UIKitCore 0x00000001852f3f5c UIApplicationMain + 124 14 Reproducer App 0x0000000100746530 main + 80 15 dyld 0x0000000101011544 start_sim + 20 16 ??? 0x00000001011b60e0 0x0 + 4313538784 17 ??? 0xaf4a000000000000 0x0 + 12630908104913977344 ) libc++abi: terminating due to uncaught exception of type NSExceptionReproducible example here.
Re-opening based on last comment.
I had the same issue, but it was a space in the Scheme name that caused the build failure. Removing the space resolved the issue.
This surfaced when migrating from 0.72.6 to 0.73.1. No problems before that.
Reacted by Roger Kerse, Mihai Lapuste, Harvey-Co, David White, Niels Ladekarl, Ellis Min and adarshcars24I had same issue with 0.73.2. To bypass this, I edited my XCode schema name to not have spaces. This of course shouldn't be necessary.
I have spent numerous hours trying to figure out why upgrading to 0.73.2 from 0.71.X was failing.
I couldn't build main.jsbundle, i couldn't build the map files either, etc.Renaming all references of my schema name to a name without spaces resolved this issue.
So much time wasted on something that used to workJust wanted to add that I'm having this issue on 0.72.6. It seems to be the scheme name having a space that causes the issue.
Just wanted to add that I'm having this issue on 0.72.6. It seems to be the scheme name having a space that causes the issue.
I was experiencing the same thing. Renaming the schemes by replacing spaces with hyphens resolved the issue for me.
Fixed by #42220
Description
To enable React Native source maps, it is possible to include a
SOURCEMAP_FILEenvironment variable in theios/.xcode.envfile. However, this method has a limitation: if the iOS project name contains a space, an issue arises. The problem stems from the fact that thereact-native/scripts/react-native-xcode.shscript utilizes the basename command without enclosing the$SOURCEMAP_FILEargument in double quotes, leading to unintended word splitting.Steps to reproduce
export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.map"into theios/.xcode.envfile.React Native Version
0.72.7
Affected Platforms
Runtime - iOS
Output of
npx react-native infoStacktrace or Logs
Reproducer
https://github.com/maykonmichel/reproducer-react-native
Screenshots and Videos
No response