Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AAR should not use app release version #11

Closed
LammPhan opened this issue Apr 25, 2024 · 6 comments
Closed

fix: AAR should not use app release version #11

LammPhan opened this issue Apr 25, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@LammPhan
Copy link

LammPhan commented Apr 25, 2024

Description

I'm setting code push for flutter module on platform android app native. My current flutter version is 3.13.9.
my config app native is

defaultConfig {
       ...
        versionCode 1
        versionName "1.0.0"
       ...
    }

I created library aar by command
shorebird release aar --release-version 1.0.0+1 --flutter-version=3.13.9
my release app works normally,
but when I release a new patch by command
shorebird patch aar --release-version=1.0.0+1
My app can not update that patch
Someone can help me please!

here is my logcat error
Screenshot 2024-04-25 at 5 39 47 PM

here is my flutter doctor
Screenshot 2024-04-25 at 5 42 37 PM

@LammPhan LammPhan added the bug Something isn't working label Apr 25, 2024
@eseidel
Copy link
Contributor

eseidel commented Apr 25, 2024

The updater is saying that the binary produced by shorebird release is not the same binary as you are running to receive the patch.

Are you using shorebird preview or are you running the app in some other way?

@LammPhan
Copy link
Author

LammPhan commented Apr 26, 2024

The updater is saying that the binary produced by shorebird release is not the same binary as you are running to receive the patch.

Are you using shorebird preview or are you running the app in some other way?

No, I'm using app Add to app in flutter follow document shorebird. So I can't apply shorebird preview command

@eseidel
Copy link
Contributor

eseidel commented Apr 29, 2024

Ah yes, it's definitely much easier to hit this error in the add2app flow.

@eseidel eseidel added this to 1.1 Apr 29, 2024
@eseidel eseidel moved this to Customers in 1.1 Apr 29, 2024
@eseidel
Copy link
Contributor

eseidel commented May 30, 2024

The solution here (which I think we have another bug on?) is to create some mechanism for us to version the contents of an aar, separately from the release version from the aab.

Shorebird depends on the stores enforcing one-version-per-aab rules, meaning that the version number is unique for a given set of aab contents. If we move away from that we'll need our own uniqueness mechanism, or find some other one that Android has (maybe it already has some sort of aab/apk identifier that isn't the release version number?)

@eseidel
Copy link
Contributor

eseidel commented May 30, 2024

shorebirdtech/shorebird#793 has more discussion of a similar issue.

@eseidel eseidel changed the title fix: Update rejected: hash mismatch. Update was downloaded but contents did not match the expected hash fix: AAR should not use release version May 30, 2024
@eseidel eseidel moved this from Customers to Next Big Feature in 1.1 Jun 11, 2024
@eseidel eseidel moved this from Next Big Feature to Support Burden in 1.1 Jun 11, 2024
@bryanoltman bryanoltman changed the title fix: AAR should not use release version fix: AAR should not use app release version Jun 14, 2024
@bryanoltman bryanoltman moved this from Support Burden to Next Big Feature in 1.1 Jun 17, 2024
@bryanoltman
Copy link
Contributor

I believe this has been fixed with shorebirdtech/docs#291

@github-project-automation github-project-automation bot moved this from Next Big Feature to Done in 1.1 Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants