-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[firebase_storage]: The operation couldn’t be completed. Message too long #16999
Comments
Hi @feinstein, I couldn't reproduce this issue on my end. Could you review the firebase_storage example to check if there’s anything you might have missed? |
Hi @SelaseKay I tried to copy-paste the example main inside my main, so it would use my firebase configurations, but I am getting another error now: |
@SelaseKay btw, I am not the first one to report this #12973 |
Hi @feinstein, could you try commenting out the following block and testing again? if (defaultTargetPlatform != TargetPlatform.windows) {
// window currently don't support storage emulator
final emulatorHost =
(!kIsWeb && defaultTargetPlatform == TargetPlatform.android)
? '10.0.2.2'
: 'localhost';
await FirebaseStorage.instance.useStorageEmulator(emulatorHost, 9199);
} The OP of the linked issue confirmed that an update resolved the problem on their end, so it seems the issue has been addressed. |
I'm unable to reproduce on my end. Have you tried testing on an actual iOS device? |
No I didn't, I don't have one. Are you using the iOS image gallery picker? The file path it gives me is: flutter: /Users/michelfeinstein/Library/Developer/CoreSimulator/Devices/553B8096-3723-4092-B2F1-222776238EB8/data/Containers/Data/Application/AE1A417A-0BF2-4C67-9123-D17E834275E4/tmp/image_picker_AF55D77F-DB74-4A41-9455-349822708D38-94428-00000B21D71C95FB.jpg Do you get something similar? Could it be a path that's too long? If it is, then I don't know how to solve this bc the temp folder is also very long... maybe in a real device its shorter. |
Hi @feinstein, my path looks very similar and works fine for me, so I doubt that's the issue. This might be caused by something upstream. Could you try switching networks and testing again? Alternatively, waiting a bit and retrying later might help. It seems to be related to this issue. |
I don't think that's the case because I have tried this on different days, multiple times and the error message doesn't seem to be network related. Can you escalate this to an engineer that knows what this message means? |
Hi @feinstein, this issue doesn't appear to be directly related to FlutterFire and might be originating from the native side. It could be worth testing on other iOS devices. This issue thread seems related, and I recommend trying the solutions suggested in this comment to see if they resolve the issue. |
Interesting, looking at that issue, it seems like some iphones have different sizes of datagrams, so if the firebase sdk is trying to upload a file and each datagram is bugger than what's supported, it's going to fail. I am using an iPhone 16 with ios 18.2 simulador if you want to test. Now, from that issue they say that changing from InLineDataPart to FileDataPart solved it, but this is at the native sdk level, so I can't fix it myself, the Flutter sdk needs to change how it's sending data to the underlying ios native SDK. |
Is there an existing issue for this?
Which plugins are affected?
Storage
Which platforms are affected?
iOS
Description
I am using an iOS simulator and when I try to upload a picture, I am getting this error:
Reproducing the issue
Try running this code in an iOS Simulator with iOS 18.2:
Firebase Core version
3.10.1
Flutter Version
3.24.4
Relevant Log Output
Flutter dependencies
Expand
Flutter dependencies
snippetAdditional context and comments
No response
The text was updated successfully, but these errors were encountered: