I'm working on a custom function in Appwrite, but I'm facing an issue where some environment variables are not passing through correctly.
Mising Variables: APPWRITE_FUNCTION_EVENT: undefined APPWRITE_FUNCTION_EVENT_DATA: undefined Parsed Event Data: {} Database ID: undefined Collection ID: undefined Document ID: undefined
This occurs whether I trigger the function manually or through a client using: databases . * . collections . * . documents . * . create
What I’ve Tried: Checked that all environment variables are correctly defined in the function settings. Verified that they are accessible within other parts of the Appwrite project. Manually triggered the function to see if the issue persists outside of client-side triggers. Examined logs for any errors or missing data. Observations: Some environment variables are available, but others are missing or undefined. This issue occurs regardless of the trigger method. The function is running in Node.js 22.9.0, and I’m using Appwrite 1.6.1.
Attached is the log file and my script. Any help is much appreciated!
Native logs detected. Use context.log() or context.error() for better experience. Starting audio analysis trigger function... All Environment Variables: APPWRITE_API_KEY: [DEFINED-ANONYMIZED] APPWRITE_VCS_ROOT_DIRECTORY: APPWRITE_VCS_REPOSITORY_ID: 922324856 APPWRITE_FUNCTION_RUNTIME_NAME: Node.js NODE_VERSION: 22.9.0 HOSTNAME: b658da0aaa4c28060e1cfe4992945025 APPWRITE_VERSION: 1.6.1 YARN_VERSION: 1.22.22 APPWRITE_VCS_REPOSITORY_BRANCH_URL: [DEFINED-ANONYMIZED] APPWRITE_VCS_COMMIT_HASH: af7d242a2276fe21293d7afdffe29ff5354e91e1 SHLVL: 5 APPWRITE_AUDIO_COLLECTION_ID: 679286ca00381c6ed109 HOME: /root OLDPWD: /usr/local/server APPWRITE_FUNCTION_CPUS: 1 APPWRITE_VCS_COMMIT_AUTHOR_URL: [DEFINED-ANONYMIZED] OPEN_RUNTIMES_ENV: production APPWRITE_FUNCTION_MEMORY: 512 OPEN_RUNTIMES_HEADERS: {} CYANITE_API_KEY: [DEFINED-ANONYMIZED] OPEN_RUNTIMES_CPUS: 1 APPWRITE_DEPLOYMENT_TYPE: vcs OPEN_RUNTIMES_MEMORY: 512 APPWRITE_VCS_REPOSITORY_BRANCH: main APPWRITE_VCS_COMMIT_AUTHOR_NAME: [DEFINED-ANONYMIZED] APPWRITE_DB_ID: 679286550029ad300dcd PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin APPWRITE_VCS_REPOSITORY_OWNER: [DEFINED-ANONYMIZED] APPWRITE_FUNCTION_NAME: Cyanite_api_request APPWRITE_REGION: fra APPWRITE_ENDPOINT: [DEFINED-ANONYMIZED] APPWRITE_VCS_REPOSITORY_URL: [DEFINED-ANONYMIZED] INERNAL_EXECUTOR_HOSTNAME: exc1 OPEN_RUNTIMES_ENTRYPOINT: src/main.js APPWRITE_FUNCTION_RUNTIME_VERSION: 22 APPWRITE_FUNCTION_ID: 6795663c00271b1663c3 APPWRITE_FUNCTION_API_ENDPOINT: [DEFINED-ANONYMIZED] APPWRITE_VCS_REPOSITORY_NAME: Cyanite_api_request PWD: /usr/local/server APPWRITE_VCS_COMMIT_URL: [DEFINED-ANONYMIZED] OPEN_RUNTIMES_HOSTNAME: exc1 APPWRITE_FUNCTION_DEPLOYMENT: 679767b345af6f175f01 APPWRITE_VCS_COMMIT_MESSAGE: debug main
APPWRITE_FUNCTION_PROJECT_ID: 679283e8000cb489b808 OPEN_RUNTIMES_SECRET: [DEFINED-ANONYMIZED] CYANITE_WEBHOOK_SECRET: [DEFINED-ANONYMIZED] APPWRITE_FUNCTION_EVENT: undefined APPWRITE_FUNCTION_EVENT_DATA: undefined Parsed Event Data: {} Database ID: undefined Collection ID: undefined Document ID: undefined Missing event data; no document created.
The main.js file
Updated version
Recommended threads
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- Can't connect GitHub — 500 error at the ...
Appwrite Cloud, Pro plan, SFO region. All my Git connections vanished today — Sites and all 15 Functions now show no repository connected. When I try to add a ...
- GB Hours IS NOT resetting
Hi, I was checking my usage and noticed that all of my usage quotas were reset on August 20, 2026, when my billing cycle renewed. Everything else appears to ha...