Rank 2: Process
_APP_EXECUTOR_HOST=http://appwrite-executor/v1
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
_APP_EXECUTOR_HOST=http://appwrite-executor/v1
Rank 2: Process
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
Rank 2: Process
ok, trying
Rank 2: Process
Rank 2: Process
testing function
Rank 2: Process
there is no error. But some internal error inside the funtion. Strange
Rank 2: Process
like that
Rank 2: Process
Do I need to touch also my working function with 1.3.8 and make changes?
Rank 2: Process
if I restore from backup with the same function with 1.3.8 its working again
Rank 2: Process
I guess I need also to update the web sdk in the function:
im testing it again
Rank 2: Process
it doesnt helped
Rank 2: Process
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
Rank 2: Process
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\"]}"}
Rank 2: Process
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
Rank 2: Process
ohh okay, thanks for that. Need to wait for 1.4.3 🙂
ya sorry about that
Rank 2: Process
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
Rank 2: Process
okay
Rank 2: Process
I miss the env APPWRITE_FUNCTION_JWT also in V3.
process.env looks:
Is APPWRITE_FUNCTION_JWT also not implemented in V3?
Rank 2: Process
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