[SOLVED] Unable to find image 'openruntimes/dart:v2-3.0' when upgrading to new functions
- 0
- Flutter
- Functions
Hello! I am currently in the process of updating my functions to the newer version. Previously, my function was on dart v2.17. Now, I wanted to update and had to update the runtime to dart v3.0
This is what I did so far:
- Update pubspec.yaml for new dart_appwrite package
environment:
sdk: '>=3.0.0 <4.0.0'
dependencies:
dart_appwrite: ^10.0.0
dev_dependencies:
lints: ^2.0.1
- In appwrite.json, update the runtime:
{
"$id": "xyz",
"name": "xyz",
"runtime": "dart-3.0",
"path": "functions/xyz",
"entrypoint": "lib/main.dart",
"ignore": [
".packages",
".dart_tool"
],
"execute": [
"users"
],
"events": [],
"schedule": "",
"timeout": 15
},
- Changed runtime in appwrite console (image 1)
- Added the dart-3.0 to the .env in runtimes (image 2)
But still, when deploying, I get the following error:
Docker Error: Unable to find image 'openruntimes/dart:v2-3.0' locally
docker: Error response from daemon: manifest for openruntimes/dart:v2-3.0 not found: manifest unknown: manifest unknown.
See 'docker run --help'.
You can see the docker images I have in the third image.
What's your appwrite version?
1.4.2
Try upgrading to 1.4.3
Make backups previously of course
I'm still getting the same error
Did you try deploying to the old one or rewriting them and creating a new function?
you need to delete the old and create a new one
Ah okay, didn't know this
But I have deleted the old one and created a new one, but now I'm getting this error in the appwrite console logs (In my function, I don't have a src/folder and also not a line output = ....
Compiling ...
Info: Compiling with sound null safety.
src/server.dart:125:22: Error: This expression has type 'void' and can't be used.
output = await user_code.main(context);
^
Error: AOT compilation failed
Generating AOT kernel dill failed!
So in Appwrite 1.4.3, which cloud is now on, the syntax for functions have changed
It's a long read, but look through these pages: https://appwrite.io/docs/functions
The dart function you used likely didn't have the right format for the new runtimes.
So, I actually have changed my code to the new syntax before writing here, but your comment made me think again if I haven't forgotten anything. Turns out, I had Future<void> main instead of Future main which caused the error. Thank you for your help guys!
<a:dogekek:922629563278839870> I don't actually know dart that well, but I'm helping you walk through the debugging process
Well, now it’s solved, thanks! xD
[SOLVED] Unable to find image 'openruntimes/dart:v2-3.0' when upgrading to new functions
Recommended threads
- Feedback and Deployment Challenges with ...
Hello world!, I've been developing a project using FastAPI in Python, and I was considering deploying it through Appwrite Functions. However, I encountered a f...
- Custom Domain Verification Failed
Hi! I woke up to my app not working because of this custom domain verification failed error. I have not moved any DNS configuration since I set it up 3 years ag...
- Bulk feature status
Hi there, I am using version 1.7.4 self hosted and wanted to use the bulk operations in a dart function. I saw that in the dart_appwrite sdk version 16.1.0 it ...