And i added as main terget lib/main.dart as mentioned in starter-function readme
btw, you should upgrade to 1.4.2
so your function starter has folder structure like this? with lib/main.dart? https://github.com/appwrite/functions-starter/tree/v3/dart-3.0
Yes exactly but i picked the dart 2.17
oh i forgot to mention it. I am already using the 1.4.2
the local instance as well as the instance in my NAS
are you using some storage provider?
and how did you deploy your function?
no i am not using any storage provider.
now i am able to deploy my function
what i did was i just updated my dart in .env file of appwrite so i used dart-3.0 instead dart-2.17 and then recreated the appwrite instance with docker compose up -d and then deploayd the starter-function with dart 3 runtime and now i am able to execute it.
i think i need to migrate then my old functions to the new function syntax as well. Its a bit diffderent now.
the problem with functions i have now is that i am getting null when trying to access the environment variables with Platform.environment['api_key'] i setted the environment variable in my function setting and tryed to access it in dart but i am getting null what could be the cause? Or is it something i am doing wrong to get the environment variable.
please create a new post since this is a different topic
Yes i solved the problem by naming the environment variables with underscore instead minus so instead api-key => api_key. I wish this could be mention in somewhere. But is it like something that the environment variables must be named by underscore that i should new about it or what?
weirrd..i didn't think that would be a problem..
i just tested with a dash and it works for me π§
Oh really interesting i changed it from dash to underscore it worked. I thought this could be the case but. What could be then the cause i am curius now.
maybe function wasn't redeployed the first time?
i dont know i tryed again right now with dash its not working. Maybe i am doing something else not correct. I will then figure this out what i did wrong later.
but have a question how do i send secrets for example passwords for resetting or some other secrets to the function from client sdk (flutter).
right now i am sending it to the body
please create a new post
Ok of course thank you for your support.
[SOLVED] migration error on appwrite 1.4.1
Recommended threads
- Rec'd a "phishing" email that apparently...
I received an email attempting to convince me that my password expired - and the link wanted to send me to an appwrite instance: (https://updating-projects-ads....
- function subdomain ssl certs
The generated subdomain isn't getting a valid ssl cert, I was wondering if appwrite automatically generates one or uses a wildcard for *.functions.domain.com? ...
- HackByte X AppWrite
I am Om an Organiser at Hackbyte, Central India's largest hackathon. We are an MLH acreddited hackathon and this is our 4th iteration. Last year we had around ...