EAS build vs expo build: code executing differences

SDK: 42
eas: 0.37.0

I tried both build systems and behavior of “back” button in android is different:

In old classic expo build when I press “back” app is not really closed, it is running in background, when I run app again it is opened immediately.

In new EAS build when I press “back” button and run it again (all with same 2 seconds delay) I see splash loading screen which stays visible much less time than when app is really closed (“cold” start) but splash screen means that app is loading again (!) but app was not really (fully) closed. Some code of app works like it is cold start (inits) and some code (mostly animations with “useNativeDriver”) is still running.

This looks very strange.

Are big differences in handling “back” button in these build systems and why on new EAS build I see splash startup screen every time I open app even after 2 seconds? On old expo build system the same code base works as expected (no splash screen on reopen app)

I can confirm this! As well as many other bugs I met after start using EAS build.

We met similar behaviour after building our app using EAS build - splash screen and, since we use auth session in memory, all objects in memory get erased and users have to auth again.

However, when I just use swipe gesture “from bottom to top” in order to turn the app to background and then re-open it again - no problems, the app stays with the expected state.

all objects in memory get erased

yes, same behavior!

However, when I just use swipe gesture “from bottom to top” in order to turn the app to background and then re-open it again - no problems, the app stays with the expected state.

the same

I added issue EAS build vs expo build: code executing differences · Issue #799 · expo/eas-cli · GitHub
Please vote

This issue is very serios, code works strange. EAS is not ready for production yet

Our builds (iOS and android) crash periodically in production by strange reasons, they are not related to our biz logic, its just an internal RN/kotlin/java/swift.

Sentry constantly sends errors like OutOfMemory on iOS (never seen before using classic expo build), some NullPointers on Android or SkDrawable::draw.

We made a big stake on EAS build and we have paid plan…

are you able to reproduce this on sdk 43? can you post an issue to Issues · expo/expo · GitHub with a reproducible example please?

your users likely would have experienced the same crashes previously, only you would not have been notified because with expo build you were only seeing javascript related crashes. with eas build you can now see native crashes as well. if you believe you have found bugs that are caused by expo tools, please post an issue to Issues · expo/expo · GitHub with a reproducible example

What SDK version do you use?

Do you use expo-asset module which awaits for assets to be loaded?

Do you use useBackHandler from @react-native-community/hooks or BackHandler from react-native?

I am trying to find same modules/code to find out reason.

Thanks for raising this, have been pulling out my hair on this one. Following this topic to understand

1 Like

I use SDK 43.

I don’t use expo-asset, but I use expo-font for loading fonts on startup.
I don’t use BackHandler and useBackHandler hook as well.

@misha.bridge @svarto

I just started clear new empty project on SDK 43 and EAS 0.37. With default template demo code all works same as in classic expo build, so I thought maybe problem is elsewhere…

I look how my apps are starting and what can show splash screen and found that I use expo-asset module which awaits for assets to be loaded and during that it shows default loader via expo-app-loading module.

I caught this bug and made working example. The same code, but different behavior when I press “back” button on android and then after 2 seconds (no matter really how much time) I open app again:

  • With classic expo build: app is showing immediately with images, no splash screen visible

  • With EAS build: app is quickly showing splash screen (that means assets are loaded again! but WHY?!) and then app is showing and then images are appearing like it is first time “cold” start - every image is loaded with little delay)

So… that means EAS build AND/OR expo-asset module produce bug(s). And it is really visible.

I caught and tested this with one image, but for better visible effect I added example with 3 big images.

Repo with reproducible bug and how to test instructions:

Recorded video of this bug with and slowed it 2 times for better visual checking:

Except my previous bug report with images, found same behavior with fonts.

Added second demo bug example to EAS build vs expo build: code executing differences, REPOs with 2 demos of bug (images and fonts) · Issue #15326 · expo/expo · GitHub

@svarto

I caught this bug with stable reproducible 2 demos with assets and fonts: on classic build works good, on EAS - on every app opening is visible splash screen.

You can vote or approve if you have same behavior.

https://github.com/expo/expo/issues/15326

Great catch!

Hope this will be fixed in EAS 0.44