Skip to main content

Error: The disk image couldn't be opened. The operation couldn't be completed

On macOS Sonoma opening the disk image might fail with the following error:

The disk image couldn't be opened.

The operation couldn't be completed.

Permission denied.

On macoS Sonoma there seems to be an issue affecting disk images with a license dialog (as usedin the Ducklet Trial version disk image): https://forum.c-command.com/t/dmgs-with-license-agreement-fail-to-mount-onto-some-sonoma-installations/15494

This issue seems to affect only a few users on macOS Sonoma.

The following two options from the link above are fairly unobtrusive:

Remove the com.apple.quarantine xattr from the .dmg file after download Download the disk image using a tool (e.g. curl) that does not add the quarantine attribute

E.g. for the first one, you can check whether the attribute is set:

xattr -l Ducklet-Trial.dmg

On a fresh download on Sonoma the output looks something like this:

com.apple.macl:
com.apple.metadata.kMDItemDownloadedData: bplist...
com.apple.metadata.kMDItemWhereFrom: bplist...
com.apple.quarantine: 0083....Safari....

The com.apple.quarantine flag can be removed using:

xattr -d com.apple.quarantine Ducklet-Trial.dmg

It is not great advice to just recommend stripping this attribute (or to just remove the attribute because someone on the internet says so :/) so maybe https://eclecticlight.co/2021/12/11/explainer-quarantine/ is good read on the matter to understand whether this is viable option.

The other suggestion would be to remove the file and re-download it via curl:

curl -OL https://ducklet.app/files/Ducklet-Trial.dmg

Double check the file using codesign (as outlined in the installation instructions) to ensure the file is valid.

The file downloaded via curl won't have any extended attributes set (again, use xattr -l Ducklet-Trial.dmg to verify this).

It should then be possible to open the disk image.