🐛 Bug Report: Cookie Error

Aperta
#80 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
android, kotlin

Direzione di ricerca

Inizia dal percorso di callback OAuth in CallbackActivity.kt e WebAuthComponent.kt, quindi esamina Account.kt intorno alla chiamata a createOAuth2Session mostrata nello stack trace. Riproduci il flusso di autenticazione Google su Android 15 utilizzando l’esempio collegato e verifica che il callback restituisca il cookie di autenticazione senza causare arresti anomali.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
👟 Reproduction steps

When I try to auth with google in android the below error returns

code: https://github.com/202420505/APPWRITE-GOOGLE-AUTH

🔽LOG🔽

07-24 10:55:09.815 27458 27458 E AndroidRuntime: FATAL EXCEPTION: main
07-24 10:55:09.815 27458 27458 E AndroidRuntime: Process: me.moontree.test.appwrite.auth.app1, PID: 27458
07-24 10:55:09.815 27458 27458 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{me.moontree.test.appwrite.auth.app1/io.appwrite.views.CallbackActivity}: io.appwrite.exceptions.AppwriteException: Authentication cookie missing!
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4454)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4685)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:112)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:174)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:109)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:81)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2895)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:107)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:257)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:342)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:9634)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
07-24 10:55:09.815 27458 27458 E AndroidRuntime: Caused by: io.appwrite.exceptions.AppwriteException: Authentication cookie missing!
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at io.appwrite.services.Account$createOAuth2Session$3.invoke(Account.kt:1153)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at io.appwrite.services.Account$createOAuth2Session$3.invoke(Account.kt:1143)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at io.appwrite.WebAuthComponent$Companion.onCallback(WebAuthComponent.kt:85)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at io.appwrite.views.CallbackActivity.onCreate(CallbackActivity.kt:16)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:9363)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.Activity.performCreate(Activity.java:9332)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1526)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4436)
07-24 10:55:09.815 27458 27458 E AndroidRuntime:        ... 13 more
👍 Expected behavior

It should return a proper cookies

👎 Actual Behavior

It actually returns a error and the app crashes

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Something else

🧱 Your Environment

I used android 15 in samsung One UI 7.0

Used Android SDK Latest Version (8.1.0)

👀 Have you spent some time to check if this issue has been raised before?
  • I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
Lingua principale
Kotlin
Stelle
156
Fork
29
Merge medio
8h 49m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di appwrite/sdk-for-android

Tutte le issue di appwrite/sdk-for-android

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.