Back
Error `(role: applications) missing scope (rules.read)` when deploying self-hosted functions
- 0
- Self Hosted
- Functions
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)Recommended threads
- Invalid query: Query on attribute has gr...
I cannot view the table within the Console
- Functions not executing after usage rese...
Hi team, Last month my project hit 100% usage and functions stopped working (expected). Now the new month has started and usage has reset, requests are going ...
- Functions never end and always fail (sta...
Hi ! I'm using Appwrite Cloud Pro and function execution from appwrite website is KO. Deploying starter function template, execution is always Failed and the ...