Skip to content
New issue

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

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

Already on GitHub? # to your account

issue with Android Play store Version fetching #39

Closed
hussainimdad004 opened this issue Jun 7, 2022 · 9 comments
Closed

issue with Android Play store Version fetching #39

hussainimdad004 opened this issue Jun 7, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@hussainimdad004
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-store-version@1.3.2 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-store-version/dist/android.js b/node_modules/react-native-store-version/dist/android.js
index 469615f..ad10a8f 100644
--- a/node_modules/react-native-store-version/dist/android.js
+++ b/node_modules/react-native-store-version/dist/android.js
@@ -8,7 +8,7 @@ export const getAndroidVersion = async (storeURL = '') => {
         }
         throw new Error('androidStoreURL is invalid.');
     });
-    const matches = response.match(/<span class="htlgb"><div class="IQ1z0d"><span class="htlgb">([0-9]+\.?[0-9]*\.?[0-9]*)<\/span><\/div><\/span>/);
+    const matches = response.match(/\[\[\[['"]((\d+\.)+\d+)['"]\]\],/);
     if (!matches) {
         throw new Error('can\'t get android app version.');
     }

This issue body was partially generated by patch-package.

@nuvolarmobileteam
Copy link

Many thanks @hussainimdad004 ,
we'll be using the same patch, we are facing the exact same issue here

@watanabeyu
Copy link
Owner

thanks report @hussainimdad004
I will fix this issue.

@purpleh00d
Copy link

thanks report @hussainimdad004 I will fix this issue.

Hello any updates on the fix?

@JeremyBradshaw7
Copy link

I'm using the suggested patch for now. Would be get it fixed in the package properly though.

@iphonic
Copy link

iphonic commented Jul 1, 2022

@JeremyBradshaw7 @hussainimdad004 How to install the patch version?

@JeremyBradshaw7
Copy link

JeremyBradshaw7 commented Jul 1, 2022

@iphonic ensure you are using patch-package then cut & paste Hussain's patch into this file in your repo:

image

@iphonic
Copy link

iphonic commented Jul 1, 2022

@JeremyBradshaw7 You mean to say I need to use this yarn add patch-package postinstall-postinstall will it install patches for all packages I am using? and copy the code for this package and paste where?

It would be great if you can guide me, never used it before.

Thanks.

@watanabeyu
Copy link
Owner

@hussainimdad004
thanks patch package.
I'm fixing this package, so publish new version tomorrow.
Sorry to keep you waiting...

@watanabeyu watanabeyu mentioned this issue Aug 4, 2022
@watanabeyu watanabeyu added the enhancement New feature or request label Aug 4, 2022
@watanabeyu
Copy link
Owner

#41

released new version, so close this issue.
Sorry for the long wait for an update.
thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants