eas build localy ios/android failed

Hi guys, I’ve just got an error during my first eas build for ios on the local machine.

Besides the bunch of errors during the npm install and expo doctor,

npm
[INSTALL_DEPENDENCIES] WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
[INSTALL_DEPENDENCIES] npm
[INSTALL_DEPENDENCIES] WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
[INSTALL_DEPENDENCIES] npm
[INSTALL_DEPENDENCIES] WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[INSTALL_DEPENDENCIES] npm
[INSTALL_DEPENDENCIES] WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
[INSTALL_DEPENDENCIES] npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
[INSTALL_DEPENDENCIES] npm
[INSTALL_DEPENDENCIES] WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
[INSTALL_DEPENDENCIES] npm
[INSTALL_DEPENDENCIES] WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
[INSTALL_DEPENDENCIES] npm
[INSTALL_DEPENDENCIES] WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[INSTALL_DEPENDENCIES] npm WARN deprecated @react-native-community/masked-view@0.1.11: Repository was moved to @react-native-masked-view/masked-view
[INSTALL_DEPENDENCIES] npm
[INSTALL_DEPENDENCIES] WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
[INSTALL_DEPENDENCIES] npm WARN deprecated core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

and

RUN_EXPO_DOCTOR] [12:56:40] Some dependencies are incompatible with the installed expo package version:
[RUN_EXPO_DOCTOR] [12:56:40]  - expo-blur - expected version: ~11.1.0 - actual version installed: 11.2.0
[RUN_EXPO_DOCTOR] [12:56:40]  - react-native-safe-area-context - expected version: 4.2.4 - actual version installed: 4.4.1
[RUN_EXPO_DOCTOR] [12:56:40] Your project may not work correctly until you install the correct versions of the packages.
[RUN_EXPO_DOCTOR] To install the correct versions of these packages, please run: expo doctor --fix-dependencies,
[RUN_EXPO_DOCTOR] or install individual packages by running expo install [package-name ...]
[RUN_EXPO_DOCTOR] Command "expo doctor" failed.
Error: bash exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/vahidafshari/.npm/_npx/86c1f166462562ca/node_modules/@expo/spawn-async/build/spawnAsync.js:41:23)
    at Object.onceWrapper (node:events:642:26)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
    ...```
I have finally got Ruby crash on the process.


[INSTALL_PODS] /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275: [BUG] Bus Error at 0x000000010070c000
[INSTALL_PODS] ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]
[INSTALL_PODS] -- Crash Report log information --------------------------------------------
[INSTALL_PODS]    See Crash Report log file under the one of following:
[INSTALL_PODS]      * ~/Library/Logs/DiagnosticReports
[INSTALL_PODS]      * /Library/Logs/DiagnosticReports
[INSTALL_PODS]    for more details.
[INSTALL_PODS] Don't forget to include the above Crash Report log file in bug reports.
[INSTALL_PODS] -- Control frame information -----------------------------------------------
[INSTALL_PODS] c:0049 p:---- s:0307 e:000306 CFUNC
[INSTALL_PODS] :attach

I have installed fastlane, configured eas.json and anything else just like the instruction said, but still got failed

Hi @vahidafshari

Those are warnings. Not errors. They are an unfortunate and annoying fact of life with JavaScript dependencies/npm.

About the expo doctor warnings, try running:

expo-cli doctor --fix-dependencies

The Ruby crash seems to be related to Ruby’s “ffi” module and M1 Macs. Searching for pod install "[BUG] Bus Error at" turns up a lot of hits.

This one looks promising: ruby - Error installing a pod - Bus Error at 0x00000001045b8000 - Stack Overflow

Same thing here: Segmentation fault on M1 macOS Big Sur · Issue #864 · ffi/ffi · GitHub

1 Like

Thank you.
I followed the lines you’ve sent
1- Run expo-cli doctor --fix-dependencies solve removed some warning
2- after The ruby crash line, I found this line:

[INSTALL_PODS] 
Error: pod exited with signal: SIGABRT
    at ChildProcess.completionListener (/Users/vahidafshari/.npm/_npx/86c1f166462562ca/node_modules/@expo/spawn-async/build/spawnAsync.js:40:23)
    at Object.onceWrapper (node:events:642:26)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket.<anonymous> (node:internal/child_process:451:11)
    at Socket.emit (node:events:527:28)
    at Pipe.<anonymous> (node:net:709:12)

I got no problem with expo build:ios but since the previous method is expired, this is my first try on eas build, and since I’m using managed workflow, it seems very native error to me. so, I run gem install --user-install ffi -- --enable-libffi-alloc and got this:

WARNING:  You don't have /Users/vahidafshari/.gem/ruby/2.6.0/bin in your PATH,
          gem executables will not run.
Building native extensions with: '--enable-libffi-alloc'
This could take a while...
Successfully installed ffi-1.15.5
Parsing documentation for ffi-1.15.5
Installing ri documentation for ffi-1.15.5
Done installing documentation for ffi after 8 seconds
1 gem installed
➜  fitlinez git:(master) ✗ pod install
[!] No `Podfile' found in the project directory.

still build failed

meanwhile, I tried to build ios on EAS build and got a different error.

I faced this one while there is no problem with this module neither in the expo publish nor simulator. also this error is shown under the run fastlane section

❌ Metro encountered an error:
Unable to resolve module ../fitlinez/api/ignoreWarning from /Users/expo/workingdir/build/App.js:

None of these files exist:
  * ../fitlinez/api/ignoreWarning(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
  * ../fitlinez/api/ignoreWarning/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
  18 | import FlashMessage from 'react-native-flash-message';
  19 | import WorkoutContext from './api/workoutcontext';
> 20 | import '../fitlinez/api/ignoreWarning';
     |         ^
  21 |
  22 | logger.start();
  23 |

:+1:

Was this before or after you reinstalled ffi?

Looks good so far.

This is run automatically during the eas build build process, so not something you need to run. (See step 10 of the “Remote steps”. “Remote” in the context of a local build basically means “in a temporary directory”.)

Could you paste the error here?

I assume you mean on Expo’s build servers?

Do you have a path like “fitlinez/api/ignoreWarning.js” or “fitlinez/api/ignoreWarnings/index.js” or similar in your code? Or is this referencing a directory outside of the app’s Git repository? If so, that path will not be available during the build.

There are a few ways to solve this. e.g. publish that “fitlinez” code to npm or a private repository. Or copy the code into your app. Or set up a monorepo containing that code and your app. Or maybe use a Git submodule for the “fitlinez” code.

1 Like

The problem was just solved. I had an unhandled promise and after fixing that, the local build has done successfully.

1 Like