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.34k stars 673 forks source link

Failed to retrieve path from bundle. #1477

Closed mohsinnaqvi606 closed 6 months ago

mohsinnaqvi606 commented 7 months ago

Describe the bug Filepicker is giving this error while selecting any file. [MethodChannelFilePicker] Platform exception: PlatformException(unknown_path, Failed to retrieve path from bundle., null, null). I am able to open file picker screen and check available files but on selecting of file getting the above error

I think this is happening because I am writing some native code for Android & override these methods

  1. onRequestPermissionsResult
  2. onActivityResult But I also called the super function of these overrides

Platform

Platform OS version Android 13

How are you picking?

 FilePickerResult? result = await FilePicker.platform.pickFiles(
      type: FileType.custom,
      allowedExtensions: ['jpeg', 'jpg', 'gif', 'png', 'tif', 'tiff', 'pdf'],
    );

    if (result != null) {
    print('Selected : ${result.files[0].name}');
    }

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

Error Log D/CompatibilityChangeReporter(26182): Compat change id reported: 78294732; UID 10272; state: ENABLED E/OpenGLRenderer(26182): Unable to match the desired swap behavior. I/flutter (26182): [MethodChannelFilePicker] Platform exception: PlatformException(unknown_path, Failed to retrieve path from bundle., null, null) E/flutter (26182): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(unknown_path, Failed to retrieve path from bundle., null, null) E/flutter (26182): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7) E/flutter (26182): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18) E/flutter (26182): E/flutter (26182): #2 MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:520:35) E/flutter (26182): E/flutter (26182): #3 FilePickerIO._getPath (package:file_picker/src/file_picker_io.dart:99:33) E/flutter (26182): E/flutter (26182): #4 ChatViewModel.pickFile (package:doctoc/screens/chat/chat_viewmodel.dart:159:32) E/flutter (26182): E/flutter (26182):

Flutter Version details [✓] Flutter (Channel stable, 3.19.4, on macOS 14.4.1 23E224 darwin-arm64, locale en-PK) • Flutter version 3.19.4 on channel stable at /Users/invotyx/Development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 68bfaea224 (12 days ago), 2024-03-20 15:36:31 -0700 • Engine revision a5c24f538d • Dart version 3.3.2 • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/invotyx/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 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted.

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

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

[✓] Android Studio (version 2023.2) • 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.9+0-17.0.9b1087.7-11185874)

[✓] Connected device (3 available) • Pixel 4a (mobile) • 16021JEC206054 • android-arm64 • Android 13 (API 33) • macOS (desktop) • macos • darwin-arm64 • macOS 14.4.1 23E224 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.87 ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27)

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

• No issues found!

github-actions[bot] commented 7 months ago

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

github-actions[bot] commented 6 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.