-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
hdiutil unmount issue blocks dmg creation for MacOS builds #4606
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
Comments
I experienced the same thing but it appeared to happen on After having researched I found #2115 (comment) which then let me re-check the versions. tl:dr:
First make sure there is no global installation left by doing:
After that check if there is still a global one as a leftover (like in my case that was the issue):
After that and after upgrading the versions it should be alright. |
Have to roll back here. It still happens from time to time. |
Ahh okay, it's too bad that updating the package didn't fix it but thanks for the reply. |
Hi,
My application used to build fine 3 months ago but since two weeks the dmg creation fails almost every time. I suspect an issue with my current macOSX version combined with my fusion hard drive but I have no more idea. Thanks in advance. |
Unfortunately, we are still dealing with the same problem... If we find anything, I will update this issue. |
Same problem here. Versions:
|
Has anyone solved this? Having the same issue here
|
Worked around by using macOS 10.13 for now |
Hi, "electron-builder": "^21.0.2" Not sure if it's related, but as I build .dmg quite regularly with electron-builder, I think the first time I had this issue was right after I started to use the iCloud storage .. 👽 |
Same issue here on OSX 10.15.3. This machine is running Sophos antivirus, which i have no way of disabling |
Hi, I'm facing the same issue: electron-builder: 21.2.0 I have no AV active on the system. It stopped working the day I upgraded MacOS X to Catalina. Any idea @develar ? Thanks for your time. |
The logs:
|
It still happens a lot on my side, but from time to time it works again. I don't have any clue why. 😞 |
Same thing here. I've been seeing it randomly for the past month or two but usually waiting a little bit and trying again once or twice succeeds. electron-builder: 22.4.1 When I got the error this time, I hit cmd-c to kill it and got some additional logging, not sure if it is helpful though.
As I finished writing this my mac said there was an update. I installed that and rebooted (MacOs version did not change). Ran |
I recently removed Sophos AV and it was working again perfectly. Sophos was not active but still installed on the system. So I think Sophos was the issue for me. I fixed the problem by moving all the build to Azure Pipelines. |
I uninstalled Sophos today and it works again 🎉 |
+1 I'm also having this issue |
Update build.yml in an effort to capture DMG output Local build fails due to Sophos anti-virus shenanigans (electron-userland/electron-builder#4606)
I'm having this issue intermittently on a factory reset Mojave 10.4.6 Mac Mini without any anti-virus installed. It's a build machine as clean as a whistle with no globals installed, no AV, not even an extra browser installed, nothing. If there's anything logging or environment wise I can provide to help fix this, I'd be happy to provide :) |
I wrestled with this exact issue for several hours tonight until I came across this post on superuser.com, which led me to try disabling Spotlight indexing: https://electrictoolbox.com/disable-spotlight-indexing-mac-osx/. After running As for why Sophos could have been material to other folks' problems, I figure that's because Sophos must scan your disk in the same problematic way that Spotlight does. That's just speculation, though. EDIT: changed the |
+1 also experiencing this issue - I do have Sophos, but unable to disable/uninstall it |
Stopped working for me as well, and yes, also Sophos enforced on my machine...
I guess it's impossible to get the Mac build working in a docker container? |
Hey @manderson-te! We tried this solution but it didn't work for us, unfortunately. Thanks for the suggestion though. |
I also see this, but only on GitHub Actions and never locally. Very intermittent; it fails about 40% of the time. Can give full logs if desired. |
I believe the underlying issue here is fixed by this pull request: LinusU/node-appdmg#190 |
I am seeing this issue consistently when I try to export a dmg. I do have Sophos and cannot be disabled unfortunately. Is there any other work around? |
I was having the same issue in a CI pipeline running with:
Changed node version to |
Uninstalling Sophos and upgrading node from 12.18.3 to 14.15.4 did it for me, after updating to macOSX 11.1. |
If you are running Sophos (or any other antivirus for that matter), try adding an exclusion for the temporary mount point of your DMG. i.e. add /Volumes/${VOLNAME} to the list of exclused directories to your antivirus, where you replace ${VOLNAME} with the actual name given to the hdiutil, i.e. hdiutil create ${OUTPUTDMG} -volname ${VOLNAME?} ... |
Same issue for me:
If a run a single arch it works: However it fails when using 2 arch:
|
I have the same issue with an M1 mac, works with GitHub actions though |
@bjbk, does this issue occur on M1 for only universal builds or also if building explicitly just x64 or arm64? Would you be willing to report back with using this for your mac config and the debug flag?
All in all, I have an optimistic ETA of 2 weeks for an M1. |
Just a quick response (wasn't able to get the debug logs yet) arch: 'arm64' -> failed building target=DMG arch=arm64 file=dist/electron/Packaged/redacted-arm64.dmg
• Above command failed, retrying 5 more times
• Above command failed, retrying 4 more times
• Above command failed, retrying 3 more times
• Above command failed, retrying 2 more times
• Above command failed, retrying 1 more times
• Above command failed, retrying 0 more times arch: 'x64' -> failed • building target=DMG arch=x64 file=dist/electron/Packaged/redacted.dmg
• Above command failed, retrying 5 more times
• Above command failed, retrying 4 more times
• Above command failed, retrying 3 more times
• Above command failed, retrying 2 more times
• Above command failed, retrying 1 more times
• Above command failed, retrying 0 more times same error: Will work on getting debug logs. |
@bjbk shot in the dark here, can you try commenting out this line in your local package?
In my local install, it's line 304 of Related note, adding the env DEBUG flag will also add |
Not sure how much you need from the vast debug log, but this is just where it fails: arch: arm64 DIHLDiskImageCreate() returned 1
hdiutil: create failed - Operation not permitted
• exited command=hdiutil code=1 pid=56234
• Above command failed, retrying 0 more times
• async task error error=hdiutil exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
App · ⚠️ [FAIL] electron-builder could not build Will comment out the line indicated and try again. |
Commented out the line Success!! No errors! DIHLDiskImageCreate() returned 0
image-components:
0: /private/var/folders/qq/ms4wb8nn5pl8yl68x3c8rn2c0000gn/T/t-eWp43l/0.dmg
created: /private/var/folders/qq/ms4wb8nn5pl8yl68x3c8rn2c0000gn/T/t-eWp43l/0.dmg
• exited command=hdiutil code=0 pid=57656
• executing file=hdiutil args=resize -size 727064651.5 /private/var/folders/qq/ms4wb8nn5pl8yl68x3c8rn2c0000gn/T/t-eWp43l/0.dmg
• executed file=hdiutil
• executing file=hdiutil args=attach -noverify -noautoopen -readwrite /private/var/folders/qq/ms4wb8nn5pl8yl68x3c8rn2c0000gn/T/t-eWp43l/0.dmg
• executed file=hdiutil stdout=
/dev/disk6 GUID_partition_scheme
/dev/disk6s1 Apple_APFS
/dev/disk7 EF57347C-0000-11AA-AA11-0030654
/dev/disk7s1 41504653-0000-11AA-AA11-0030654 /Volumes/redacted-universal |
Alrighty, great progress!
I've been trying to get those fsargs removed for a hot minute but never had explicit proof it was impacting the build process. |
Nope, no dice. 😞 Build failed. This is very interesting, BTW! Thanks for letting me help! (I hope this is helping!) 😂 |
Oh dangit, well that's the smoking gun. My best guess is that M1's can't build a dmg with HFS+ filesystem or M1's simply don't support HFS+ at all. APFS has been out since 2017, so it's a reasonable surprise-Apple-roundhouse-kick for it to be enforced now 😅 |
That seems a reasonable conclusion. Price of 'progress' I suppose! |
Can you try with this then? If this works, then you might have created the solution to this M1 issue 😉
Builds fine locally on my Intel-mac. The problem now is how to handle backward compatibility... Building dmg's on M1 innately means that users will blindly be dropping support of pre-Sierra Macs, so there's not much electron-builder can do there. And if we don't fix this, then dmg-builder doesn't work for any new Mac machine. The only route I see here is to conditionally select HFS+ on intel mac, and then for M1's, using APFS and adding a |
Build successful as anticipated. App · [SUCCESS] electron-builder built the app The logger warning sounds reasonable. I'm not really qualified (experienced enough) to elaborate further. Perhaps a note in the docs would be prudent as well. The resulting DMG opened on my Intel Mac as expected too. |
…s. Apple Silicon dropped support for creating dmgs with HFS+ (electron-userland#4606)
…s. Apple Silicon dropped support for creating dmgs with HFS+ (electron-userland#4606)
I can confirm this worked for me. |
it's still happening for me on electron-builder@23.6.0 and electron@21.1.1, Mac OS 12.6 M1 on building for x64 arch with the following options:
error:
|
I find solution. //dmg:{ and another solution is that i write another dmg-title name.... (ex) test1 or tes ) |
problem (it is warning, dmg build is not fail)
resolve
thankyou! @activenode |
Versions in use:
electron-builder
:21.2.0
electron
:5.0.2
node
:12.0.0
Building for MacOS
Issue:
We recently upgraded our technical stack to allow for the notarization of our app. We are using
electron-notarize
and for the most part, everything works as expected. Unfortunately, when building our application for distribution we are running into a problem with MacOS where the dmg creation fails about 90% of the time (you can check the supplied logs in the issue for more information). We thought that the problem might be something with our setup and we spent a significant amount of time digging into that but to no avail.After checking things over we decided to look into
electron-builder
and after setting the debug flagsDEBUG=electron-builder DEBUG_DMG=true
we see that there is a problem when running thehdiutil
command inelectron-builder
. I did some research and the only references to this error are back from 2016 here: #854. Unfortunately, we have no antivirus running and none of the comments in that thread have helped.The problem we are facing really slows us down and we often have to build 10 or more times before we get a successful build. Has anyone else faced this issue? Is there something silly I am overlooking? Any help would be really appreciated. If more logs are useful then please let me know and I can post a more detailed logging output. Thanks for the help in advance.
Relevant logs:
The text was updated successfully, but these errors were encountered: