EAS build in release mode crashes immediatly, where it works fine in dev

Hi guys,

I’m currently migrating an expo dev from expo build to EAS build, and face difficulties as the EAS build crashes immediately when launched, either from play store or local apk, which is not the case in dev mode.
I encounter the same issue with expo run:android in release mode, which is said to be similar to what EAS build does in release mode.

Ubuntu 22
Expo SDK 47
Android Studio 2021.3.1
Nodejs 18

The following steps are reproducing the problem :
remove completly the project dir
git clone repo
npx expo run:android → uploaded on the phone, works

same process but in release mode
npx expo run:android --variant release → uploaded on the phone, fails immediately, no info

I also made some debugging with Android Studio, building the apk with “eas build --local --profile development” and then using “Profile or debug APK” to debug, and it seems that the build can’t find the file “index.android.bundle” in the assets directory.
I suspect also some issues with the SVG conversion

I also tried pre-build, gradle clean, etc … but nothing solved my problem, I can’t publish the app as it fails !

I searched in forums but did not find any fix.

Any kind of help appreciated !
I’m stuck

Same issue here!

Some progress even if still not resolved.

A blank app works fine, in release mode as in dev mod.
The same blank app added with the same SVG conversion and one SVG file for test works fine also, release and dev.

It seems that SVG conversion can be excluded.

Anyway I do not see either in the blank test project any “index.android.bundle” file as it is claimed in logcat when it fails ?


I finally managed to get out of the issue.
Here is the way I did, as it may help others.

Step 1 ensure to have a blank app working :
I created a blank app using the latest versions : expo SDK nodejs etc …
Run the blank app in dev, check that it worked in dev
Build the blank app with EAS, check that the apk was working, from local and from expo server

Step 2 ensure to build the blank with ALL the needed packages :
Install ALL the needed packages inside the blank app
Check that the build with EAS was still OK after each install
I had to solve 2 issues due to unnecessary and/or incompatible packages, out of approx 30

Step 3 build the real app with the same packages :
When the blank app was ready with all the needed packages, I copied the deps and the dev-deps from the package.json of the blank into the package.json of the real app, without changing anything else in the real app.

Step 4 resolve updates :
Then I resolved the updates of the real app, due to newer versions of the dependencies installed.
I had issues with 4 packages, minor issues.

When these issues were solved the app built correctly with EAS, without making any change such as removing minify, or changing the gradle API version, etc …

Honestly it was a real pain but fortunately I got out of it and now I can continue pushing updates and make customers happy again !!

1 Like

See also:

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