8000 🐛 Bug Report:Error when uploading large files (over 5 MB) with Appwrite SDK for Flutter (SDK Version: 9.0.1, Server Version: 1.3.3) · Issue #5838 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🐛 Bug Report:Error when uploading large files (over 5 MB) with Appwrite SDK for Flutter (SDK Version: 9.0.1, Server Version: 1.3.3) #5838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
fvdf opened this issue Jul 18, 2023 · 3 comments
Assignees
Labels
bug Something isn't working product / storage Fixes and upgrades for the Appwrite Storage.

Comments

@fvdf
Copy link
fvdf commented Jul 18, 2023

👟 Reproduction steps

  1. Initialize the Appwrite SDK in a Flutter application (version 9.0.1).
  2. Use the SDK to send a file upload request to the Appwrite server (version 1.3.3) with a file larger than 5 MB.
  3. Observe that the upload process gets stuck after sending the first part of the file (approximately 5 MB).

👍 Expected behavior

I expected the Appwrite SDK to successfully upload the entire file larger than 5 MB without any issues.

👎 Actual Behavior

The Appwrite SDK only uploads the first part of the file (approximately 5 MB) and then the upload process gets stuck.

flutter: UploadProgress($id: 64b648843534b29877ad, progress: 80.5257811319271, sizeUploaded: 5242879, chunksTotal: 2, chunksUploaded: 1) flutter: {message: Server Error, code: 500, type: general_unknown, version: 1}

🎲 Appwrite version

Version 1.3.x

💻 Operating system

MacOS

🧱 Your Environment

  • Appwrite Server Version: 1.3.3
  • Appwrite SDK for Flutter Version: 9.0.1
  • Flutter Version: 3.12.0-15.0.pre.29 (Channel master)
  • Operating System: macOS 13.4.1 (Darwin-x64)
  • Locale: fr-FR

Additional Information

I apologize in advance for any confusion in my explanation due to my limited English proficiency.

I have thoroughly searched through the Appwrite SDK documentation, existing issues on the official repository, and various online resources for several weeks, but haven't found any solution to resolve this issue with larger files.

I can confirm that the Appwrite server (version 1.3.3) is properly configured to handle large files, as I can successfully upload 20 MB files using the server's web interface on my portable device.

I have also tested this functionality on both a real device and a simulator, and the issue persists, indicating that it is not platform-specific.

I appreciate any assistance and guidance in resolving this issue, as it is essential for the proper functioning of my application.

Thank you very much for your help!

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@fvdf fvdf added the bug Something isn't working label Jul 18, 2023
@stnguyen90 stnguyen90 added the product / storage Fixes and upgrades for the Appwrite Storage. label Jul 19, 2023
@stnguyen90 stnguyen90 self-assigned this Jul 19, 2023
@stnguyen90
Copy link
Contributor

@fvdf, thanks for raising this issue! 🙏 It looks like you got a 500 error. Would you please check the docker logs from the appwrite container to see the message related to the 500 error?

@fvdf
Copy link
Author
fvdf commented Jul 19, 2023

@stnguyen90, thank you so much for looking into my issue and providing your assistance! 🙏

I've checked the docker logs from the Appwrite container when attempting to upload a large file (over 5 MB), and here are the relevant logs:

1: 2023-07-19T05:46:19.552869332Z [Error] Line: 64 2: 2023-07-19T05:46:19.552819185Z [Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php 3: 2023-07-19T05:46:19.552140486Z [Error] Message: Out of range value for column 'chunksTotal' at row 1 4: 2023-07-19T05:46:19.552092023Z [Error] Type: PDOException 5: 2023-07-19T05:46:19.551988172Z [Error] URL: /v1/storage/buckets/:bucketId/files 6: 2023-07-19T05:46:19.551870469Z [Error] Method: POST 7: 2023-07-19T05:46:19.551497139Z [Error] Timestamp: 2023-07-19T05:46:19+00:00

I hope this information helps in identifying and resolving the problem. Please let me know if there's anything else I can provide to assist in solving this issue.

@fvdf
Copy link
Author
fvdf commented Jul 20, 2023

🎉Good news! I have resolved the issue. After understanding from the logs that the error was coming from my server and not the Flutter SDK, I uninstalled my Docker Compose and updated the YAML file to upgrade Appwrite to the latest version (1.3.7). Once done, I restarted the server, and everything now works perfectly.🚀

🙏A big thank you to you, @stnguyen90, for your help. 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / storage Fixes and upgrades for the Appwrite Storage.
Projects
None yet
Development

No branches or pull requests

2 participants
0