
Hello,
I'm trying the local functions dev env. It's very useful.
I tried python-3.9 and it works out of the box But I can't get dart runtimes working. I tried dart-3.1 and dart-3.3
I've updated the docker compose .env
_APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0,dart-3.3,dotnet-3.1,dart-3.1
and downloaded the runtimes docker pull openruntimes/dart:v3-3.1 (tried v4-3.1 as well) docker pull openruntimes/dart:v3-3.3
then restarted the containers
Function is very basic:
import 'dart:async';
// This Appwrite function will be executed every time your function is triggered
Future<dynamic> main(final context) async {
return context.res.json({
'motto': 'Build like a team of hundreds_',
'learn': 'https://appwrite.io/docs',
'connect': 'https://appwrite.io/discord',
'getInspired': 'https://builtwith.appwrite.io',
});
}
The functions are well created but when I request the http://localhost:3000/ I get the following error:
Request body size exceeds the size limit.
#0 action (file:///usr/local/server/src/server.dart:33)
#1 main.<anonymous closure> (file:///usr/local/server/src/server.dart:196)
#2 handleRequest (package:shelf/shelf_io.dart:138)
#3 serveRequests.<anonymous closure>.<anonymous closure> (package:shelf/shelf_io.dart:91)
#4 _rootRunUnary (dart:async/zone.dart:1407)
#5 _CustomZone.runUnary (dart:async/zone.dart:1308)
#6 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217)
#7 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339)
#8 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271)
#9 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784)
#10 _StreamController._add (dart:async/stream_controller.dart:658)
.....
Am I missing something ?

Can you show example of the request body that is causing the issue

I just went to http://localhost:3000/ with a browser, it works for the python runtime

I guess it's an empty GET query

So you are not able to access your dashboard? m I right?
If yes then
Try these
docker compose down
docker compose up -d --remove-orphans

I'm calling a local function (run with 'appwrite run function'). How is it related to the dashboard ?

yes I'm able to access the dashboard

Try to execute your function from dashboard.

A local function does not exist in the dashboard. It exists only once you execute 'appwrite push functions'

Let me reproduce it on my side.

I used 'appwrite init functions' to create it
Recommended threads
- How to detect user disconnection?
I'm creating a 1v1 challenge using realtime and i want to trigger a function when the user disconnect... how to make this using Appwrite Realtime? i searched i...
- How can I use appwrite function for stre...
I am building a course website where I want users can view the videos stored in appwrite storage in diff quality and also will do some processing before streami...
- Every time I deploy a function via CLI, ...
deploying appwrite function via cli breaks Git connection in function settings tab but when I push to git triggered deployment fail. usually multiple deployment...
