Skip to content
Back

Error `(role: applications) missing scope (rules.read)` when deploying self-hosted functions

  • 0
  • Self Hosted
  • Functions
Ludwig
18 Dec, 2024, 01:22

When deploying functions like this:

TypeScript
appwrite client --endpoint mydomain.com --project-id some-id --key some_key
appwrite push functions --all --force --verbose

I get this output:

TypeScript
Success: Setting client
Info: Validating functions ...
Info: Checking for changes ...
Info: Pushing functions ...
Pushing      • api-handler (api_handler)                • Ignoring using: .gitignore
Creating     • user-created-handler (user_created_handler) • Ignoring using: .gitignore
Pushing      • app-config-handler (app_config_handler)  • Ignoring using: .gitignore(node:94912) ExperimentalWarning: buffer.File is an experimental✗ Error        • api-handler (api_handler)                • app.projectId@service.mydomain.
Error        • user-created-handler (user_created_handler) • app.projectId@service.mydomain
Error        • app-config-handler (app_config_handler)  • app.projectId@service.mydomain
Success: Successfully pushed 3 functions.
AppwriteException [Error]: app.projectId@service.mydomain.com (role: applications) missing scope (rules.read)
    at Client.call (/home/asd/.nvm/versions/node/v18.18.2/lib/node_modules/appwrite-cli/lib/client.js:211:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async proxyListRules (/home/asd/.nvm/versions/node/v18.18.2/lib/node_modules/appwrite-cli/lib/commands/proxy.js:68:16)
    at async /home/asd/.nvm/versions/node/v18.18.2/lib/node_modules/appwrite-cli/lib/commands/push.js:1235:37
    at async Promise.all (index 0)
    at async pushFunction (/home/asd/.nvm/versions/node/v18.18.2/lib/node_modules/appwrite-cli/lib/commands/push.js:1072:5) {
  code: 401,
  response: 'general_unauthorized_scope'
}

The API key i'm using for the CLI has all scopes enabled. Neither online nor in the Discord here i can find anything on a rules.read scope. The functions do get deployed (they show up in the console), but still wondering about this error. Anyone any idea? v1.6, CLI v6.1.0

TL;DR
Developers are encountering an error stating "missing scope (rules.read)" when deploying self-hosted functions with the Appwrite CLI. Despite all scopes being enabled for the API key, the specific 'rules.read' scope is not mentioned. The functions are successfully deployed, but the error persists. Any insights on resolving this issue would be appreciated. (No solution provided)
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