Hi, this has been blocking me for a fair few days now trying to create an Android eas preview internal distribution build for testing, the app shows the new version in dev mode and using eas update but when I try and install a built apk after uninstalling the last version the changes from the new build do not show.
I can reproduce this by installing an apk on a physical Android device, a Pixel 5 emulator, by doing expo start --no-dev and in a fresh empty project. On the device and in the emulator on first load of the updated apk it crashes. The new app will show changes when I clear all Android user data in the emulator system menu then reinstall using adb. When using
expo start --no-dev if I clear storage and uninstall expo it installs the new apk.
How do you update/re-install an internal distribution apk?
Here’s my environment details:
expo-env-info 1.0.5 environment info:
OS: Linux 5.15 Ubuntu 20.04.4 LTS (Focal Fossa)
Shell: 5.0.17 - /bin/bash
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 1.22.18 - ~/.nvm/versions/node/v16.14.2/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
expo: ~46.0.7 => 46.0.15
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
react-native: 0.69.6 => 0.69.6
react-native-web: ^0.18.2 => 0.18.9
Expo Workflow: managed
Thanks in advance
I’m not 100% what the steps are to reproduce the problem.
Could you please list step by step instructions for what I would need to do to see the same problem? Also be very explicit about what APK you’re talking about and whether you’re referring to the same APK or different APKs in each step.
npx create-expo-app my-app
- Build a development APK with:
eas build -p android --profile development
It sounds a bit like you’re trying to use an APK built with
eas build -p android --profile preview with
npx expo start? This doesn’t make sense. A “preview” build is not a dev client. It’s standalone.
Sorry my issue may have not been that clear. Yes, the problem is with creating an internal distribution using
eas build -p android --profile preview, I can’t see the changes when I uninstall and reinstall the app on my Android device. I can see the changes on a Pixel 5 emulator when I clear all user data and then reinstall.
I’m not trying to use an apk with expo start, I was making assumption that I can reproduce the bug using
expo start --no-dev where I also don’t see the changes in a brand new project unless I clear android emulator data.
The steps to reproduce that were:
Start new blank expo project
npx create-expo-app my-app
Then start app on Android
expo start --no-dev
Open app by pressing a, after it opens make a change to the default app js for example by adding a “1”.
Observe that the change isn’t shown when you press “a” again to update the app."
But after trying it with a bare project
eas build -p android --profile preview build as you suggest it does show the changes on reinstall. I’ll add things back to the bare project until I can give you a reproducible example.
Thanks for the quick reply
OK, so the
--no-dev option causes the fast refresh not to work, but for me if I do this:
- npx expo start --no-dev
- Press ‘a’ to open the app
- Edit App.js to make a minor change
- Close the app on the emulator
- Press ‘a’ to open it again
then I see the change.
--no-dev I don’t need to close the app and press ‘a’ again. The change appears automatically.
By “bare” I assume you mean “standalone”?