appwrite / sdk-for-flutter

[READ-ONLY] Official Appwrite Flutter SDK πŸ’™
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
367 stars 109 forks source link

πŸ› Bug Report: Failed to login Appwrite Anonymous account on Microsoft Edge (Chromium) on Flutter Web with appwrite 3.0.1 package #51

Closed patricktslee closed 2 years ago

patricktslee commented 2 years ago

πŸ‘Ÿ Reproduction steps

Failed to login Appwrite Anonymous account on Microsoft Edge (Chromium) on Flutter Web with appwrite 3.0.1 package.

But it can login Appwrite anonymous account using other browser such as Microsoft Internet Explorer, Google Chrome and any Safari in MacOS/ iOS/iPad OS. Is it the any workaround to solve this?

πŸ‘ Expected behavior

The web page load and login the Appwrite Anonymous account and get the database document.

Here is the screen dump when I use other browser Google Chrome.

10140187-08E8-4E32-8260-F371C689D2F3 46D3F66E-B7AE-4AD3-8C50-DB33162822FE

πŸ‘Ž Actual Behavior

The web page load but fail to login the Appwrite Anonymous account and can’t get the database document to display the webpage content.

Here is the screen dump when I use other browser Microsoft Edge (Chromium).

5CAC21D6-803D-4DC9-B521-B15658CAE7D3

I used Sentry.io to capture the error message on below as well.

minified:hd: AppwriteException: Cannot create an anonymous user when logged in. (401)
  at Object.c(main.dart.js:2347:3)
  at Object.a0(main.dart.js:2354:15)
  at <fn>(main.dart.js:34070:3)
  at ajG.a(main.dart.js:3535:62)
  at ajG.$2(main.dart.js:28616:14)
  at aiw.$1(main.dart.js:28610:21)
  at Object.ajt(main.dart.js:3773:19)
  at Lm.<fn>(main.dart.js:69535:68)
  at NM.m5(main.dart.js:29453:12)
  at aeI.$0(main.dart.js:28929:11)

Based on the Appwrite Error code page for 401, it is Missing or incorrect authentication credentials can happen when the API key or user permission is not sufficient.

The strange thing is when the browser is Chrome, it is no these error. When the browser is Microsoft Edge (Chromium), what the anonymous authentication credentials information is incorrect or missing? It caused the login failed.

🎲 Appwrite version

Different version (specify in environment)

πŸ’» Operating system

Something else

🧱 Your Environment

I use Flutter Web on the Appwrite 3.0.1 package. The Appwrite server is 0.12

πŸ‘€ Have you spent some time to check if this issue has been raised before?

🏒 Have you read the Code of Conduct?

patricktslee commented 2 years ago

I found that this is the issue on my Microsoft Edge Chromium. After I clear the cache of Microsoft Edge Chromium and restart the Microsoft Edge Chromium, the Appwrite anonymous authentication login is working fine.