I called 2 cloud functions which suppose to send email to user. But It's returning previews functions data. I mean that data is completely changed.
I am using 1.1.2 and dart 2.17 for cloud function
try {
final result = await state.functions.createExecution(
functionId: EnvConfig.instance.appwriteSendEmailFunctionId,
data: data);
print(result.toMap());
print(result.response);
print(result.stderr);
print(result.stdout);
} on Exception catch (e) {
print('error');
print(e);
}
This is how I call my function
Which version of Appwrite Dart SDK are you using?
Make sure you use the version of Dart SDK for 1.1.2
1.1.2 Everything is for 1.1.2 cli and appwrite
So for Dart SDKs: https://github.com/appwrite/sdk-for-dart/releases
You'll probably wanna try 7.1.0?
Functions for 1.1.2 has a different signature compared to 1.4.x
You might need to use an older SDK if you're on Appwrite 1.1.2
Yes sir i using dart_appwrite: ^4.0.2
You might need to update your SDK in that case
So in short, Appwrite functions can be executed synchronously and asynchronously.
- Synchronous executions will return the result immediately
- Asynchronous executions will return the execution summary like what you see.
async is default false in newer SDKs.
https://appwrite.io/docs/references/1.1.x/server-dart/functions#createExecution
Recommended threads
- Hosting Issues with Static IP not domain...
I have a machine with Static Public IP. I want to host Appwrite Site on it but I tried it but it doesn't allow IP addresses in Domain names. What should I do h...
- encrypt and decrypt buckets
I have a bucket where I switched from encryption to not encrypting files. I later realized that files already uploaded earlier stay encrypted. Now I have a buck...
- Unable to Create Storage After Upgrading...
We upgraded our Appwrite instance from version 1.8.0 to 1.9.0 and successfully ran the migration process. However, after the upgrade, we are no longer able to c...