Skip to content
Back

Session not found. Please run appwrite login to create a session

  • 0
  • 4
  • Web
  • Tools
  • Auth
  • Cloud
  • Functions
Horsty - Cyril - MagicTools
20 Jan, 2026, 18:19

I have encounter an issue with appwrite CLI

They asking for a login session but in the doc, itโ€™s mention that only setup client with endpoint / api key is enough

So I dont understand why I have this issue

https://github.com/appwrite/appwrite/issues/11162

With the CLI in version 12 I have rules issue, with the new one in version 13 I have this login issue

How do you deals your github action with appwrite CLI ?

I just want to push update like functions when I push code

Any help please ๐Ÿ™‚

TL;DR
Users are experiencing issues with the Appwrite CLI versions 12 and 13. Version 12 has a 'rules' error while version 13 has a session login error. A fix for the session error is available in the cli v13.1.0-rc.3. However, the 'rules' scope issue still persists. Users cannot push functions through their CI/CD due to this error. A fix for the 'rules' scope issue is in progress, and for now, users need to log in via a valid session. Additionally, there is an ongoing discussion about making the 'rules' scope available. Finally, there
22 Jan, 2026, 14:55

Just to mention, that if i'm working with appwrite cli version 12, i get this role error : https://discord.com/channels/564160730845151244/1318750327457058846 but no answer on it too

22 Jan, 2026, 15:24

<@743532656767270934> Would you have any insight on what could be going wrong with the CLI?

22 Jan, 2026, 15:25

The story, is that with the v12 of the cli, i get the error message with

Error: eException [Error]: &#x61;&#112;&#x70;&#46;&#x36;&#x38;&#x64;&#98;&#x61;&#101;&#102;&#101;&#x30;&#x30;&#49;&#x38;&#x61;&#x32;&#55;&#x34;&#54;&#99;&#98;&#56;&#64;&#x73;&#x65;&#114;&#x76;&#x69;&#99;&#101;&#46;&#102;&#x72;&#97;&#x2e;&#99;&#108;&#111;&#117;&#x64;&#x2e;&#97;&#112;&#x70;&#119;&#x72;&#105;&#x74;&#x65;&#x2e;&#x69;&#111; (role: applications) missing scopes (["rules.read"])

The v13 is new, i've update to this version, and now, i get the error message about the session login The api key is the same, i have change nothing, just update the version

So the v12 is "working" but i get a lot of error message The v13 is not working =/

22 Jan, 2026, 15:27

another issue related is this one i've found: https://discord.com/channels/564160730845151244/1318750327457058846 but December 2024 ๐Ÿ™

22 Jan, 2026, 15:27

thanks <@186656408450629633> for you help

22 Jan, 2026, 15:29

From my understanding Chirag did a pretty big refactor of the cli recently, so it could be a sideeffect of that

22 Jan, 2026, 15:31

it's my supposition to, so why i've open this issue, but i'm surprised that no one else have encourter this issue i'm doing something pretty normal, push a function with my CI/CD ^^'

22 Jan, 2026, 15:33

<@407146267341357057> looks like the client's methods to set a session or key via the cli might have been regressed during the refactor, i am moving your issue to the cli sdk and work on it the asap, thanks for bringing this up

1
22 Jan, 2026, 15:34

love to read that, if i can help or give you other feedback on it don't hesitate

22 Jan, 2026, 15:34

Like we say in french "bon courage" โ˜บ๏ธ

22 Jan, 2026, 15:35

CLI in version 12 I have rules issue

would love a seperate ticket on this if you can create it

1
22 Jan, 2026, 15:38

I suppose this ticket is still relevant for the v12

https://github.com/appwrite/console/issues/2156

22 Jan, 2026, 15:43

ah this, it might be intentional since ability to create domains (aka rules) is console only for now

22 Jan, 2026, 15:58

that lead to a lot of error when we use cli to push function for example. That works at the end, but in the CI/CD is not fine ^^'

23 Jan, 2026, 03:16

pr for the fix is in review now - https://github.com/appwrite/sdk-generator/pull/1312

1
23 Jan, 2026, 04:38

Anwesome ! ๐Ÿ‘๐Ÿ‘

23 Jan, 2026, 17:14

When do you think the new version will be available with this fix ?

24 Jan, 2026, 00:26

should be soon, since a lot of other changes were also merged we cant make a direct patch release for this fix and need to test all the changes thoroughly

24 Jan, 2026, 00:26

if you are comfortable using a rc version you can do that too!

24 Jan, 2026, 02:16

Thanks i will try to test it !

27 Jan, 2026, 21:42

Hey ๐Ÿ™‚ just a few feedback, i've test the rc and it's working, i didn't have the session issue, thanks โœŒ๏ธ

But now the other issue mentionned earlier is always present, missing scopes (["rules.read"])

TypeScript
AppwriteException: app.68dbaefe0018a2746cb8@service.fra.cloud.appwrite.io (role: applications) missing scopes (["rules.read"])
    at _Client.<anonymous> (/opt/hostedtoolcache/node/22.22.0/x64/lib/node_modules/appwrite-cli/dist/cli.cjs:110479:15)
    at Generator.next (<anonymous>)
    at fulfilled (/opt/hostedtoolcache/node/22.22.0/x64/lib/node_modules/appwrite-cli/dist/cli.cjs:109834:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  code: 401,
  type: 'general_unauthorized_scope',
  response: '{"message":"app.68dbaefe0018a2746cb8@service.fra.cloud.appwrite.io (role: applications) missing scopes ([\\"rules.read\\"])","code":401,"type":"general_unauthorized_scope","version":"1.8.1"}'
}
28 Jan, 2026, 01:26

rules scope is not available to apikey for now

28 Jan, 2026, 01:26

you will need to login via a valid session

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