Pencil2D arm64 build is damaged
Issue Summary
Pencil 2d will not open and the prompt will inform me that it is damaged and needs to be deleted.
Actual Results
I will keep getting the Pencil 2d is damaged, it should ask me to verify that I want to open the application
Expected Results
it should ask me to verify that I want to open the application.
Video or Image Reference
Steps to reproduce
I select the nightly build link that is listed on the Pencil@D website and then It will download. I will then go to the download file and unzip it. once it unzips I will then select the Pencil2D icon and a pop up will appear telling me that the file is damaged and needs to be thrown in the trash.
System Information
- Pencil2D Version: all the nightly builds from April through June 6th
- Operating System: MacOS Sonoma 14.5
- RAM Size: 8gb Mac Mini and 32gb Intel macbook pro
- Graphics Tablet: XP-Pen Star G640
Are you choosing the "macOS (Intel)" or the "macOS (Apple Silicon)" option when downloading from the nightly build page?
I am not able to reproduce this behavior, the Intel binary works fine for me. I am however running Monterey instead of Sonoma.
Trying to open a Silicon .app on a Intel macbook should not result in that error message though.
I can confirm that the Apple silicon build does not work and output the "Application is damaged" popup.
Digging into the problem it looks like a signing issue. When inspect the arm64 .app on my silicon mac with codesign using verbose flags like so: codesign -vvvv --strict --deep ./Pencil2d.app, I get the following.
"code has no resources but signature indicates they must be present"
and when you dig into the frameworks themselves, for example QtCore.framework, we see:
"QtCore.framework: invalid signature (code or signature have been modified) In architecture: arm64"
Where as with the intel binary I get:
"code object is not signed at all" In architecture: x86_64
Which is what I would have expected for both.
So for some reason the signing process is not the same for the arm application...
I still haven't figured out why this is necessary for the arm64 build but re-signing the application works.
> codesign -fs "<my self signed certificate>" ./Pencil2d.app/Contents/Frameworks/*
> codesign -fs "<my self signed certificate>" ./Pencil2d.app/Contents/PlugIns/*/*
> codesign -fs "<my self signed certificate>" ./Pencil2d.app/MacOS/plugins/*
> codesign -fs "<my self signed certificate>" ./Pencil2d.app
you can then verify the integrity of the application like so (which is not necessary)
codesign --verify --verbose ./Pencil2d.app
The result should be something like:
> valid on disk
> satisfies its Designated Requirement
If you double-click on the application now, it should display the normal "can't verify developer, would you like to open anyway" where clicking "ok" opens the app.
@MrStevns Would I type this command in the terminal? I am sorry but I do not know how I am supposed to input this if possible are you able to list the steps for me? It is not a priority as I am able to animate on an older verison of Pencil2d that I have that is working correctly. I will also link a picture and a link for the intel Macbook pro that I have that is not able to download the Pencil 2d application.
@MrStevns Follow Up: it is working on my Macbook Pro now my apologies
@MrStevns Would I type this command in the terminal? I am sorry but I do not know how I am supposed to input this if possible are you able to list the steps for me? It is not a priority as I am able to animate on an older verison of Pencil2d that I have that is working correctly. I will also link a picture and a link for the intel Macbook pro that I have that is not able to download the Pencil 2d application.
Ah sorry, yes that would have to be inputted into the terminal, but actually what I wrote was meant as information for the other contributors not necessarily for you to do yourself 😅
Good to see that you got the intel version working but as I mentioned earlier, something strange is indeed going on with the Silicon app file, so there's still something for us to look into.
I can confirm the results of @MrStevns
On my Intel MacBook Pro 2017,
- Pencil2D x86_64 app: works as expected
- Pencil2D arm64 app: error message "You can’t open the application “Pencil2D” because this application is not supported on this Mac."
On my Apple silicon MacBook Air,
- Pencil2D x86_64: works as expected
- Pencil2D arm64 app: error message "Pencil2D” is damaged and can’t be opened. You should move it to the Trash."
@chchwy Hey do we have an update on when this is going to be fixed? I havent been able to use a current version of pencil2d in a long time on my mac its a struggle since there are other bugs on it that need to be fixed.
@chchwy Hey do we have an update on when this is going to be fixed? I havent been able to use a current version of pencil2d in a long time on my mac its a struggle since there are other bugs on it that need to be fixed.
Hey @INKYSANIMATION I haven't got a chance to look into this issue. probably will take a look during the Christmas break. Do you have any issue using the x86_64 version? It should work on an Apple silicon Mac.
Both Qt5 & Qt6 arm64 builds are broken "Pencil2D is damaged and can't be opened." as I just downloaded and checked the 25th Jan 2025 nightly build.