I remember having this issue once in the past but not how I fixed it. I have a fairly simple function to allow users to update their profile picture but it fails at the first step final XFile? image = await ImagePicker().pickImage(source: ImageSource.gallery);
Here is the first error:
2022-08-13 13:21:44.215616+0300 Runner[3940:211672] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)""
2022-08-13 13:21:44.230196+0300 Runner[3940:211673] [PAAccessLogger] Failed to log access with error: access=<PATCCAccess 0x2806da5b0> accessor:<<PAApplication 0x282ab0500 identifierType:auditToken identifier:{pid:3940, version:11538}>> identifier:EF438868-FF12-4741-9ACF-88D57992D9BE kind:intervalEnd timestampAdjustment:0 tccService:kTCCServicePhotos, error=Error Domain=PAErrorDomain Code=10 "Possibly incomplete access interval automatically ended by daemon"
The only setup needed in iOS for this package is adding permissions in the info.plist file which I've done. That is also how the function is shown in the pub package so there's no reason it shouldn't work. The error I will show below implies that I'm using something like maxWidth
, maxHeight
, or trying to compress the image, but I'm not using any of those parameters. It also seems like the image file is referred to as null
, which is why I think the above error is the issue. Any other similar questions I've seen had no answers and most were using those parameters. I appreciate any ideas.
Error 2:
2022-08-13 13:21:44.243912+0300 Runner[3940:211261] image_picker: compressing is not supported for type (null). Returning the image with original quality
Of course, I wanted to see what I could do to get around this until a solution is found so I changed the image source to the camera instead of the gallery. Now there is no error from image_picker
, but the next step is creating an Image
from the XFile?
Image.file(File(image!.path))
. I have to use a null check on the XFile
but I get an error saying it is null. That mean although no error is given by image_picker
, it's not actually returning an image.