src/server.dart:115:25: Error: Method not found: 'main'.
user_code.main(context)
^^^^
src/server.dart:125:38: Error: Method not found: 'main'.
output = await user_code.main(context);
^^^^
Error: AOT compilation failed
Generating AOT kernel dill failed!```
Am unable to detect what the error is
Kindly assist if you can
dart - function build error
dart - function deployment error
Your function signiture is wrong with you function
Can I see your code? Did you start from a starter template?
It's trying to run the main function of your Appwrite function, but isn't finding the main function
I used the starter template @VincentGe
final client = Client();
// Uncomment the services you need, delete the ones you don't
// final account = Account(client);
// final avatars = Avatars(client);
// final database = Databases(client);
// final functions = Functions(client);
// final health = Health(client);
// final locale = Locale(client);
// final storage = Storage(client);
// final teams = Teams(client);
// final users = Users(client);
client
.setEndpoint("https://cloud.appwrite.io/v1")
.setProject(projectId)
.setKey("API_KEY")
.setSelfSigned(status: true);
emptier();
setter();
// api from env var
apiToken = (req.variables['DAMMY_GONGOZ_API']);
// decode user request
userRequest = await jsonDecode(req.payload);
// decide which service
superResponse = await whichServiceExec();
{
res.json({
'Status': superResponse,
});
}
}```
๐ where did u get this?
this is very very old
sighs
And the function was created today and autogenerated by appwrite cli
ahhh yes
the CLI
can u do appwrite -v ?
what version is ur cli
maybe we missed something ๐
2.0.2
!
sighs
we're on like
4.1
๐
try updating the CLI
lemme know how that goes
Recommended threads
- After a GET request is passed to functio...
Create execution in the console can normally retrieve the get parametersใWHy๏ผ
- 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? ...
- Python Function Deployment hits General ...
The same deployment was working without issue yesterday and I have not hit any free tier limits yet. How do I figure out what's happening? Are you having issues...