[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
- Flutter OAuth2 Google does not return to...
When the flow starts, the browser opens, I select an account, and it keeps showing: """ Page not found The page you're looking for doesn't exist. `general_rout...
- Error
I'm trying to get sellerId using account.get() in my appwrite function and this is the error message I'm getting: "Failed to send notification to seller 6865bf...
- Is there a timeframe for updating dart r...
Dart 3.5 is already one year old, and the following versions have introduced very important features for the language. Is there a roadmap or timeframe for when...
