Closed steavenb closed 6 months ago
having the same issues here
Having the same issue
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch react-native-otp-verify@1.1.6
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java b/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java
index f500410..040ad6b 100644
--- a/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java
+++ b/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java
@@ -51,7 +51,7 @@ public class OtpVerifyModule extends ReactContextBaseJavaModule implements Lifec
registerReceiverIfNecessary(mReceiver);
reactContext.addActivityEventListener(this);
apiClient = new GoogleApiClient.Builder(reactContext)
- .addApi(Auth.CREDENTIALS_API)
+ .addApi(Auth.GOOGLE_SIGN_IN_API)
.build();
}
This issue body was partially generated by patch-package.
@steavenb i am getting issue patch-package 7.0.0 β’ Creating temporary folder β’ Installing react-native-otp-verify@1.1.6 with yarn β’ Diffing your files with clean files β Created file patches/react-native-otp-verify+1.1.6.patch
node:internal/errors:563 ErrorCaptureStackTrace(err); ^
Error: spawn ENAMETOOLONG at ChildProcess.spawn (node:internal/child_process:421:11) at Object.spawn (node:child_process:761:9) at module.exports [as default] (E:\React-native\goal\node_modules\open\index.js:175:34) { errno: -4064, code: 'ENAMETOOLONG', syscall: 'spawn' }
Node.js v20.11.1
Can you help me ?
i'm using "react-native-otp-verify": "1.1.4",
I'm also having this issue
@jalvarez930 @steavenb @IndrakumarR @rvcavalcante-tem @AdityaSinghXenelsoft @WooWan Another alternative is to set playServiceVersion to 20.7.0 , this library is checking for this value, if it doesn't exist then it's taking the latest.
Latest version for Google Play Services is 21.0.0 which released today and they have removed the deprecated Credentials API -> https://developers.google.com/android/guides/releases
So downgrading to previous version will fix the issue, that is how we've patched the package for now:
diff --git a/android/build.gradle b/android/build.gradle
index be64dc0fcbcfaaa813b1d4733baf29df5bbbf339..d717878f34ae6eb03f4c1c65066ae62ca615477e 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -54,7 +54,7 @@ repositories {
}
dependencies {
- def googlePlayServicesVersion = safeExtGet('googlePlayServicesVersion', safeExtGet('playServiceVersion', '+'))
+ def googlePlayServicesVersion = safeExtGet('googlePlayServicesVersion', safeExtGet('playServiceVersion', '20.7.0'))
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
But then found another alternative which is to set playServiceVersion
in your root build.gradle ext block like this
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "xxx"
minSdkVersion = "xx"
compileSdkVersion = "xx"
ndkVersion = "xxxx"
playServiceVersion="20.7.0"
}
CC: @faizalshap
Maybe we can add a section like this in Readme, if we're planning to support this variable: https://github.com/react-native-maps/react-native-maps/blob/bb0855714895e5264f4f6b3ebc9f3cdc6350b39a/docs/installation.md#build-configuration-on-android
@KManiKumarReddy if we merge this, i hope it doesn't break existing versions
@steavenb can you please send me the documentation link where i can check this
@KManiKumarReddy if we merge this, i hope it doesn't break existing versions
it'll still break existing versions anyway, we'll either have to upgrade to signin api or set default playservices version to 20.7.0, both will need to publish new version anyways.
Only way existing versions will work is to set that value in gradle file and hope it doesn't cause gradle conflicts
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
react-native-otp-verify@1.1.6
for the project I'm working on.Here is the diff that solved my problem:
diff --git a/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java b/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java index f500410..040ad6b 100644 --- a/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java +++ b/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java @@ -51,7 +51,7 @@ public class OtpVerifyModule extends ReactContextBaseJavaModule implements Lifec registerReceiverIfNecessary(mReceiver); reactContext.addActivityEventListener(this); apiClient = new GoogleApiClient.Builder(reactContext) - .addApi(Auth.CREDENTIALS_API) + .addApi(Auth.GOOGLE_SIGN_IN_API) .build(); }
This issue body was partially generated by patch-package.
It works for me π₯³π₯³π₯³
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
react-native-otp-verify@1.1.6
for the project I'm working on.Here is the diff that solved my problem:
diff --git a/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java b/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java index f500410..040ad6b 100644 --- a/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java +++ b/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java @@ -51,7 +51,7 @@ public class OtpVerifyModule extends ReactContextBaseJavaModule implements Lifec registerReceiverIfNecessary(mReceiver); reactContext.addActivityEventListener(this); apiClient = new GoogleApiClient.Builder(reactContext) - .addApi(Auth.CREDENTIALS_API) + .addApi(Auth.GOOGLE_SIGN_IN_API) .build(); }
This issue body was partially generated by patch-package.
it works for me
@jalvarez930 @steavenb @IndrakumarR @rvcavalcante-tem @AdityaSinghXenelsoft @WooWan Another alternative is to set playServiceVersion to 20.7.0 , this library is checking for this value, if it doesn't exist then it's taking the latest.
Latest version for Google Play Services is 21.0.0 which released today and they have removed the deprecated Credentials API -> https://developers.google.com/android/guides/releases
So downgrading to previous version will fix the issue, that is how we've patched the package for now:
diff --git a/android/build.gradle b/android/build.gradle index be64dc0fcbcfaaa813b1d4733baf29df5bbbf339..d717878f34ae6eb03f4c1c65066ae62ca615477e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -54,7 +54,7 @@ repositories { } dependencies { - def googlePlayServicesVersion = safeExtGet('googlePlayServicesVersion', safeExtGet('playServiceVersion', '+')) + def googlePlayServicesVersion = safeExtGet('googlePlayServicesVersion', safeExtGet('playServiceVersion', '20.7.0')) //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules
But then found another alternative which is to set
playServiceVersion
in your root build.gradle ext block like this// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { buildToolsVersion = "xxx" minSdkVersion = "xx" compileSdkVersion = "xx" ndkVersion = "xxxx" playServiceVersion="20.7.0" }
CC: @faizalshap
This worked for me
@jalvarez930 @steavenb @IndrakumarR @rvcavalcante-tem @AdityaSinghXenelsoft @WooWan Another alternative is to set playServiceVersion to 20.7.0 , this library is checking for this value, if it doesn't exist then it's taking the latest.
Latest version for Google Play Services is 21.0.0 which released today and they have removed the deprecated Credentials API -> https://developers.google.com/android/guides/releases
So downgrading to previous version will fix the issue, that is how we've patched the package for now:
diff --git a/android/build.gradle b/android/build.gradle index be64dc0fcbcfaaa813b1d4733baf29df5bbbf339..d717878f34ae6eb03f4c1c65066ae62ca615477e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -54,7 +54,7 @@ repositories { } dependencies { - def googlePlayServicesVersion = safeExtGet('googlePlayServicesVersion', safeExtGet('playServiceVersion', '+')) + def googlePlayServicesVersion = safeExtGet('googlePlayServicesVersion', safeExtGet('playServiceVersion', '20.7.0')) //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules
But then found another alternative which is to set
playServiceVersion
in your root build.gradle ext block like this// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { buildToolsVersion = "xxx" minSdkVersion = "xx" compileSdkVersion = "xx" ndkVersion = "xxxx" playServiceVersion="20.7.0" }
CC: @faizalshap
This worked for me.
Autofilling otp from mobile is not working now startOtpLisner is not able to listen to the events
Autofilling otp from mobile is not working now startOtpLisner is not able to listen to the events
@navjotsrmtpl how did you build the app? did you use the patch-package solution?
Downgrading to com.google.android.gms:play-services-auth
to 20.7.0 worked for me
Why are we having this issue all of sudden. I am having same issue. Anyone has idea ?
Why are we having this issue all of sudden. I am having same issue. Anyone has idea ?
@kuldip-simform As I've explained in my comment above https://github.com/faizalshap/react-native-otp-verify/issues/108#issuecomment-1947943784, This library is taking the latest version of com.google.android.gms:play-services-auth
which is upgrading to 21.0.0 and according to release notes https://developers.google.com/android/guides/releases they have removed the CREDENTIALS_API , now why we're using CREDENTIALS_API is a question only authors can answer.
update to version 1.1.18. problem solved.
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
react-native-otp-verify@1.1.6
for the project I'm working on.Here is the diff that solved my problem:
diff --git a/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java b/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java index f500410..040ad6b 100644 --- a/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java +++ b/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java @@ -51,7 +51,7 @@ public class OtpVerifyModule extends ReactContextBaseJavaModule implements Lifec registerReceiverIfNecessary(mReceiver); reactContext.addActivityEventListener(this); apiClient = new GoogleApiClient.Builder(reactContext) - .addApi(Auth.CREDENTIALS_API) + .addApi(Auth.GOOGLE_SIGN_IN_API) .build(); }
This issue body was partially generated by patch-package.
This works for me, and I was using an old version 1.0.5 so I also jumped to the latest version now.
just upgraded to version 1.1.8 and build was successful
just upgraded to version 1.1.8 and build was successful
But does the auto otp fill work for you?
playServiceVersion="20.7.0"
this works for me π
I am facing a build error with the latest version since Feb 16. The error is as follows:
`Note: Recompile with -Xlint:deprecation for details. /Users/steavenbc/Documents/codes/ws-mobile/ws-mobile/node_modules/react-native-otp-verify/android/src/main/java/com/faizal/OtpVerify/OtpVerifyModule.java:54: error: cannot find symbol .addApi(Auth.CREDENTIALS_API) ^ symbol: variable CREDENTIALS_API location: class Auth Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':react-native-otp-verify:compileReleaseJavaWithJavac'.
Try:
Tried lowering the version, to 1.1.4 and 1.1.5 too, but it did not work.