Hi,
there is an issue with MacOS 13.1 and building for iOA via eas build --local … Once the build script tries to open launchPackager.command, it will fail with error:
“launchPackager.command” can’t be opened because (null) is not allowed to open documents in Terminal.
The problem is, that know workarounds are not working for eas build as the script is copied to “random” temporary location during the build.
Is there any known solution or workaround for this issue or I just need to wait for the fix implemented in core react-native or MacOS (as this may be an OS issue).
can you provide a minimal reproducible example? also, you can work around this issue in your project with eas build --local by using a build lifecycle hook to do perform whatever the workaround is: Build lifecycle hooks - Expo Documentation
ls -l node_modules/react-native/scripts/launchPackager.command
In a random app of mine I see the following:
-rwxr-xr-x 1 michael staff 1039 Nov 9 13:59 node_modules/react-native/scripts/launchPackager.command
The workarounds involving chmod imply that the file is not executable, but in my case it is (I’m not running macOS 13.1, but I’m not sure why that would cause this.)
As Brent says, you could use a eas-build-post-install hook to run chmod 755 node_modules/react-native/scripts/launchPackager.command
I also checked file permissions on the temporary location and again, it seems ok:
-rwxr-xr-x@ 1 ladasoukup staff 1039 Nov 10 23:57 node_modules/react-native/scripts/launchPackager.command
But I was able to somehow fix the issue by setting full disk access to VSCODE and Terminal apps and also allowing VSCODE and Terminal to run unsigned code in MacOS settings (Privacy & Security > Developer Tools).
It was the “900_000” notation, when changed to “900000”, build is working… So I actually had 2 issues combined. First was an OS error “launchPackager.command” can’t be opened because (null) is not allowed to open documents in Terminal. but the build actually crashed on the code above and did not produce the jsbundle file.
I tried to build another project with the same OS error dialog and the build was successful. The OS dialog was fixed by setting the permission to run unsigned code from Terminal, but it wasn’t the core reason of failed build.