🐛 Bug Report: Cookie Error

Đang mở
#80 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
android, kotlin
Lĩnh vực
authentication, mobile

Hướng nghiên cứu

Bắt đầu với đường dẫn callback OAuth trong CallbackActivity.kt và WebAuthComponent.kt, sau đó kiểm tra Account.kt xung quanh lệnh gọi createOAuth2Session được hiển thị trong stack trace. Tái hiện quy trình xác thực Google trên Android 15 bằng ví dụ được liên kết và xác minh rằng callback trả về cookie xác thực mà không bị crash.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?
Ngôn ngữ chính
Kotlin
Star
156
Fork
29
Merge trung bình
8 giờ 49 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của appwrite/sdk-for-android

Tất cả issue của appwrite/sdk-for-android

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.