-
Notifications
You must be signed in to change notification settings - Fork 712
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
Temporary file could not be created. #997
Comments
Same problem here |
Have the same problem. my version file_picker:
dependency: "direct main"
description:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.1" Execution environment
|
Hi, how are you picking the files? |
I am having the same problem. It only happens with one photo and the others work fine. I am using iOS simulator. Message:
Details:
Error from logs:
|
For me this only happens in the iOS simulator, on a real iPhone it works fine. |
You are probably trying with the pink flowers photo on the simulator — that's a known iOS simulator issue since iOS 14. You should "ignore it". 😄 |
Same issue happening with me on a real device. |
I'm also experiencing this issue. I've been getting this issues on the Xcode simulator running Xcode 13.3.1, iOS 15.4.1, and package version 4.5.1. I have yet to test on a physical device yet. Before this issue only occurred on the pink flowers picture in the simulator but now its happening with all the pictures. The error message I am getting is:
And the code I am using to call the file picker is:
EDIT: I can't reproduce it on a physical device so it looks like a simulator issue (for me at least) |
Inside info.plist Package: image_picker: ^0.8.4+11 |
+1 for any picture on simulator |
Update: it seems that if you exclude arm64 from Excluded Architectures from Target -> Runner, you'll get the error. If you remove it, it's working again. |
@miguelpruivo /// Uploads the file to the device.
/// This function will return the list of files.
static Future<Set<PlatformFile>> uploadFile(
[FileType? fileType,
bool? allowMultipleFiles,
List<String>? extensions]) async =>
(await FilePicker.platform.pickFiles(
type: fileType ?? FileType.any,
allowMultiple: allowMultipleFiles ?? false,
allowedExtensions: extensions))
?.files
.toSet() ??
<PlatformFile>{}; Called it here IconButton(
icon: const Icon(
TablerIcons.photo,
color: Colors.black,
),
onPressed: () async {
try {
// await controller!.stopCamera();
Set<PlatformFile> _file =
await AppService.uploadFile(FileType.image);
if (_file.isNotEmpty) {
bool _gotData = await AppService.getQRData(
_scaffoldKey.currentContext!,
_file.first.path,
);
if (_gotData) {
await Navigator.pushReplacementNamed(
context, PageRoutes.activatingAtSign);
}
} else {
await controller!.startCamera(onScan);
await showToast(
'No image picked', _scaffoldKey.currentContext!, true);
}
} on Exception catch (e) {
await controller!.stopCamera();
qrLog.severe(e);
await showToast('Failed to pick image',
_scaffoldKey.currentContext!, true);
}
},
), And the below is result. 2022-06-14.16-07-54.mp4 |
Why this issue is closed? |
I'm also experiencing this issue (Mac M1, iPhone Simulator with iOS 15.5). It looks like it was prematurely closed if this comment was the reason for closing this. Looking at this similar package image_picker their readme states:
If file_picker's case is the same it would be useful to know it! |
Will there be a resolution for this ? |
May be this should be fixed from apple 😅 |
I am not even picking that flower image but still getting that error on the Mac M1 chip. Any fixes ? |
This is still not working |
Seems to be random. On my MacBox pro, it is fined, on M1 (used to work but no longer working). |
can I help you? |
@NabeelAbid1812 sure |
same here still got the same problem... 19/12/2022 mac mini m1 |
I also recently had the same issue on iphonesimulator with media picking. However, I managed to make it work by changing Document Storage to "On My iPhone" and restarting app. Also try select not first media file, but any other. |
Hello @miguelpruivo! |
also have the same problem. Any solution? |
Facing the same issue as well. need t fix this ASAP |
I am facing this issue on real ios device. |
Also facing the same issue on real iphone device |
We are also facing this issue in semi large scale on production devices |
I am facing the same issue when I used the following settings on my physical iPhone: |
This issue is stale because it has been open for 7 days with no activity. |
Faced the issue with live photos taken with iPhone camera app. If I turn off the live feature, I'm able to upload the image. |
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. |
#997 (comment) Different results were seen depending on the format of the image ("Settings" -> "Formats"). "High Efficiency" succeeded in picking in live photos, while "Most Compatible" failed. |
I have implemented a workaround for selecting multiple photos. Instead of failing completely, the process now retrieves the selected photos successfully. This improvement is included in PR #1639. |
flutter: [MethodChannelFilePicker] Platform exception: PlatformException(file_picker_error, Temporary file could not be created, Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.item" UserInfo={NSLocalizedDescription=Cannot load representation of type public.item}, null)
Platform: iOS
The text was updated successfully, but these errors were encountered: