stream-chat-flutter
stream-chat-flutter copied to clipboard
Getting error while sending image on chat - File type application/octet-stream is not supported
Which packages are you using?
stream_chat_flutter
On what platforms did you experience the issue?
iOS, Android
What version are you using?
stream_chat_flutter: ^6.10.0
What happened?
When we send image to chat it will getting upload error
Steps to reproduce
1. Chat message screen
2. select image and send
3. Getting error
Supporting info to reproduce
It will not getting error for all images, this happened only for some images
Relevant log output
flutter: 2023-09-13 14:53:11.923221 π¨ πΈοΈ β DioExceptionType.badResponse
flutter: 2023-09-13 14:53:11.923911 π¨ πΈοΈ β {
flutter: 2023-09-13 14:53:11.924592 π¨ πΈοΈ β code: 4,
flutter: 2023-09-13 14:53:11.925728 π¨ πΈοΈ β message: "UploadImage failed with error: "File type application/octet-stream is not supported"",
flutter: 2023-09-13 14:53:11.925857 π¨ πΈοΈ β StatusCode: 400,
flutter: 2023-09-13 14:53:11.926025 π¨ πΈοΈ β duration: "0.00ms",
flutter: 2023-09-13 14:53:11.926193 π¨ πΈοΈ β more_info: "https://getstream.io/chat/docs/api_errors_response",
flutter: 2023-09-13 14:53:11.926666 π¨ πΈοΈ β details: []
flutter: 2023-09-13 14:53:11.926803 π¨ πΈοΈ β }
Flutter analyze output
No response
Flutter doctor output
[β] Flutter (Channel stable, 3.10.5, on macOS 13.4.1 22F770820d darwin-arm64, locale en-IN)
β’ Flutter version 3.10.5 on channel stable at /Volumes/Personal/flutter
β’ Upstream repository https://github.com/flutter/flutter.git
β’ Framework revision 796c8ef792 (3 months ago), 2023-06-13 15:51:02 -0700
β’ Engine revision 45f6e00911
β’ Dart version 3.0.5
β’ DevTools version 2.23.1
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
β’ Android SDK at /Users/chiragsondagar/Library/Android/sdk
β’ Platform android-34, build-tools 34.0.0
β’ Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
β Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[β] Xcode - develop for iOS and macOS (Xcode 14.3.1)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Build 14E300c
β’ CocoaPods version 1.12.0
[β] Chrome - develop for the web
β’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[β] Android Studio (version 2022.1)
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/9212-flutter
β’ Dart plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/6351-dart
β’ Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[β] Connected device (3 available)
β’ iPhone 14 Pro (mobile) β’ 52EAB4E7-7218-4DBD-AAFD-976DA00D6BA8 β’ ios β’ com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
β’ macOS (desktop) β’ macos β’ darwin-arm64 β’ macOS 13.4.1 22F770820d darwin-arm64
β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 116.0.5845.140
[β] Network resources
β’ All expected network resources are available.
! Doctor found issues in 1 category.
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
@ChiragGajjar can you also share the image which is throwing this error? I can test it on my end. Thanks
And one another device we getting this issue, - Android
Hey @ChiragGajjar, The file you uploaded is not a valid image file type. It's an ISO media that should be uploaded as a file rather than an image. Thanks.
You can also test it here: https://www.checkfiletype.com/
And one another device we getting this issue, - Android
Can you verify if the necessary permissions are allowed for the app in settings?
Yeah, We have given all permissions, it's working another device. but on that device we getting that issue.
Hey @ChiragGajjar, The file you uploaded is not a valid image file type. It's an ISO media that should be uploaded as a file rather than an image. Thanks.
You can also test it here: https://www.checkfiletype.com/
About this I have download some images from safari and 10% images is with this type - application/octet-stream.
@ChiragGajjar I asked our backend team for info. I will keep you posted.
Hi @ChiragGajjar,
Could you please share your app_id?
I am closing this off as there is no progress or additional info.
Please don't hesitate to re-open it if the issue persists.
People still report this issue on Android in the samples apps
@esarbanis Any update on this issue?
Here is the app ID:- 1198644
@ChiragGajjar I am working on this now, I am trying to reproduce, I may have some more questions to help me out. Please bear with me π π
@ChiragGajjar I get the error that the mime type is image/avif have you tried adding this mime type to your app's configuration?
I can't find out this methods on flutter.
client.updateAppSetting
That can only be called from the server SDKs, alternatively you can go to the dashboard Chat Messaging -> Overview -> Upload Configuration -> Images and add an Allow behavior.
I am gong to close this, but will have my eye out if this is reported again to re-open it.
I see this issue was recently closed... why? I have been waiting for a resolution since October 2023. This is still an issue.
I am happy to re-open it, but I would like your help to reproduce it @mednow-roman .
This was closed because no-one answered my question and lack of activity usually means either a fix or a workaround was found without communicating it.
Great, thank you! Here are screenshots of my correspondence with your team regarding this. Let me know what else you need from me.
Files/Images are NOT blocked as far as I can tell.
@esarbanis Any updates on this? You asked for some details... were my screenshots enough?
@mednow-roman Thank you for your help π ! To be honest, I didn't find the time to go through them yet.
I expect to tackle this issue within the week. I am now driving this to master, but I going through conflict hell with it ...
This issue is stale because it has been open for 20 days with no activity.
Bump.
@esarbanis Any update on this?
This issue is stale because it has been open for 20 days with no activity.
We pay $500 USD per month for your services so we would appreciate some progress updates and a timeline of when you expect to have this fixed by... and/or if it has been fixed already in a future version.
We are using the following stream packages:
stream_chat_flutter: 6.11.0
stream_chat_flutter_core: 6.10.0
stream_chat_localizations: 5.11.0
@mednow-roman + @ChiragGajjar there's a lot of noise on this issue, I am creating a new thread with the issue so we can sort out the proper issue.

You can also test it here: https://www.checkfiletype.com/