sdk-for-dart
sdk-for-dart copied to clipboard
🐛 Bug Report: Unable to download file.
👟 Reproduction steps
Upload a 1GB file to appwrite Deploy a function using this dart SDK which downloads it. / Use the dart sdk locally and try to download it
👍 Expected behavior
It should download the file
👎 Actual Behavior
storage.getFileDownload crashes:
An internal curl error has occurred within the executor! Error Number: 104. Error Msg: Connection reset by peer\nError Code: 500
Might be a duplicate of: https://github.com/appwrite/sdk-generator/issues/820
🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
Linux
🧱 Your Environment
Appwrite 1.5.10 Dart SDK 11.0.3
👀 Have you spent some time to check if this issue has been raised before?
- [X] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [X] I have read the Code of Conduct
While my commit fixes my local test setup, the function execution still fails I added some details here: https://github.com/appwrite/appwrite/issues/6234#issuecomment-2288334339
@joern-h thanks for creating the issue 🙏
"Connection reset by peer" can mean that the download took longer than the maximum allowed time. But if its triggered before that, there can be some other issue.
can you please share the code that can reproduce this error?
@ChiragAgg5k Thank you for looking into it, i pushed a simple function to recreate the issue;
https://github.com/joern-h/appwrite-storage-issue-demo
{
"$id": "6446322d1156be7b0983",
"name": "apkanalyze",
"runtime": "dart-3.0",
"path": "../../functions/apkanalyze",
"entrypoint": "lib/main.dart",
"ignore": [
".packages",
".dart_tool"
],
"execute": [],
"events": [
"buckets.test.files.*.create"
],
"schedule": "",
"timeout": 300
},
I uploaded one file, it executed the function 178 times (Each uploaded chunk triggers create event, there is no event for upload finished)
The last execute failed after 2 seconds: Internal curl errors has occurred within the executor! Error Number: 52. Error Msg: Empty reply from server\nError Code: 500
@joern-h Thanks for going above and beyond creating the detailed repo! The team has been extremely busy with a huge release at the moment, and hence its taking a bit longer to get around to this. Rest assure we have noted this down and will get back to it soon!
Again, thanks for all the hard work 🫡