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

App downloaded from In-app-update won't detect another update #1594

Closed
Mr777Nick opened this issue Jan 3, 2022 · 11 comments
Closed

App downloaded from In-app-update won't detect another update #1594

Mr777Nick opened this issue Jan 3, 2022 · 11 comments
Labels
bug next-release Will be included in the upcoming release

Comments

@Mr777Nick
Copy link

Mr777Nick commented Jan 3, 2022

Description

I've been using the in-app-update feature for about 9 months, it worked perfectly fine. then around 2-3 weeks ago when the SDK is updated to 4.4.1 and 4.4.2, the application which downloaded from within the in-app-update, won't detect future updates. There's no dialog whatsoever that says there's an update, even though it exists.

Repro Steps

  1. Build the current app (v1.0) and distribute it from within the App Center
  2. Download the app from the App Center (v1.0), then install it
  3. Build and distribute another update (v1.1)
  4. Open the app (v1.0), it would detect the update, then install it, this process will work fine
  5. Build and distribute another update (v1.2)
  6. Open the app(v1.1), the app won't detect the update, at this point any other updates won't be detected by the app. However, if I uninstall the currently installed app, then redownload the app (v1.1) from within the App Center, the app would detect the update (v1.2) with no issues.

It seems like the download APK/Application from within the in-app-update is broken or something that causes the app to not be able to download the update.

Details

  1. Which SDK version are you using?
    • 4.4.2
  2. Which OS version did you experience the issue on?
    • Android 11, Android 10, Android 8
  3. What device version did you see this error on? Were you using an emulator or a physical device?
    • Realme 5 Pro, Infinix Hot 10, Android Studio Emulator
  4. What third party libraries are you using?
    • None added since the last App Center SDK updated
  5. Please enable verbose logging for your app using AppCenter.setLogLevel(Log.VERBOSE) before your call to AppCenter.start(...) and include the logs here:
    Will upload the log later.
    EDIT: Here's the link to the log
@AnastasiaKubova
Copy link
Contributor

Hi, @Mr777Nick ! Thanks for getting in touch with us!
I was able to reproduce your issue and will label this issue as a bug.
I can suggest you a workaround for this issue. Please try to add the package name of your application via this API before App Center start:

Distribute.addStores(new HashSet<String>() {
    { add("com.your.package"); }
});

and let me know about the results?

@Mr777Nick
Copy link
Author

Hi, @Mr777Nick ! Thanks for getting in touch with us! I was able to reproduce your issue and will label this issue as a bug. I can suggest you a workaround for this issue. Please try to add the package name of your application via this API before App Center start:

Distribute.addStores(new HashSet<String>() {
    { add("com.your.package"); }
});

and let me know about the results?

Hey @AnastasiaKubova, thanks for your help, the workaround does fix this issue for now, I'll keep using it until the fixed version is released. Thanks again!

@AnastasiaKubova AnastasiaKubova added the next-release Will be included in the upcoming release label Jan 10, 2022
@clhols
Copy link

clhols commented Feb 24, 2022

@AnastasiaKubova Isn't it worth creating a 4.4.3 release just for this fix? It seems odd that this kind of bug has been out there for so long.

@AnastasiaKubova
Copy link
Contributor

Hi! Thanks for getting in touch with us!
This bug has a workaround. We notify you when the fix will be released.

@clhols
Copy link

clhols commented Feb 24, 2022

But everyone updating to the newest SDK version will encounter this issue and have to find this GitHub issue and implement the workaround. It would be best if you released a new version quickly to avoid new users and updaters to experience this bug and use time and resources to debug and implement the workaround.

@fabiendem
Copy link

Hey +1 to @clhols

@AnastasiaKubova In the CHANGELOG.md and releases could you please at least flag the versions which have this bug?
This is a critical bug. 🐛

Consider scenarios where it's not just one or two devices to update but 100s.
Here since you can't download update, the app is "bricked". The fix is fine if you're aware of it, but once the broken SDK is part of the latest update, the app will be stuck in this state.

Cheers

@AnastasiaKubova AnastasiaKubova mentioned this issue Feb 24, 2022
6 tasks
@DmitriyKirakosyan
Copy link
Contributor

Hi @fabiendem , we've updated the CHANGELOG.md and Release information. Thank you!

@fabiendem
Copy link

Thanks

@aballano
Copy link

aballano commented Mar 14, 2022

Hi, @Mr777Nick ! Thanks for getting in touch with us! I was able to reproduce your issue and will label this issue as a bug. I can suggest you a workaround for this issue. Please try to add the package name of your application via this API before App Center start:

Distribute.addStores(new HashSet<String>() {
    { add("com.your.package"); }
});

and let me know about the results?

Thank you for the workaround, unfortunately it seems that API wasn't added for the no-op version (appcenter-distribute-play) so I guess to make this work is better to stay in 4.4.1 and wait for 4.4.3?

@TedaLIEz
Copy link

TedaLIEz commented Mar 15, 2022

This issue exists from 3.3.0, because the LOCAL_STORE filter the application's id itself, so every time the application tries to install the in-app update from itself, it will return true when we check isInstalledFromAppStore in the Distribute API, and then skip the update.
image
image

Besides, addStores is not available in no-op version, what should we do?

@DmitriyKirakosyan
Copy link
Contributor

Hi folks, we just released a new version with this fix included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug next-release Will be included in the upcoming release
Projects
None yet
Development

No branches or pull requests

7 participants