marktext: Cannot install MarkText 0.17.0rc2-arm64 on M1 MacBook Air
Description
Hi, I’m on an M1 MacBook Air and the ARM64 release candidate application is corrupted no matter how many times I download it (be it the .dmg or the .zip). The checksum works out fine, so I’m confused as to what could be causing this. The x64 version works perfectly fine, in contrast.
- Can you reproduce the issue?
Steps to reproduce
Download the 0.17.0rc2-arm64 version and try to install it.
Expected behavior:
Normal installation
Actual behavior:
Versions
- MarkText version: 0.17.0rc2-arm64
- Operating system: macOS 12.2 Monterey
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 11
- Comments: 32 (4 by maintainers)
Hi, I know it is sort of a hot-fix to get MarkText running, but the following command did the trick for me on an M1 MBA running macOS v12.1:
Minor comment, it is not a good idea to run anything you don’t under sudo.
To remove the quantine element from the app, you guys don’t need to remove it with
sudo
, just runxattr -r -d com.apple.quarantine /Applications/MarkText.app
and that should be enoughThis isn’t the recommended command since it removes all app attribute (metadata). A simple
sudo xattr -r -d com.apple.quarantine /Applications/MarkText.app
was sufficient for me to get the ARM64 build working.The Eclectic Light Company has a good writeup about
xattr
and Quarantine here.I haven’t measured the performance difference between the x64 and ARM64 builds of MarkText, but in other instances have seen huge performance gains by using an ARM64 build and large resource draws by using an x64 build.
For now I’m opting to build it from source, prefer not to use Rosetta 2 when I can.
That worked for me as well, thank you so much!
@ryh This doesn’t work with the
arm64
build. Only thex64
build.More info here from Apple:
The top requirement of a valid signature is why the
arm64
build is gaining the Quarantine flag in the first place.Solution would be to attach an Ad-Hoc signature before distributing the
arm64
build. Then the user would only encounter the error you receive on thex64
build, which your method of clicking Open or allowing through GateKeeper will work.Most macOS users have seen this “damaged application” message and have learned to easily work around it by right clicking the application icon and choosing “Open.”
It’s only needed the first time. macOS remembers from that point on that the application is not in fact damaged at all. It’s no longer in quarantine.
yeah without
sudo
this command worked for me on a m2 macbook@ryh Two distinct error messages are being given once the application is placed in the /Applications folder
You’re correct about the
x64
build, this is solved by allowing it through GateKeeper. This error associates with code signing.The
I think this is due to Apple Silicon builds requiring signed code (or at least a valid developer account). Again, Eclectic Light Company has another good writeup about this here.
arm64
build however throws this error that can only be fixed using thexattr
command.This requires registration of an apple developer account before code sign, which costs about $99/year, and we do not plan to sign marktext now, one reason is that marktext is not stable enough, and the other is that we do not have a stable financial donations to pay $99/year.
@fxha this is not a bug. he is overreacting , x64 build marktext-x64.dmg will also show the broken warning, that is for every single app not codesigned. He just need right click to open the app in local disk, not in DMG mount
Hey, thanks for your feedback. As far as I know is code signing required on M1 devices and manually running
xattr
is the only way bypassing it. Normally there shouldn’t be an “open” option, but I don’t own a macOS device. After a quick research I come to the conclusion thatxattr
after downloading the app orI’m happy to hear other suggestions to fix this.
We decided to not release an Apple M1 (arm64) package for version 0.17.0 because the package is block by macOS without code signing. We’ll consider this issues in future releases but we don’t want to confuse users with “broken binaries”. You can still install the x64 binary or build MarkText for arm64 on macOS and install it yourself bypassing security mechanism.
Edit: Maybe the Homebrew maintainers can get this working because they install MarkText locally?