• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

More aerender woes: 22.6 on M Cannot connect to a running instance of AE, fails with -1712 (timeout)

New Here ,
Oct 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

 

I am trying to automate the rendering of a very large number of projects (5-15k), however on mac, whenever I use the -reuse flag (since restarting aerender every time becomes untenably slow, where %95 of per project render time is aerender opening and closing aerendercore/whatever render engine is being used). 

 

Trying to launch with a simple test project from terminal:

 

% ./aerender -project ~/Desktop/test.aep -comp Comp 1 -output ~/Desktop/sap_out/out\[####\].tiff -reuse

aerender version 22.6x64

aerender ERROR -1712: AESend failed to send apple event at line 939

 

Where test.aep is just a comp with a single solid layer, although that doesn't matter since it obviously fails way before it ever connects to AE. I've made sure that an instance of AE is running (I've tried both render engine and normal), I've enabled automation of AE in privacy settings (and full disk access, just in case), and nevertheless the problem persists. 

This error appears to be propagating from a call to connect with applescript, since the "-1712" (connection timeout) is an error I can reproduce using osascript by trying to connect to aerendercore directly (which I suspect is not officially supported behaviour). 

 

I have tried downgrading to the version 22.5, but that fails with an older syntax error invalid flag: -reuse bug. 

 

Any help  as promptly as possible would be GREATLY appreciated! I'm currently resorting to rendering without the reuse flag which is ~20x slower than it should be.

SYSTEM:

MacBook Pro 16 M1 Pro 10 Core | Mac Mini M1 Pro 6 Core

Montery 12.6

 

TOPICS
Performance , Scripting

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Oct 27, 2022 Oct 27, 2022

Hi @arise_fair_sun,

Thanks for reaching out directly. For the benefit of anyone else who is encountering this same error with the "-reuse" flag for aerender in After Effects 22.6 or later, try the following steps to clear existing permission for Terminal. Since the command required admin rights, ensure your user account has admin rights and that your system is backed up beforehand.

  1. Close After Effects if running
  2. Run this command in Terminal:
    sudo tccutil reset AppleEvents com.apple.terminal​
  3. Re
...

Votes

Translate

Translate
Adobe Employee ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

Hi @arise_fair_sun,

Sorry to see you're experiencing this issue in After Effects 22.6. A fix went into that version for using the -reuse flag with aerender, but there is still a specific system permission required in order to use it. The permission required is in the System Prefs under Security & Privacy > Automation; be sure that "Adobe After Effects 2022.app" is checked under Terminal.

 

You should be asked to grant this permission the first time you attempt to use the -reuse flag. Due to the permission dialog, that first invocation of aerender will fail, but all following renders should be able to successfully use the running instance of After Effects via -reuse. If you denied it, you should be able to re-enable it in Security & Privacy > Automation.

 

Cheers,

- John, After Effects Engineering Team 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

Yeah, I've confirmed this setting is enabled. I also just tried the newest beta to see if maybe anything has changed. Unfortunately, the error persists. 

Screen Shot 2022-10-18 at 10.44.21 PM.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

Hi @arise_fair_sun,

Thanks for reaching out directly. For the benefit of anyone else who is encountering this same error with the "-reuse" flag for aerender in After Effects 22.6 or later, try the following steps to clear existing permission for Terminal. Since the command required admin rights, ensure your user account has admin rights and that your system is backed up beforehand.

  1. Close After Effects if running
  2. Run this command in Terminal:
    sudo tccutil reset AppleEvents com.apple.terminal​
  3. Reopen After Effects.
  4. Run aerender in the Terminal using the "-reuse" flag. This will prompt for permission and will likely fail unless you are extremely fast at confirming in the dialog.

 

After these steps, the "-reuse" flag for aerender should work on all subsequent executions.

 

Please let us know if you continue to experience the Apple Event errors with "-reuse" after running this command.

 

Cheers,

- John, After Effects Engineering Team 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 27, 2024 Jan 27, 2024

Copy link to clipboard

Copied

I'm afraid this no longer works in MacOS Sonoma. Is there a way to get this working again?
I cannot get Terminal to show up in the "Automation" tab of the permissions. The result is that when I try to use the "-reuse" flag in AErender it gives me this error again:

aerender ERROR -1712: AESend failed to send apple event at line 1054

Edit:
The strange thing is that it worked once just now (it prompted me to give permission) and it now shows up in the Automation tab. However, after restarting the terminal and AE it is back to giving the same error, even though Terminal is still showing up as enabled in the Automation tab. Disabling and re-enabling did not work and neither does running the command again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

Hi @renenijman,

I'm sorry to see you're experiencing this issue. I was just able to use the "-reuse" tag with aerender in AE 24.1 on macOS Sonoma (14.1.2). Does After Effects 2024 show up under the Terminal in System Settings > Privacy & Security > Automation?

 

- John, After Effects Engineering Team 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

Thank you for your response, John. The issue indeed seems to have fixed itself after trying it multiple times. No idea why it did not work initially, but all good now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

Is this true for any use of Applescript with After Effects? Before Sonoma I used Applescript with AE 2024 to DoScriptFile. It's no longer working. After Effects has no entry in System Settings > Privacy & Security > Automation. All osascript / Applescript usages with AE 2024 result in `34:103: execution error: Adobe After Effects 2024 got an error: AppleEvent timed out. (-1712)`

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 02, 2024 Oct 02, 2024

Copy link to clipboard

Copied

I'm also experiencing the issue of Applescript not working for Ae2024 in one of my products (BlenderAe), but working fine for Ae2023 even though all the preferences and settings seem identical (including allowing Full Disk Access)... any solution would be greatly appreciated!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 11, 2024 Oct 11, 2024

Copy link to clipboard

Copied

Hi @davemyron , just wondering if you managed to find a solution to this? I've opened a separate discussion on this topic and still haven't found a solution... https://community.adobe.com/t5/after-effects-discussions/macos-command-line-applescript-doscriptfile...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 11, 2024 Oct 11, 2024

Copy link to clipboard

Copied

LATEST

I tried reaching Adobe Support and they responded with "we don't have enough training; try the community forums" (one of the craziest responses I've seen from a customer care organization - actual response below)

 

The support response verbatim:

"This email is regarding your open case with us. We checked the script issue on our end. It seems like the older scripts that worked on Ventura is no longer available on Sonoma on the current version. 

The workaround would be to use the 23 version. Scripting is something that is we are not trained on so the best we can suggest you is to reach out to community forum regarding this and share this with our team there. "
 
However, I did find a workaround that worked for me:  Instead of using AppleScript, use JavaScript (still using osascript). So something like this works: `osascript -l JavaScript -e 'ae = Application("Adobe After Effects 2024"); ae.activate(); ae.doscriptfile("myscript.jsx");'
 
(The capitalization of the language `-l` flag is important)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines