Skip to content
Back

createSession() fails on Linux but works on windows

  • 0
  • Auth
  • Web
  • Cloud
trevor_143
23 Feb, 2026, 15:12

Hey Guys i need some help with this one. Am building for web and desktop using different code bases. For web am using Nuxt, and for desktop(windows and linux) am using nuxt and tauri. Now, when am login in a user on desktop and use the active session from the browser if there is none i ask the user to signup or login first the they the active user ID is sent to the node server to users.createToken() then the token is sent back to the browser and the browser sends the token and userId to the desktop app. Now on Windows in dev and production, everything works very well. But on Linux i cant even create the session and am getting this error

{"message":"User (role: guests) missing scopes ([\"account\"])","code":401,"type":"general_unauthorized_scope","version":"1.8.1"}

in dev and production. Both Windows and linux are using the same codebase. and the steps are exactly the same. first the error was invalid toke but now its unauthorized. If any one has an idea on how i can fix this. Thank you soo much in advance or If there is a better way to login the user to desktop other than the one I have just described.

TL;DR
Issue: Function `createSession()` is failing on Linux but working on Windows due to a permissions error. Solution: The error message indicates that the user is missing required scopes. Check the permissions and scopes assigned to the user roles on Linux to ensure they match those on Windows. Additionally, double-check the authentication process to ensure that the correct scopes are being assigned during the session creation. Other developers facing similar issues can benefit from reviewing and adjusting the scopes and permissions assigned to user roles.
trevor_143
23 Feb, 2026, 15:30

This is what i got now

trevor_143
23 Feb, 2026, 15:30

and this is the is the log

trevor_143
23 Feb, 2026, 15:31

The first error is expected cause i am checking for a user. Then the second on is for the createSession()

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