C-Command Software Forum

hdiutil: unflatten failed

I have been building successfully for a while with my file directory on my Mac. I am running 3.2.2. However, now I need to build using the files on my PC - the folder is linked to my Mac.

The whole build works fine until the DropDMG step, when I get these messages:

hdiutil: unflatten: unflattening “AppStudio.dmg”…
hdiutil: unflatten: “AppStudio.dmg” failed: Input/output error (4294967260)
hdiutil: unflatten failed - Input/output error

Any idea what I can do?

An input/output error generally indicates a problem with the hard drive or with the way it’s connected to the Mac. In this case, it might be failing because the “unflatten” command is unable to create a (temporary) resource fork, which is where DropDMG puts the license agreement. Do you mean that you’re accessing the PC folder via a network? Are you able to copy the source files to the Mac first?

Yes, the files are being accessed over the network. I’m actually doing this in a .command script:

cd /Volumes/Files/nsbx/Setup-Mac
dropdmg --config-name=nsbx-Win --layout-name=nsbxLayout --license-name=EULA --custom-icon --internet-enabled nsbx.app

FYI, –config-name overrides all the other options, since it will get that info from the configuration.

Can you try modifying your script to “cp” the file to your local hard drive, do the work there, and the “cp” the .dmg file to the network drive?

Yes, copying to the local hard drive works.

Is there a way to do this without copying? I’m not sure what you mean by calling attention to --config-name. Will it make any difference to this?

Since the OS did not report a very specific reason for the error, I’m not able to say. Do you know how the network drive is formatted and which protocol you’re using to connect to it? It’s possible that changing one or both of those would help.

It’s not related to this problem, but I wanted to point it out as it’s a potential source of future bugs in your script.