nexrender: nexrender-cli-macos failing to render for "an unknown reason"

Describe the bug I’m trying to do a test nexrender on a simple project with a text layer.

{
  "template": {
      "src": "file:///Users/gooseus/nexrender-pipeline/test-nexrender.aep",
      "composition": "TestComp",
      "outputModule": "H.264 - Match Render Settings - 15 Mbps",
      "outputExt": "mp4",
      "settingsTemplate": "Best Settings"
  },
  "assets": [
    {
      "type": "data",
      "layerName": "PLACEHOLDER",
      "property": "Source Text",
      "value": "Gooseus"
    }
  ]
}

But am getting an error without a lot of information, even with the --debug flag:

$ NEXRENDER_ENABLE_AELOG_LEGACY_TEMP_FOLDER=TRUE ./nexrender-cli-macos -f myjob.json --debug --skip-cleanup
> starting nexrender-cli
using automatically determined directory of After Effects installation:
 - /Applications/Adobe After Effects 2024/aerender
checking After Effects command line renderer patch...
command line patch already is in place
[_v5CsAHfy9qUL2u8YoAj9] setting up job...
[_v5CsAHfy9qUL2u8YoAj9] working directory is: /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/_v5CsAHfy9qUL2u8YoAj9
[_v5CsAHfy9qUL2u8YoAj9] applying predownload actions...
[_v5CsAHfy9qUL2u8YoAj9] downloading assets...
[_v5CsAHfy9qUL2u8YoAj9] applying postdownload actions...
[_v5CsAHfy9qUL2u8YoAj9] applying prerender actions...
[_v5CsAHfy9qUL2u8YoAj9] running script assemble...
[_v5CsAHfy9qUL2u8YoAj9] rendering job...
[_v5CsAHfy9qUL2u8YoAj9] setting aerender log path to temp folder: /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/aerender-_v5CsAHfy9qUL2u8YoAj9.log
[_v5CsAHfy9qUL2u8YoAj9] spawning aerender process: /Applications/Adobe After Effects 2024/aerender -project /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/_v5CsAHfy9qUL2u8YoAj9/test-nexrender.aep -comp TestComp -output /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/_v5CsAHfy9qUL2u8YoAj9/result.mp4 -OMtemplate H.264 - Match Render Settings - 15 Mbps -RStemplate Best Settings -r /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/_v5CsAHfy9qUL2u8YoAj9/nexrender-_v5CsAHfy9qUL2u8YoAj9-script.jsx
[_v5CsAHfy9qUL2u8YoAj9] skipping the clean up...
> job rendering failed
Error: aerender.exe failed to render the output into the file due to an unknown reason
    at ChildProcess.<anonymous> (/snapshot/nexrender/packages/nexrender-core/src/tasks/render.js)
    at ChildProcess.emit (node:events:537:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:537:28)
    at Pipe.<anonymous> (node:net:747:14)

If I copy the aerender command and add escapes for spaces and quotes for the options it works exactly how I was expecting with the desired output:

$ /Applications/Adobe\ After\ Effects\ 2024/aerender -project /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/xHJUmaaYWXJJE2t9hff-C/test-nexrender.aep -comp TestComp -output /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/xHJUmaaYWXJJE2t9hff-C/result.mp4 -OMtemplate "H.264 - Match Render Settings - 15 Mbps" -RStemplate "Best Settings" -r /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/xHJUmaaYWXJJE2t9hff-C/nexrender-xHJUmaaYWXJJE2t9hff-C-script.jsx
aerender version 24.1x78
PROGRESS: Launching After Effects...
Running Script: /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/xHJUmaaYWXJJE2t9hff-C/nexrender-xHJUmaaYWXJJE2t9hff-C-script.jsx
PROGRESS: Adding specified comp to Render Queue
PROGRESS:  1/25/24 2:01:26 PM EST: Starting composition “TestComp”.
...

Information about environment

  • Which version of nexrender are you using?

nexrender-cli-macos --> 1.46.9

  • What kind of the setup do you have?

CLI

  • Are you using pre-built binaries or globally installed npm packages?

pre-built macos binaries

  • Which kind (and version) of operating system you are running it in?

Apple M1 running macOS 13.5.2 (22G91)

  • Additional information

Running node 18.18.1 from within a vscode zsh terminal

Expected behavior I expected the nexrender CLI command to spawn the aerender command and run exactly how it did when I manually ran the command with the generated jsx temp folder assets.

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I manage to find out a solution. If I use this binary /opt/homebrew/bin/nexrender-cli it does work

Hi again, Strange thing here if I use this binary : /opt/homebrew/bin/nexrender-cli it works …

Yes, I will test this and give you proper feedbacks. Thanks so much. Phil

It could be indeed related to macOS binaries being built for x64. Let me try uploading custom-built ARM binaries here later today to verify that this is the case. Would you be able to test that?

Hello, I’m having the same issue with Mac mini M2. No log is generated even skipping cleanup parameter. MACOS : tried with the latest (Somata) and previous (Ventura) I have tried with the latest release (1.48.4) and previous one (1.48.3), same issue. Seems that there is an issue while forking the aerender process. If I run the spawn process manually everything goes well.

 ([d6TJ10yLaZOLniTjOHq0i] spawning aerender process: /Applications/Adobe After Effects 2024/aerender -project /Users/administrator/meteogenerator/public/d6TJ10yLaZOLniTjOHq0i/VIA-METEO-V1-NEX-24.aep -comp VIA-METEO_FINAL_1 -output /Users/a  
  dministrator/meteogenerator/public/d6TJ10yLaZOLniTjOHq0i/result.mov -OMtemplate PRORESLT -r /Users/administrator/meteogenerator/public/d6TJ10yLaZOLniTjOHq0i/nexrender-d6TJ10yLaZOLniTjOHq0i-script.jsx -mfr ON 90                             

After Effects is the latest (24.1). I spent hours trying to find the issue without succeed. For information, on the first launch of nexrender-cli-macos I had a “Bad CPU” warning, after rosetta 2 installation the message vanished.

Error message : 
[chNSevvz_PrLHLaER966C] applying predownload actions...                                                 
  [chNSevvz_PrLHLaER966C] downloading assets...                                                           
  [chNSevvz_PrLHLaER966C] applying postdownload actions...                                                
  [chNSevvz_PrLHLaER966C] applying prerender actions...                                                   
  [chNSevvz_PrLHLaER966C] running script assemble...                                                      
  [chNSevvz_PrLHLaER966C] rendering job...                                                                
  [chNSevvz_PrLHLaER966C] -- D E P R E C A T I O N: --                                                    
                                                                                                          
  nexrender is changing the default aerender log path to the project folder.                              
  This is done to streamline the log management and enable efficient log cleanup.                         
                                                                                                          
  If you want to keep the old behavior and mute this message, please set the environment variable NEXREN  
  DER_ENABLE_AELOG_LEGACY_TEMP_FOLDER to true.                                                            
  If you want to switch to the new behavior, please set the environment variable NEXRENDER_ENABLE_AELOG_  
  PROJECT_FOLDER to true.                                                                                 
                                                                                                          
  Right now, the old behavior is still the default, but this will change in the next minor releases.      
  Estimated date of change to the new behavior: 2023-06-01.                                               
                                                                                                          
  catching the error internally                                                                           
  [chNSevvz_PrLHLaER966C] cleaning up...                                                                  
                                                                                                          
                                                                                                          
  Error Output:                                                                                           
  ================                                                                                        
  > job rendering failed                                                                                  
  Error: aerender.exe failed to render the output into the file due to an unknown reason                  
      at ChildProcess.<anonymous> (/snapshot/nexrender/packages/nexrender-core/src/tasks/render.js)       
      at ChildProcess.emit (node:events:537:28)                                                           
      at maybeClose (node:internal/child_process:1091:16)                                                 
      at Socket.<anonymous> (node:internal/child_process:449:11)                                          
      at Socket.emit (node:events:537:28)                                                                 
      at Pipe.<anonymous> (node:net:747:14) 

Had a try with setting the export : NEXRENDER_ENABLE_AELOG_
PROJECT_FOLDER to true. Same behaviour

Thanks for your help. Phil