#App crashes while installing build using `shorebird preview` for Android

1 messages · Page 1 of 1 (latest)

little stag
#

Following is the exception

Which platform would you like to preview? Android
✓ Using production track (1.1s)
✓ Extracting metadata (0.4s)
✓ Building apks (4.9s)
✓ Installing apks (9.4s)
✓ Starting app (0.5s)
--------- beginning of main
06-21 19:21:58.708 24049 24049 I flutter : updater::cache::updater_state: No existing state file found: File /data/user/0/in.stablemoney.app/files/shorebird_updater/state.json does not exist, creating new state.
06-21 19:21:58.708 24049 24049 I flutter : [INFO:shorebird.cc(173)] Shorebird updater: no active patch.
06-21 19:21:58.708 24049 24049 I flutter : [INFO:shorebird.cc(177)] Starting Shorebird update
06-21 19:21:58.709 24049 24260 I flutter : updater::network: Sending patch check request: PatchCheckRequest { app_id: "XXXXXXXXXXXXXXXXXXXXXXXXX", channel: "stable", release_version: "1.10.26+376", patch_number: None, platform: "android", arch: "aarch64" }
06-21 19:21:58.718 24049 24049 F flutter : [FATAL:flutter/runtime/dart_vm_initializer.cc(89)] Error while initializing the Dart VM: Wrong full snapshot version, expected '3eda3cd112d4dbe04d80281af1ee5708' found 'ee1eb666c76a5cb7746faf39d0b97547'
dreamy gyro
#

Can you share your app id?

#

It's not secret

little stag
#
app_id: "65d6f8c4-33e4-4897-9429-cdfbee201872"
dreamy gyro
#

So I'm surprised this is happening on Android. It looks like you just created the release?

little stag
#

Yea just created one. Following is the output for shorbird doctor

Shorebird 1.0.1 • [email protected]:shorebirdtech/shorebird.git
Flutter 3.19.5 • revision 47571af6a3acdebedf88255099ff1de1c3324049
Engine • revision 255003dc70296f2db5855f12de4d9f93a7b8b087

Android Toolchain
  • Android Studio: /Applications/Android Studio.app/Contents
  • Android SDK: /Users/urvesh/Library/Android/sdk
  • ADB: /Users/urvesh/Library/Android/sdk/platform-tools/adb
  • JAVA_HOME: /Applications/Android Studio.app/Contents/jbr/Contents/Home

✗ Shorebird is up-to-date (2.4s)
  [!] A new version of shorebird is available! Run `shorebird upgrade` to upgrade.
✓ Flutter install is correct (0.5s)
✓ AndroidManifest.xml files contain INTERNET permission (30ms)
✓ Has access to storage.googleapis.com (0.1s)
1 issue detected.
dreamy gyro
#

✗ Shorebird is up-to-date (2.4s)
[!] A new version of shorebird is available! Run shorebird upgrade to upgrade.

#

Can you do that and try again?

little stag
#

But would I then need to update flutter? I don't want to migrate to flutter 3.22.x. I read somewhere that there a breaking change that would not support old flutter version

dreamy gyro
#

You can still release with 3.19.5

little stag
#

Cool let me try

dreamy gyro
#

(correction: you can release Android with 3.19.5)

little stag
#

And iOS?

dreamy gyro
#

iOS has some bugs we don't feel comfortable shipping pre 3.22

#

Which is why we implemented that restriction

little stag
#

So you mean to create iOS build I would need flutter 3.22.x?

dreamy gyro
#

Correct

little stag
#

Is there a way to downgrade back?

dreamy gyro
#

You mean to use shorebird with Flutter versions earlier than 3.22? No

#

Can I ask what's preventing you from upgrading your app?

#

I'm not aware of any breaking API changes, but knowing this would help us a lot

little stag
#

I am not sure what all plugins or packages might break because of that. I have not gone through the migration doc for 3.22.x

dreamy gyro
#

But most seem to be fixable with flutter fix

little stag
#

Hmm.. Let me try will update

little stag
#

This worked...

dreamy gyro
#

Great! Each shorebird version contains a bunch of bug fixes and updates, so using the latest is always best

little stag
#

Yeah but I created a release last week and I am pretty sure I have not updated shorebird/flutter since then

dreamy gyro
#

Sure. The original issue you hit seems to have been fixed in a shorebird version between the current one and the one you were using

little stag
#

Got it. @dreamy gyro I am facing new issue now

I created a patch for Android with older flutter version ie. 3.19.5 and also shorebird used for that release was old one. Now I created a patch with latest shorebird and pushed a staged patch when I try to run it using shorebird preview command I am getting following logs:

06-23 21:02:40.550 20333 20333 I flutter : [INFO:shorebird.cc(173)] Shorebird updater: no active patch.
06-23 21:02:40.550 20333 20333 I flutter : [INFO:shorebird.cc(177)] Starting Shorebird update
06-23 21:02:40.551 20333 20509 I flutter : updater::network: Sending patch check request: PatchCheckRequest { app_id: "65d6f8c4-33e4-4897-9429-cdfbee201872", channel: "stable", release_version: "1.10.23+373", patch_number: None, platform: "android", arch: "aarch64" }
06-23 21:02:40.737 20333 20516 I flutter : Data Dog enabled
06-23 21:02:40.757 20333 20333 W flutter : updater::config: Updater already initialized, ignoring second shorebird_init call.
06-23 21:02:40.757 20333 20681 E flutter : updater::updater: Update failed: Update already in progress
06-23 21:02:40.757 20333 20681 I flutter : updater::updater: Update thread finished with status: Update had error
06-23 21:02:40.897 20333 20509 I flutter : updater::updater: Update thread finished with status: No update

Any way to check the error?

dreamy gyro
#

I think the "error" might've been that the updater was already running (just a bad log, not a real error)

#

Are you expecting that there would be a patch?

#

(Not at my computer right now so I can't check)