Expo SDK 43 fail to build Android version

Managed workflow
eas-cli/0.33.0

Tried, enabling/disabling Hermes, trying to run build multiple times, checking if all dependencies are correct with expo doctor.

The build is failing without any useful debug information.

In console I have:

✖ Build failed

🤖 Android build failed:
Internal Server Error.
Please try again later. If the problem persists, please report the issue.

On EAS dashboard the build ends with:

> Task :expo-updates:createReleaseExpoManifest

                    Welcome to Metro!

              Fast - Scalable - Integrated

And that’s it. No errors. Very odd. iOS version is built without any issues.

Any suggestions? This started happening after upgrading to SDK 43. Everything works in Expo Go.

can you share a link to your build page?

Sure: Build Details — f426244c-a51d-4fde-ac05-5bed562ad8cd — RemoteHQApp — Expo

I tried multiple times, but this is the last one

thanks! it looks like the connection to the worker may be dropping. we’re looking into it

to unblock yourself while we investigate, if this is urgent, you could try using eas build --local: Running builds on your own infrastructure - Expo Documentation

Thanks, I’ll try that.

it looks like the build failed on our end due to oom error - the build needed more than 12gb of ram. we’ll ensure we have better errors for this and investigate the cause. we may need to also bump the available memory to build workers.

would you be able to privately share your repository by chance? i’d be interested in seeing what is causing this in your case

This is really odd. The app is very simple. There’s few screens with NativeBase UI kit, Urql graphql client, and that’s it. Maybe there’s memory leak somewhere, but it builds and works very fast locally.

I’ll let you know tomorrow if I can share a codebase.

thanks! i’m brentvatne on github.

i agree it’s strange, hopefully we can take a look and get a better understanding

I’ll shared a private repo with you @notbrent. Unfortunately, local EAS build is failing too, but for some other reasons:

[PREPARE_CREDENTIALS] Writing secrets to the project's directory
[CONFIGURE_EXPO_UPDATES] Setting the release channel in 'AndroidManifest.xml' to 'staging'
[RUN_GRADLEW] Running './gradlew :app:assembleRelease' in /var/folders/lj/7bbf0zd56jq7zdw6plcyxr8h0000gn/T/eas-build-local-nodejs/5e6551a4-f99b-446f-aaef-22a2b0b34d26/build/android
[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Could not open settings generic class cache for settings file '/private/var/folders/lj/7bbf0zd56jq7zdw6plcyxr8h0000gn/T/eas-build-local-nodejs/5e6551a4-f99b-446f-aaef-22a2b0b34d26/build/android/settings.gradle' (/Users/devilcoders/.gradle/caches/6.9/scripts/eyz4abbxqyaloz6a2yn48lnkl).
[RUN_GRADLEW] > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED in 305ms
[RUN_GRADLEW] Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

Not sure, what exactly is happening, but probably related to Java. I was really hoping to release this for Monday.

Actually, I managed to build it locally now. Took about 5m.

Looks like you were building with a version of Java that was too new. :slight_smile:

I run into this constantly before remembering to export JAVA_VERSION=1.8.

Yeah, fixed that already locally. The EAS build failure still stands though :frowning:

it looks like your js bundle is 16.34mb and building this bundle with node is causing the eas build worker to run out of memory - currently the memory limit per worker is 12gb (we’re working on getting a good error message in place for this, and we’re also working on offering different worker configurations with more memory). it looks like phosphor-react-native adds about 11.66mb to your js bundle. this is quite bad because it makes it much more expensive for the js engine to parse the bundle and you’ll notice that this is particularly slow on low end android devices. phosphor-react-native appears to add about 1000 components to your js bundle, and each one includes an svg, all encoded in js.

i determined this by running the following in your project: npx react-native-bundle-visualizer --platform android.

i would recommend moving away from this library or perhaps migrating it to use font icons, like @expo/vector-icons / react-native-vector-icons

3 Likes

@notbrent I see, thanks a lot for the investigation! I’ve been doing web for a long time, but this is my first mobile app, so I’m a bit blind here. I noticed the slowdown, but wasn’t sure why it happened. This is very valuable info.

1 Like

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