-
Notifications
You must be signed in to change notification settings - Fork 133
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
[CircleCI] Finder got an error: AppleEvent timed out. (-1712) #145
Comments
Hi @ogerardin! |
It fails when codesigning the app 🤷♂️ |
I did what you suggested (i'm moving this project from Java 8...) now it seems to go further :) But then I get an error "Finder got an error: AppleEvent timed out. (-1712)" when executing AppleScript https://app.circleci.com/pipelines/github/ogerardin/xpman/36/workflows/8c7812ef-1ffa-4cb7-bf39-2c74eacbdf98/jobs/87?invite=true#step-103-2549 I've noticed that the CircleCI macOS executor isn't very fast, maybe you could increase the timeout ? It seems to be 2 minutes by default, and that might not be enough for this operation. (Also, even though there is an error, the build is considered successful...) |
Wow!!! It was hard to find a solution for this problem, but I finally managed to reproduce and fix it. After trying several options, I finally found this. As far as I can understand, Run next commands before packaging fix the problem: epochdate=$(($(date +'%s * 1000 + %-N / 1000000')))
tcc_service_appleevents="replace into access (service,client,client_type,auth_value,auth_reason,auth_version,indirect_object_identifier_type,indirect_object_identifier,flags,last_modified) values (\"kTCCServiceAppleEvents\",\"/usr/sbin/sshd\",1,2,4,1,0,\"com.apple.finder\",0,$epochdate);"
sudo sqlite3 "/Users/distiller/Library/Application Support/com.apple.TCC/TCC.db" "$tcc_service_appleevents"
And your Circle CI config file has to look like this: build-mac:
macos:
xcode: 13.3.0
steps:
- run:
name: Fix Finder got an error - AppleEvent timed out. (-1712)
command: |
epochdate=$(($(date +'%s * 1000 + %-N / 1000000')))
tcc_service_appleevents="replace into access (service,client,client_type,auth_value,auth_reason,auth_version,indirect_object_identifier_type,indirect_object_identifier,flags,last_modified) values (\"kTCCServiceAppleEvents\",\"/usr/sbin/sshd\",1,2,4,1,0,\"com.apple.finder\",0,$epochdate);"
sudo sqlite3 "/Users/distiller/Library/Application Support/com.apple.TCC/TCC.db" "$tcc_service_appleevents"
- run:
name: Install Maven
command: brew install maven
- checkout
- run:
name: Build
command: |
/usr/libexec/java_home -V
export JAVA_HOME=`/usr/libexec/java_home -v 11`
mvn -v
mvn -B -DskipTests clean package |
I forgot it! ... the execution of the AppleScript by JavaPackager is only for customizing the generated DMG, hence the process continues even if the execution of this script fails. I hope it helps! |
Thanks for putting in all the effort! It does solve the problem. It was not an actual timeout problem or a bug in the plugin :) Maybe you should put this in the Mac section of the doc. |
I'm submitting a…
Short description of the issue/suggestion:
When running on CircleCI with macOS executor, DMG image generation fails with message "bundle format unrecognized, invalid, or unsuitable"
Steps to reproduce the issue/enhancement:
What is the expected behavior?
DMG file is generated
What is the current behavior?
Failure during DMG generation with error described above
Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?
See example build: https://app.circleci.com/pipelines/github/ogerardin/xpman/24/workflows/6dca15e1-1d24-47ca-9c06-29caa2c8ba9d/jobs/58?invite=true#step-103-2530
Please tell us about your environment:
Other information (e.g. related issues, suggestions how to fix, links for us to have context)
I've tested with XCode images 13.2.1 and 13.3.0.
CircleCI macOS images: https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
DMG generation works fine on my own Mac (macOS 12.2.1).
The text was updated successfully, but these errors were encountered: