SudoPlz / sp-react-native-in-app-updates

An in-app updater for the native version of your react-native app.
MIT License
491 stars 66 forks source link

Not working #17

Closed irfan102 closed 3 years ago

irfan102 commented 3 years ago

Was working properly a day before, but now not working

SudoPlz commented 3 years ago

What do you mean, is there an error or something?

irfan102 commented 3 years ago

What do you mean, is there an error or something?

No error at all, the library is displaying the same message in result despite the app apk being updated to a lower verison. { "other": { "isFlexibleUpdateAllowed": false, "isImmediateUpdateAllowed": false, "packageName": "com.mediconnect.oladoc", "status": 0, "totalBytes": 0, "updateAvailability": 1, "updatePriority": 0, "versionCode": 95 }, "reason": "status: 1 means there's no new version available", "shouldUpdate": false }

SudoPlz commented 3 years ago

So are you saying it is working (it does update your app) but to a lower version or do you mean the library says there's no update even though there is according to you?

irfan102 commented 3 years ago

So are you saying it is working (it does update your app) but to a lower version or do you mean the library says there's no update even though there is according to you?

Ok so my apps version was 95 on play store. So i tested this library by downgrading the version to 93 yesterday. And the library was working correctly with the right response in result and everything. Today however even if i downgrade my version to 93 the library produces the above result. Which is incorrect

SudoPlz commented 3 years ago

Got it, right. So I see that Google responded with update availability 1 which means they think (on their backend side) that there's no update for your app.

https://developer.android.com/reference/com/google/android/play/core/install/model/UpdateAvailability.html#UPDATE_AVAILABLE

This is definitely an in app updates native issue and it's not related to this library which only exposes that native functionality to react native apps. I'm afraid I can't help you, but rest assured this has nothing to do with our lib.

Make sure you uninstall the app and clear everything before you retry testing in case there were files there from your previous tests that make Google think you don't need an update. Also that's a good one for stack overflow.

irfan102 commented 3 years ago

Ok. Let me check