Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 将文件上载到S3时出现颤振SocketException_Ios_Flutter_Amazon S3_Socketexception_Pre Signed Url - Fatal编程技术网

Ios 将文件上载到S3时出现颤振SocketException

Ios 将文件上载到S3时出现颤振SocketException,ios,flutter,amazon-s3,socketexception,pre-signed-url,Ios,Flutter,Amazon S3,Socketexception,Pre Signed Url,在Flatter iOS应用程序中,我试图使用预先签名的URL将文件上载到AWS S3 它适用于小文件。但是,它在上载5x MB文件时引发以下错误。 奇怪的是,文件可以在iOS模拟器中成功上传,但在真实设备中却失败了 以下是错误消息 flutter: Exception: SocketException: Read failed (OS Error: Connection reset by peer, errno = 54), address = s3.eu-central-1.amazonaw

在Flatter iOS应用程序中,我试图使用预先签名的URL将文件上载到AWS S3

它适用于小文件。但是,它在上载5x MB文件时引发以下错误。 奇怪的是,文件可以在iOS模拟器中成功上传,但在真实设备中却失败了

以下是错误消息

flutter: Exception: SocketException: Read failed (OS Error: Connection reset by peer, errno = 54), address = s3.eu-central-1.amazonaws.com, port = 54505
flutter: Stacktrace: #0      _NativeSocket.read (dart:io-patch/socket_patch.dart:718:38)
#1      _RawSocket.read (dart:io-patch/socket_patch.dart:1457:22)
#2      _RawSecureSocket._readSocketOrBufferedData (dart:io/secure_socket.dart:974:22)
#3      _ExternalBuffer.writeFromSource (dart:io/secure_socket.dart:1216:30)
#4      _RawSecureSocket._readSocket (dart:io/secure_socket.dart:983:16)
#5      _RawSecureSocket._readHandler (dart:io/secure_socket.dart:776:5)
#6      _RawSecureSocket._eventDispatcher (dart:io/secure_socket.dart:764:9)
#7      _rootRunUnary (dart:async/zone.dart:1138:13)
#8      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#9      _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
#10     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#11     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)
#12     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:766:19)
#13     _StreamController._add (dart:async/stream_controller.dart:642:7)
#14     _StreamController.add (dart:async/stream_controller.dart:588:5)
#15     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1399:33)
#16     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:919:14)
#17     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#18     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
谁能帮我说说我做错了什么

更新1: 扑动医生-v,如下所示

[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en-GB)
    • Flutter version 1.12.13+hotfix.9 at /Users/leochiu/Documents/Sources/flutter
    • Framework revision f139b11009 (6 weeks ago), 2020-03-30 13:57:30 -0700
    • Engine revision af51afceb8
    • Dart version 2.7.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/leochiu/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4.1, Build version 11E503a
    • CocoaPods version 1.9.1

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[!] VS Code (version 1.45.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • S Box8Q40C • 0123456789 • android-arm • Android 4.4.2 (API 19)

! Doctor found issues in 1 category.

对我来说,解决方案是添加下一个标题
接受编码:gzip,deflate,br

对于我来说,解决方案是添加下一个标题
接受编码:gzip、deflate、br

您运行的是哪种颤振版本?你能展示一下你的颤振医生输出吗?@Nuts我已经更新了我的帖子,加入了颤振医生output@LeoChiu,您能找到解决方案吗?您正在运行哪个颤振版本?你能展示一下你的颤振医生输出吗?@Nuts我已经更新了我的帖子,加入了颤振医生output@LeoChiu,你能找到解决办法吗?
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en-GB)
    • Flutter version 1.12.13+hotfix.9 at /Users/leochiu/Documents/Sources/flutter
    • Framework revision f139b11009 (6 weeks ago), 2020-03-30 13:57:30 -0700
    • Engine revision af51afceb8
    • Dart version 2.7.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/leochiu/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4.1, Build version 11E503a
    • CocoaPods version 1.9.1

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[!] VS Code (version 1.45.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • S Box8Q40C • 0123456789 • android-arm • Android 4.4.2 (API 19)

! Doctor found issues in 1 category.