Back

[SOLVED] AppwriteException: null, User (role: guest) missing scope (account) (401)

  • 0
  • Flutter
Jhalak_Upadhyay
21 May, 2023, 19:18

I/flutter (22412): type 'int' is not a subtype of type 'bool' I/flutter (22412): #0 new Account.fromMap (package:appwrite/src/models/account.dart:63:18) I/flutter (22412): #1 Account.create (package:appwrite/services/account.dart:56:27) I/flutter (22412): <asynchronous suspension> I/flutter (22412): #2 AuthState.Register_User (package:expense_manager/Signin_Signup/Authentication.dart:28:20) I/flutter (22412): <asynchronous suspension>

TL;DR
The user was experiencing an AppwriteException where the user (role: guest) was missing the scope (account) and receiving a 401 error. They were able to solve the issue by updating Appwrite to a newer version and downgrading their JDK from 19 to 17. They mentioned not understanding why JDK 19 was causing problems. If the problem persists, they can ask for help again the next day. If there is no important information, they can reinstall Appwrite. It is recommended to install the latest version (1.3.4) as there may be a mismatch between the SDK and Appwrite versions. The user
Jhalak_Upadhyay
21 May, 2023, 19:18

this is the result that i get

Binyamin
21 May, 2023, 19:21

Is your endpoint is the cloud? What version of flutter are you using?

Jhalak_Upadhyay
21 May, 2023, 19:23

i am using flutter 3.3.7

Binyamin
21 May, 2023, 19:23

I mean appwrite package in pubspec.yaml

Jhalak_Upadhyay
21 May, 2023, 19:24

8.3.0

Binyamin
21 May, 2023, 19:25

And against the cloud?

Jhalak_Upadhyay
21 May, 2023, 19:25

actually i dont know much i had my appwrite in docker and ran it from there

Binyamin
21 May, 2023, 19:27

Ohh okay So local Appwrite?

Jhalak_Upadhyay
21 May, 2023, 19:27

yes

Binyamin
21 May, 2023, 19:27

Okay And what is the content in line 28? I/flutter (22412): #2 AuthState.Register_User (package:expense_manager/Signin_Signup/Authentication.dart:28:20)

Jhalak_Upadhyay
21 May, 2023, 19:28

at line 28 in authentication.dart i have final user = await account.create(

Binyamin
21 May, 2023, 19:30

Mmm, what version of Appwrite are you using? Can you run docker ps and share the results?

Jhalak_Upadhyay
21 May, 2023, 19:37
Binyamin
21 May, 2023, 19:37

This is a bit old version of Appwrite

Binyamin
21 May, 2023, 19:37

Probably the SDK and the Appwrite don't match each other

Binyamin
21 May, 2023, 19:37

So it's better to install the latest version 1.3.4

Binyamin
21 May, 2023, 19:38

If you don't have any important information then you can just reinstall Appwrite https://appwrite.io/docs/self-hosting#installWithDocker

Jhalak_Upadhyay
21 May, 2023, 19:39

ohhkk

Binyamin
21 May, 2023, 19:39

If you do have important information then backup every thing then run migration You can see here more details https://discord.com/channels/564160730845151244/1103593309911388200/1103599375244083230

Jhalak_Upadhyay
21 May, 2023, 19:40

if the problem still persist then can i again ask it tommorow

Binyamin
21 May, 2023, 19:40

Appwriters will be here 😉

Jhalak_Upadhyay
21 May, 2023, 19:40

thankyou so much for helping out

Jhalak_Upadhyay
23 May, 2023, 11:47

thankyou so much for your help after updating the appwrite to a newer version and downgrading my JDK from 19 to 17 all worked fine but i still dont understand why JDK 19 was having the problems

Drake
23 May, 2023, 15:21

[SOLVED] AppwriteException: null, User (role: guest) missing scope (account) (401)

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more