turtle build creating apk with old version

expo diagnostics:

Expo CLI 3.19.2 environment info:
OS: macOS 10.15.4
Shell: 5.7.1 - /bin/zsh
Node: 12.8.1 - ~/.nvm/versions/node/v12.8.1/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.10.2 - ~/.nvm/versions/node/v12.8.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Android Studio: 3.6 AI-192.7142.36.36.6308749
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
expo: ^36.0.0 => 36.0.2
react: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
react-navigation: ^4.0.10 => 4.0.10
expo-cli: 3.19.2

Everytime I make a build locally with turtle-ci the apk contains the same, old, version of the js code. No Idea why nor how to change this. If I run on device with expo running, I see the changes reflected. Any Idea?

build command uses last published version of the code, this applys to both expo-cli and turtle-cli builds, only difference is that expo-cli by default is running publish.

If you seeing old code I assume that you forgot to publish it before building.

ok, thank you. What’s the purpose of building locally then?

I don’t understand.
Is there a way to do everything locally for debugging purpose? I have a keyboard going over a text field in react-native-gifted-chat only when built on device (not running on expo).

That requires lots of try - rebuild that would take time.

Any suggestions?

Turtle-cli is intended for people who don’t want to use our infrastructure (e.g. for safety reasons).

If you want build everything locally, you would need run

  • expo export
  • host dist directory on local http server e.g. python -m http.server
  • run build using turtle-cli with --public-url pointing to localhost

if you want debug sth that is only on release build then eject to debug the problem and later just revert local changes

Nice! thanks!

However it seems that turtle supports only https urls?

May 4 17:21:05 turtle[89853] ERROR: Failed to build standalone app
err: Error: --public-url is invalid - only HTTPS urls are supported
at /usr/local/lib/node_modules/turtle-cli/src/bin/utils/builder.ts:63:17
at Command. (/usr/local/lib/node_modules/turtle-cli/src/bin/index.ts:23:18)
platform: “android”

You can use ngrok to have https URL to your local server

As I mentioned before if you need this only to debug some issue, ejecting is a lot simpler.

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