miguelpruivo / flutter_file_picker

File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.
MIT License
1.35k stars 672 forks source link

Crash on IOS while slide down to close picker delegate #1626

Open virskor opened 2 weeks ago

virskor commented 2 weeks ago

Describe the bug file_picker: ^8.1.3 while slide down to close picker delegate, app crashed

flutter: [MethodChannelFilePicker] Platform exception: PlatformException(multiple_request, Cancelled by a second request, null, null)
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(multiple_request, Cancelled by a second request, null, null)

but click cancel button to close works well.

Platform

Platform OS version What version did it happen? IOS 18.1 How are you picking?

    final FilePickerResult? result = await FilePicker.platform.pickFiles(
      allowMultiple: false,
      type: FileType.custom,
      lockParentWindow: false,
      allowCompression: false,
      allowedExtensions: ['csv'],
    );

    /// 没有选择文件
    if (result == null || result.files.isEmpty) {
      return;
    }

Details to reproduce the issue Provide all the details to reproduce the issue.

Error Log

flutter: onReceiveClientId: d3fc2febef5f60571f55c1483276349c
flutter: [MethodChannelFilePicker] Platform exception: PlatformException(multiple_request, Cancelled by a second request, null, null)
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(multiple_request, Cancelled by a second request, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
<asynchronous suspension>
#2      MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:520)
<asynchronous suspension>
#3      FilePickerIO._getPath (package:file_picker/src/file_picker_io.dart:103)
<asynchronous suspension>

Screenshots and/or video If applicable, add screenshots or video to help explain your problem.

https://github.com/user-attachments/assets/92e9311d-50b1-498e-9223-06015bfd76da

Flutter Version details Please, post the output of your flutter doctor -v, preferably, while running the issued device/simulator.

Additional context Add any other context about the problem here.

virskor commented 2 weeks ago
[✓] Flutter (Channel stable, 3.24.4, on macOS 15.1 24B83 darwin-arm64, locale zh-Hans-KR)
    • Flutter version 3.24.4 on channel stable at /Users/weizhang/fvm/versions/3.24.4
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 603104015d (13 days ago), 2024-10-24 08:01:25 -0700
    • Engine revision db49896cf2
    • Dart version 3.5.4
    • DevTools version 2.37.3
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/weizhang/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.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 17.0.10+0-17.0.10b1087.21-11609105)

[✓] VS Code (version 1.95.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.100.0

[!] Proxy Configuration
    • HTTP_PROXY is set
    ! NO_PROXY is not set

[✓] Connected device (4 available)
    • iPhone (mobile)                 • 00008120-001A43612613C01E • ios            • iOS 18.1 22B83
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 15.1 24B83 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 15.1 24B83 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 130.0.6723.92

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 7 days with no activity.

ashiq-mvp commented 3 days ago

Same issue - (SIGSEGV) @miguelpruivo

Location: 0x00005E24 in Runner.app/Frameworks/file_picker.framework/file_picker

Crash Details: Araby_AI-ios-crashreport-11-18-2024_1132+0400.crash.zip