Expo standalone android build doesn't match expo published build

Hi, I would expect my android standalone build to match my latest published version. However, when I run the android standalone build, some of my components (in a list) are not getting rendered. I’m not sure how to debug this besides from trial and error, which could take hours, repeatedly building new APKs. I know this is vague so I’ve provided a screenshot. The standalone is NOT displaying an old version. It just seems that how it interprets my code is different.

Does anyone know a faster way to get to the bottom of this, and why it might be happening?

Huh, well I found the code that was causing the issue:

I’m curious why this works on the same android phone, but only inside the expo app? Does it use a different Javascript interpreter?

As far as I can see from using-modern-javascript it should be supported.

Hey @rolznz - when your JS runs in production, it’s different from the development bundle – there are some extra transpilation/minification steps that happen to make it as small as possible. You can run expo start --no-dev --minify to test what a production bundle would look like while still in development. That is likely the reason for the differing behavior you see.

As an aside, which SDK version are you using? Another possibility is that the updated JSC we announced with Expo SDK 31 is treating this code differently. JSC was updated for all Expo SDK versions in the Expo client, but not standalone apps – only SDK 31 apps get the updated JSC.

1 Like

@esamelson thanks for the reply :slight_smile:

I was on Expo SDK 30 at the time I encountered the issue. I’ve just updated to Expo SDK 31 and can confirm that using expo start --no-dev --minify allows me to use the ES2015 feature on my android phone. I haven’t done a full android build yet.

Is it possible expo start --no-dev --minify could be integrated into the “production” mode?

@rolznz - I believe that’s actually exactly what the “production” mode does :smile: I forgot about that (relatively) new way of activating it, apologies for the confusion!

1 Like

Ok, I’ll have to test a standalone build then, as production mode worked on my android in SDK 30. I’ll update here when I’m done.

@esamelson Fixed in SDK 31. Thanks!

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