Back

getSession() returning error

  • 0
  • Web
RP
3 Sep, 2024, 17:15

Whenever I request getSession() I am getting below always. Unable to understand what is happening. Will appreciate if someone can help.

Error fetching session: Error: app.66b0586b002b820a4e90@service.cloud.appwrite.io (role: applications) missing scope (account) at Client.call (/usr/local/server/src/function/node_modules/node-appwrite/lib/client.js:206:15) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Account.getSession (/usr/local/server/src/function/node_modules/node-appwrite/lib/services/account.js:947:16) at async checkSession (file:///usr/local/server/src/function/src/main.js:15:25) at async Module.default (file:///usr/local/server/src/function/src/main.js:85:22) at async execute (/usr/local/server/src/server.js:208:16) at async action (/usr/local/server/src/server.js:225:7) at async /usr/local/server/src/server.js:14:5

TypeError: res.status is not a function at Module.default (file:///usr/local/server/src/function/src/main.js:91:20) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async execute (/usr/local/server/src/server.js:208:16) at async action (/usr/local/server/src/server.js:225:7) at async /usr/local/server/src/server.js:14:5

#🚑│support

TL;DR
Developers encountering error with getSession() function, receiving "missing scope (account)" error. Additionally, facing TypeError: res.status is not a function. Solution: To fix this, developers need to check the application's scope permissions and ensure proper handling of the response object's status.
RP
3 Sep, 2024, 17:56

getSession() returning error

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