miguelpruivo/flutter_file_picker

The path returned by FilePicker.platform.saveFile does not exist on ios

Closed this issue ยท 3 comments

Before creating an issue, make sure that you are on the latest file_picker version and that there aren't already any similar opened inssues. Also, check if it isn't described on the Wiki, specially on Troubleshooting page.

Also, sometimes a simple flutter clean and flutter build again with latest file_picker version, may end up by fixing cached issues, so I encourage you to first do so.

Describe the bug
The path returned by FilePicker.platform.saveFile does not exist on ios

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
What version did it happen?

How are you picking?

final savedPath = await FilePicker.platform.saveFile(
                          fileName: '${DateFormat("yyyy-MM-dd'T'HH:mm:ss").format(DateTime.now())}.png',
                          type: FileType.image,
                          bytes: bytes,
                        );

Details to reproduce the issue
The path returned by FilePicker.platform.saveFile does not exist on ios

Error Log

flutter: โ”‚ ๐Ÿ› savedPath: /private/var/mobile/Containers/Shared/AppGroup/B14C6240-7E8C-49CE-99BB-8F7AF53EA84A/File Provider Storage/ep-signature-2024-05-07T14:08:14.png
flutter: โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
flutter: \^[[38;5;196mโ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€<โ€ฆ>
flutter: \^[[38;5;196mโ”‚ 'package:image_cropper_platform_interface/src/method_channel/method_channel_image_cropper.dart': Failed assertion: line 72 pos 12: 'await File(sourcePath).exists()': is not true.<โ€ฆ>
flutter: \^[[38;5;196mโ”œโ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„<โ€ฆ>
flutter: \^[[38;5;196mโ”‚ #0   _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)<โ€ฆ>
flutter: \^[[38;5;196mโ”‚ #1   _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)<โ€ฆ>
flutter: \^[[38;5;196mโ”‚ #2   MethodChannelImageCropper.cropImage (package:image_cropper_platform_interface/src/method_channel/method_channel_image_cropper.dart:72:12)<โ€ฆ>
flutter: \^[[38;5;196mโ”‚ #3   <asynchronous suspension><โ€ฆ>
flutter: \^[[38;5;196mโ”‚ #4   SignatureUtil.cropImage (package:expert_planet/modules/mine/utils/signature_util.dart:117:25)<โ€ฆ>
flutter: \^[[38;5;196mโ”‚ #5   <asynchronous suspension><โ€ฆ>
flutter: \^[[38;5;196mโ”‚ #6   MineDialogs.showUploadBottomSheet.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:expert_planet/modules/mine/utils/mine_dialogs.dart:1512:48)<โ€ฆ>
flutter: \^[[38;5;196mโ”‚ #7   <asynchronous suspension><โ€ฆ>
flutter: \^[[38;5;196mโ”œโ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„โ”„<โ€ฆ>
flutter: \^[[38;5;196mโ”‚ โ›” null<โ€ฆ>

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

Flutter Version details

[โœ“] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-x64, locale zh-Hans-CN)
    โ€ข Flutter version 3.19.6 on channel stable at /Users/ying/flutter
    โ€ข Upstream repository https://github.com/flutter/flutter.git
    โ€ข Framework revision 54e66469a9 (3 ๅ‘จๅ‰), 2024-04-17 13:08:03 -0700
    โ€ข Engine revision c4cd48e186
    โ€ข Dart version 3.3.4
    โ€ข DevTools version 2.31.1

[โœ“] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    โ€ข Android SDK at /Users/ying/Android/sdk
    โ€ข Platform android-34, build-tools 34.0.0
    โ€ข ANDROID_HOME = /Users/ying/Android/sdk
    โ€ข 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-11572160)
    โ€ข 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.3)
    โ€ข 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-11572160)

[โœ“] IntelliJ IDEA Ultimate Edition (version 2024.1.1)
    โ€ข IntelliJ at /Applications/IntelliJ IDEA.app
    โ€ข Flutter plugin version 79.0.3
    โ€ข Dart plugin version 241.15989.9

[โœ“] Connected device (5 available)
    โ€ข sdk gphone64 x86 64 (mobile) โ€ข emulator-5554                        โ€ข android-x64    โ€ข Android 13 (API 33)
      (emulator)
    โ€ข Kimmy's iPhone (mobile)      โ€ข 00008020-000A1D110A32002E            โ€ข ios            โ€ข iOS 17.4.1 21E236
    โ€ข iPhone 15 Pro Max (mobile)   โ€ข 24AF00F3-A044-453B-A4EF-01834A59AA46 โ€ข ios            โ€ข
      com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    โ€ข macOS (desktop)              โ€ข macos                                โ€ข darwin-x64     โ€ข macOS 14.4.1 23E224
      darwin-x64
    โ€ข Chrome (web)                 โ€ข chrome                               โ€ข web-javascript โ€ข Google Chrome
      124.0.6367.119
    ! Error: Browsing on the local area network for Kimmy's Apple Watch. Ensure the device is unlocked and discoverable
      via Bluetooth. (code -27)

Additional context
Add any other context about the problem here.

Sorry, I seem to have missed this configuration.

<key>UISupportsDocumentBrowser</key>
<true/>

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

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