Back

Issue while deploying function

  • 0
  • Self Hosted
Karthik
13 Sep, 2023, 07:09

Error Invalid runtime param: Value must be one of (node-16.0, php-8.0, ruby-3.0, python-3.9, dart-3.0) but dart 3.0 is added to server

TL;DR
The user is experiencing an issue while deploying a function. They mention that the error they are seeing now is different from the previous error. They ask for help in determining if it is a code issue or a server-side issue. The response suggests checking the "appwrite.json" file and changing the "runtime" value to "dart-3.0". The user mentions that their function was created using Appwrite version 8.0.0 and Flutter SDK version 2.17.0. After upgrading to Appwrite version 10.0.0, they received an error about the required Flutter SDK version being 2.19
safwan
13 Sep, 2023, 07:10

can you run docker compose exec appwrite vars and see if it's being used by appwrite?

darShan
13 Sep, 2023, 07:11

appwrite version?

Karthik
13 Sep, 2023, 07:21

1.4.2

Karthik
13 Sep, 2023, 07:22
Meldiron
13 Sep, 2023, 09:04

Can you pls send screenshot of Console when you see this error? (or CLI)

Karthik
13 Sep, 2023, 11:35

cli

Meldiron
13 Sep, 2023, 11:36

Hmm curious what it sends as runtime πŸ€” Did you run init or deploy? If Init, you selected dart-3.0, right?

Karthik
13 Sep, 2023, 11:40

This function was created long before, at that time appwirte version used in function was 8.0.0 and server flutter sdk was 2.17.0. So when i upgraded appwrite version to 10. 0.0 after deployment i got an error about flutter sdk version wanted to be 2.19.0 to 3.0.0 . so we upgraded the server sdk version to 3.0.0 now i cant deploy function above error comes.

Karthik
13 Sep, 2023, 11:40

This was the first error

Meldiron
13 Sep, 2023, 11:41

Hmm its using Dart 2.17. In appwrite.json your function wants Dart 2.17. From your perspective, would you like to stay on Dat 2.17, or use latest Dart 3.0?

Karthik
13 Sep, 2023, 11:43

use dart 3.0. dart in the server was changed to that

Meldiron
13 Sep, 2023, 11:45

Okie, cool. Now visit your appwrite.json (in folder where you are running appwite CLI commands), and there will be definition of your functions. In each, there will be runtime. Change that to dart-3.0. After saving, the CLI command should work

Karthik
13 Sep, 2023, 11:53

Thanks it got deployed. but my trouble is not over i am not sure if its my function code issue or server side. please check the screenshot

Meldiron
13 Sep, 2023, 11:54

You should not see that exact error now, as you are using different dart version.

Can you share new error? it might be similar, but versions should differ

Karthik
13 Sep, 2023, 11:54
Karthik
13 Sep, 2023, 11:54

new error

Meldiron
13 Sep, 2023, 11:54

I think we now enforce lib structure in Dart. So you need your entrypoint to be inside lib folder

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more