_APP_EXECUTOR_HOST=http://appwrite-executor/v1
that's all correct. maybe the network isn't right. Woud you please try running:
docker compose down
and make sure the networks get removed. Then, run
docker compose up -d
ok, trying
testing function
there is no error. But some internal error inside the funtion. Strange
like that
Do I need to touch also my working function with 1.3.8 and make changes?
if I restore from backup with the same function with 1.3.8 its working again
I guess I need also to update the web sdk in the function:
im testing it again
it doesnt helped
figure it out:
my code is:
logger.info("token: " + req.variables['APPWRITE_FUNCTION_JWT']);
if (
!req.variables['APPWRITE_FUNCTION_ENDPOINT'] ||
!req.variables['APPWRITE_FUNCTION_JWT']
) {
logger.warn("Environment variables are not set. Function cannot use Appwrite SDK.");
} else {
client
.setEndpoint(req.variables['APPWRITE_FUNCTION_ENDPOINT'])
.setProject(req.variables['APPWRITE_FUNCTION_PROJECT_ID'])
.setJWT(req.variables['APPWRITE_FUNCTION_JWT']) // Your users JWT
// .setKey(req.variables['APPWRITE_FUNCTION_API_KEY'])
.setSelfSigned(true);
logger.info("Enviroment variables are set.")
}
appwrite is not providing the enviorment variable: APPWRITE_FUNCTION_JWT
the req variable contains:
{"variables":{"APPWRITE_FUNCTION_ENDPOINT":"https://192.168.1.102:443/v1","APPWRITE_FUNCTION_PROJECT_ID":"sjdfgjk","APPWRITE_FUNCTION_ID":"jiodfjgeg8duv","APPWRITE_FUNCTION_NAME":"name","APPWRITE_FUNCTION_DEPLOYMENT":"64ffa1478604a6fc3b41","APPWRITE_FUNCTION_RUNTIME_NAME":"Node.js","APPWRITE_FUNCTION_RUNTIME_VERSION":"16.0","INERNAL_EXECUTOR_HOSTNAME":"appwrite-executor"},"headers":{},"payload":"{\"requestedFunction\":\"createContacts\",\"cKundenNrs\":[\"K20235211\"]}"}
How can we fix this issue?
Ah yes...we missed this for old functions. This will be fixed in 1.4.3: https://github.com/appwrite/appwrite/pull/6215/files
ohh okay, thanks for that. Need to wait for 1.4.3 π
ya sorry about that
when do you plan with the rollout for 1.4.3?
soon...hard to say at the moment. we still need to figure out what should be fixed now vs later
okay
I miss the env APPWRITE_FUNCTION_JWT also in V3.
process.env looks:
Is APPWRITE_FUNCTION_JWT also not implemented in V3?
those are in the headers: https://appwrite.io/docs/functions-develop#headers
process.env contains stuff that doesn't change between requests. headers has the other stuff
Recommended threads
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...