
Hi! I have created a function for appwrite in dart. My problem is, no matter how simple the function is and no matter what I write in the main.dart file, I always get the following error in Appwrite Console:
Docker Error: Killed
Resolving dependencies...
+ collection 1.17.0 (1.17.2 available)
+ matcher 0.12.12 (0.12.16 available)
+ meta 1.9.1
+ path 1.8.3
+ pub_semver 2.1.4
+ pubspec 2.3.0
+ quiver 3.2.1
+ source_span 1.9.1 (1.10.0 available)
+ stack_trace 1.10.0 (1.11.0 available)
+ string_scanner 1.1.1 (1.2.0 available)
+ term_glyph 1.2.1
+ uri 1.0.0
+ yaml 3.1.1 (3.1.2 available)
Downloading pubspec 2.3.0...
Downloading uri 1.0.0...
Downloading yaml 3.1.1...
Downloading string_scanner 1.1.1...
Downloading path 1.8.3...
Downloading quiver 3.2.1...
Downloading collection 1.17.0...
Downloading pub_semver 2.1.4...
Downloading source_span 1.9.1...
Downloading term_glyph 1.2.1...
Downloading matcher 0.12.12...
Downloading stack_trace 1.10.0...
Downloading meta 1.9.1...
That's all I get. When clicking on "Raw Data", I get the following output:
{
"message": "Not Found",
"code": 404,
"type": "general_route_not_found",
"version": "1.3.7"
}
My appwrite function looks like this:
import 'package:dart_appwrite/dart_appwrite.dart';
void main(final req, final res) {
Client client = Client();
Users users = Users(client);
client
.setEndpoint('http://localhost/v1')
.setProject('[PROJECT_ID]')
.setKey(
'[MY_KEY]')
;
print(req);
final userId = req;
Future result = users.delete(
userId: userId,
);
result.then((response) {
print(response);
}).catchError((error) {
print(error.response);
});
}

Have you run migrates after upgrading Appwrite?
Also, is this a local environment? If so it's better to write
client
.setEndpoint('http://1.1.1.1/v1')

When 1.1.1.1
is your machine host internal IP.

Yes I have.

This another problem related to this https://github.com/appwrite/appwrite/issues/5623

Are you self hosting?

yes, I am

well, they say it should be fixed with 1.3.6, right? But I am on 1.3.7 and I am still facing this issue.

I think it's another endpoint, I've the same problem as you when trying to access the raw logs

Try increasing the function memory environment variable

It's currently set to 0..... xD

To what should I increase it

Ok I've found the issue

And: _APP_FUNCTIONS_CPUS=0 _APP_FUNCTIONS_MEMORY=0 _APP_FUNCTIONS_MEMORY_SWAP=0
These all are 0. I assume I should also set cpus > 0?

Look in you url you have something like this
v1/functions/ID/execution/ID?mode=admin&project=ID

?

uhm

I am not even able to execute

because it's not building

When clicking on Raw Data

wait, lemme see


so instead of execution, deployment

Change it to plural deployments
instead of deployment
And let me know

"$id": "[ID]",
"$createdAt": "2023-06-29T20:07:04.677+00:00",
"$updatedAt": "2023-06-29T20:07:04.743+00:00",
"resourceId": "649dde756bd7b92267a0",
"resourceType": "functions",
"entrypoint": "lib/main.dart",
"size": 3850,
"buildId": "[IDK if this is sensitive]",
"activate": true,
"status": "failed",
"buildStdout": "",
"buildStderr": "Docker Error: Killed\nResolving dependencies...\n+ collection 1.17.0 (1.17.2 available)\n+ matcher 0.12.12 (0.12.16 available)\n+ meta 1.9.1\n+ path 1.8.3\n+ pub_semver 2.1.4\n+ pubspec 2.3.0\n+ quiver 3.2.1\n+ source_span 1.9.1 (1.10.0 available)\n+ stack_trace 1.10.0 (1.11.0 available)\n+ string_scanner 1.1.1 (1.2.0 available)\n+ term_glyph 1.2.1\n+ uri 1.0.0\n+ yaml 3.1.1 (3.1.2 available)\nDownloading pubspec 2.3.0...\nDownloading uri 1.0.0...\nDownloading yaml 3.1.1...\nDownloading string_scanner 1.1.1...\nDownloading path 1.8.3...\nDownloading quiver 3.2.1...\nDownloading collection 1.17.0...\nDownloading pub_semver 2.1.4...\nDownloading source_span 1.9.1...\nDownloading term_glyph 1.2.1...\nDownloading matcher 0.12.12...\nDownloading stack_trace 1.10.0...\nDownloading meta 1.9.1...\n",
"buildTime": 0
}
Recommended threads
- 503 Timeout when Updating or Upserting D...
Hey I’m running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
