eas build local - iOS on MacOS 13.1 will fail

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.

This issue is also tracked here (react-native): “launchPackager.command” can’t be opened because (null) is not allowed to open documents in Terminal · Issue #35726 · facebook/react-native · GitHub

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).

update: it looks like that cloud eas build just failed with the same 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

What are the permissions on the file?

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

file permissions seems to be ok,
-rwxr-xr-x 1 ladasoukup staff 1039 Nov 10 23:57 node_modules/react-native/scripts/launchPackager.command

Going to try the build hooks (I didn’t know about them - my bad)

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).

As a matter of interest, what does this give you for the one with the @ sign after the permissions?

xattr node_modules/react-native/scripts/launchPackager.command

ok, I probably found the main issue here…

const {
    data: radioList,
    revalidate: reloadRadioList,
    isValidating: radioListReloading,
  } = useSWR(CFG.radioList, { refreshInterval: 900_000 });

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.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.