[@nativescript/google-signin] Google Sign In crashing after 8.5 migration

Ouverte
#475 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
À clarifier
Activité
À l'abandon
Stack technique
android, angular, typescript

Piste de recherche

Commencez par reproduire le crash avec la configuration décrite utilisant NativeScript 8.5.0, Angular 15.2.1 et @nativescript/android@8.3.1. Suivez le flux GoogleSignin depuis authService.googleSignin() et le point d’entrée googleLogin() jusqu’à GoogleSignIn.kt autour de la ligne 185, en utilisant la trace de la pile de vendor.js comme référence. Le travail est terminé lorsque la connexion Google s’effectue sans le NoSuchMethodError signalé.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug

I have recently started migrating to NativeScript 8.5.0 and Angular 15.2.1. After the migration, some stuff broke, including the Google Signin plugin. Every time I try to Log in, this error appears:

An uncaught Exception occurred on "main" thread.
Calling js method onSuccess failed
Error: java.lang.NoSuchMethodError: no non-static method "Lorg/nativescript/plugins/googlesignin/GoogleSignIn$GoogleUser;.getUser()L;"

StackTrace:
onSuccess(file:///data/data/org.nativescript.demoapp/files/app/vendor.js:76427:52)
	at com.tns.Runtime.callJSMethodNative(Native Method)
	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1302)
	at com.tns.Runtime.callJSMethodImpl(Runtime.java:1188)
	at com.tns.Runtime.callJSMethod(Runtime.java:1175)
	at com.tns.Runtime.callJSMethod(Runtime.java:1153)
	at com.tns.Runtime.callJSMethod(Runtime.java:1149)
	at com.tns.gen.org.nativescript.plugins.googlesignin.GoogleSignIn_Callback.onSuccess(GoogleSignIn_Callback.java:19)
	at org.nativescript.plugins.googlesignin.GoogleSignIn$Companion.signInSilently$lambda-3$lambda-1(GoogleSignIn.kt:185)
	at org.nativescript.plugins.googlesignin.GoogleSignIn$Companion.$r8$lambda$fH8L5lqFEywsPPnOtZDYuEPDXBs(Unknown Source:0)
	at org.nativescript.plugins.googlesignin.GoogleSignIn$Companion$$ExternalSyntheticLambda12.run(Unknown Source:4)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:210)
	at android.os.Looper.loop(Looper.java:299)
	at android.app.ActivityThread.main(ActivityThread.java:8280)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)
Caused by: java.lang.NoSuchMethodError: no non-static method "Lorg/nativescript/plugins/googlesignin/GoogleSignIn$GoogleUser;.getUser()L;"
	... 18 more

The code I'm using to Log in has been unchanged for a long time and it's the following:

async googleLogin(): Promise<void> {
   console.log("Signing in with google");
   this.processing = true;
   if (await GoogleSignin.playServicesAvailable()) {
      try {
         const googleUser: GoogleUser = await this.authService.googleSignin();
         console.dir(googleUser);
      }
   }
} 

Both of those console.log don't print anything atm, not sure why... I can't open devtools either.

Everything worked fine with the previous CLI version, Angular 14 and @nativescript/android@8.3.1

Langage dominant
TypeScript
Étoiles
206
Forks
123
Merge moyen
2 j 1 h
PR mergées (30 j)
1

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de NativeScript/plugins

Toutes les issues de NativeScript/plugins

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.