-
Notifications
You must be signed in to change notification settings - Fork 152
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
Error: Command failed: hdiutil detach #142
Comments
Probably need some kind of backoff with a retry-strategy here... |
Came here from #143 I'd like to propose the fix I mentioned there. Both fixes are definitely workarounds and probably not a long term solution. But I'd just like to get the ball rolling on this topic because this package is still breaking on my computer with this error. Inside Solution 1: Set a longer timeout to free up the resource (check out this forum for more information)
Solution 2: Forcibly detach the image (I tested this and it did not noticeably affect my app)
|
Any update on this? I have the same issue since I upgraded MacOS X to Catalina. |
Update: I'm withdrawing this suggestion. It assumed the unmounting was just for the sake of cleaning up at the end of the build, but upon further investigating, it appears that the creation of the dmg will not work if the drive is still mounted.I'm experiencing this problem as well. The culprit in my case is a security scanner that is snooping the mount and preventing it from unmounting for a few minutes beyond the end of the failed build. Ideally
An alternative might be leave a command for the developer to invoke later to clean up once the scan is complete. And of course a warning message to suggest invoking it. |
This should be fixed by #214 released as 🚢 0.6.5 / 2023-02-01 |
@LinusU hate to be the barer of bad news, but I don't think that fixed it. I've made a bug report in a consuming library, https://github.com/sindresorhus/create-dmg which uses This only occured when moving from a macOS 12 to a macOS 13 runner for GitHub Actions, see: https://github.com/othyn/macos-auto-clicker/actions/workflows/cicd.yml You can see all the failed builds, with only one of them being randomly successful for both
The context of the action is running within Fastlane, which is just a build chain task runner for Xcode. sindresorhus/create-dmg is an opinionated wrapper around this library setting a load of defaults, with all errors being surfaced from this library. Finding information online about this is pretty impossible, especially for debugging. Any ideas? |
Hello @othyn I'm currently encountering the same issue running a very close configuration
I'm very interested on evolution of this issue |
@LinusU I'm also experiencing the same issue, and it's happening completely randomly on github actions. about 1/5 builds randomly fails. Using 0.6.6. Edit: I got it! Turns out the error is exactly what it says it is: in some cases, the volume has already been unmounted, so check before attempting to unmount. See here: |
@yuvalkarmi awesome that a fix has been submitted, still just need to wait for that to be merged though and then a dependency bump on this repo to use it. @elneruda I gave up doing DMG builds a long time ago as there just wasn't a reliable option. I just zipped the app instead:
|
I have been using this package, via electron-builder for almost a year with no problems. Recently, though, I started getting this error when it tries to unmount the temporary disk image.
Tracked it down to https://github.com/LinusU/node-appdmg/blob/master/lib/hdiutil.js#L64,
exitCode
is now justcode
, so the retry after one second was not happening.However, even after I fixed that, it was still failing intermittently, so I put it on a setInterval to make 5 attempts on 2sec intervals, or until it succeeds.
Seems to be working.
The text was updated successfully, but these errors were encountered: