Back

Execution error with function template

  • 0
  • Self Hosted
  • Functions
vontdeux
26 Mar, 2024, 01:30

Error: Project with the requested ID could not be found. Please check the value of the X-Appwrite-Project header to ensure the correct project ID is being used.

Appwrite version : 1.4.9 What i'm trying to do: create function manually from template here - https://github.com/appwrite/templates/tree/main/node/storage-cleaner what i've done :

  • downloaded it,targzip the content of storage cleaner into "storage-cleaner.tar.gz"
  • create a manual deployment of function, drag and drop it
  • set entry point to - "src/main.js"
  • add build settings > commands - "npm install"
  • wait for build complete.
  • set settings > execute access - "any"
  • set settings > environment variable - RETENTION_PERIOD_DAYS=1 APPWRITE_API_KEY=<my api key> APPWRITE_BUCKET_ID=<bucket name> APPWRITE_FUNCTION_ENDPOINT=<my endpoint>
  • press execute with default path "/", method "GET"

deployment : success execution : failed with error "Error: Project with the requested ID could not be found. Please check the value of the X-Appwrite-Project header to ensure the correct project ID is being used. at Client.call (/usr/local/server/src/function/node_modules/node-appwrite/lib/client.js:174:31) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Storage.listFiles (/usr/local/server/src/function/node_modules/node-appwrite/lib/services/storage.js:264:16) at async AppwriteService.cleanBucket (file:///usr/local/server/src/function/src/appwrite.js:38:18) at async Module.default (file:///usr/local/server/src/function/src/main.js:15:3) at async execute (/usr/local/server/src/server.js:141:22) at async /usr/local/server/src/server.js:158:13"

anyone knows a solution or stumble upon the same issue?

TL;DR
Error message "Project with the requested ID could not be found" while trying to deploy a function template in Appwrite. Ensure correct project ID is used in X-Appwrite-Project header.
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