Skip to content
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

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

Open
Gooseus opened this issue Jan 25, 2024 · 23 comments
Open

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

Gooseus opened this issue Jan 25, 2024 · 23 comments
Labels

Comments

@Gooseus
Copy link

Gooseus commented Jan 25, 2024

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.

@inlife
Copy link
Owner

inlife commented Jan 26, 2024

Could you share the aerender log related to that render job?

(it should be in this folder: /var/folders/gm/hdxp66557mz7dn415qlccnfw0000gn/T/nexrender/, with job uid)

@pvandevelde34
Copy link

pvandevelde34 commented Feb 8, 2024

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

@inlife
Copy link
Owner

inlife commented Feb 8, 2024

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?

@pvandevelde34
Copy link

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

@pvandevelde34
Copy link

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

@inlife
Copy link
Owner

inlife commented Feb 8, 2024

@pvandevelde34
Copy link

Hello,
Thanks for the binary but this does not solve the issue. Same Error.

@inlife
Copy link
Owner

inlife commented Feb 8, 2024

I see. Another option is getting the Nodejs installed locally and installing nexrender via NPM. That way, you would have a natively running Node.js, which could solve the issue.

@pvandevelde34
Copy link

pvandevelde34 commented Feb 8, 2024

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

@MuazAshraf
Copy link

Hi, I have been trying to solve this error for many days but have not been successful. I am using aerender also but it is working correctly This is the error:
starting nexrender-cli
checking After Effects command line renderer patch...
command line patch already is in place
[RIGtcE9g_4Mqg6o-ndcM-] setting up job...
[RIGtcE9g_4Mqg6o-ndcM-] working directory is: /var/folders/t_/tlb6h5cj2zxbwh1bcsgm4bd80000gn/T/nexrender/RIGtcE9g_4Mqg6o-ndcM-
[RIGtcE9g_4Mqg6o-ndcM-] applying predownload actions...
[RIGtcE9g_4Mqg6o-ndcM-] downloading assets...
[RIGtcE9g_4Mqg6o-ndcM-] applying postdownload actions...
[RIGtcE9g_4Mqg6o-ndcM-] applying prerender actions...
[RIGtcE9g_4Mqg6o-ndcM-] running script assemble...
[RIGtcE9g_4Mqg6o-ndcM-] rendering job...
[RIGtcE9g_4Mqg6o-ndcM-] setting aerender log path to project folder: /var/folders/t_/tlb6h5cj2zxbwh1bcsgm4bd80000gn/T/nexrender/RIGtcE9g_4Mqg6o-ndcM-/aerender.log
catching the error internally
[RIGtcE9g_4Mqg6o-ndcM-] cleaning up...

job rendering failed
Error: aerender.exe failed to render the output into the file due to an unknown reason
at ChildProcess. (/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. (node:internal/child_process:449:11)
at Socket.emit (node:events:537:28)
at Pipe. (node:net:747:14)

@inlife
Copy link
Owner

inlife commented Feb 25, 2024

@MuazAshraf could you please provide logs coming from that file: /var/folders/t_/tlb6h5cj2zxbwh1bcsgm4bd80000gn/T/nexrender/RIGtcE9g_4Mqg6o-ndcM-/aerender.log

@wmwccdd
Copy link

wmwccdd commented Mar 8, 2024

I see. Another option is getting the Nodejs installed locally and installing nexrender via NPM. That way, you would have a natively running Node.js, which could solve the issue.

Just as a side note for anyone else running into this issue like I was earlier today, doing this solved it for me.

@stepan-romankov
Copy link

@MuazAshraf could you please provide logs coming from that file: /var/folders/t_/tlb6h5cj2zxbwh1bcsgm4bd80000gn/T/nexrender/RIGtcE9g_4Mqg6o-ndcM-/aerender.log

I have the same issue and log file is totally missing. It's not been created.

@tommycotter
Copy link

I'm seeing this issue as well. Tried your suggestion @wmwccdd but still getting the same error.

The job was getting accepted, also passed to the worker from the server, but when the rendering process starts, it says some tmp/result.mp4 file is not found. Not sure what is causing this issue.

JSON Request --> http://localhost:3000/api/v1/jobs

2024-04-05 at 14 20 35

2024-04-05 at 14 21 42

@inlife
Copy link
Owner

inlife commented Apr 15, 2024

@tommycotter please provide contents of this log file:
image

@tommycotter
Copy link

Hey @inlife I think it got removed when I closed the server. Don't have anything here. But I remember the file being empty.
2024-04-16 at 18 59 07

@torresf
Copy link

torresf commented May 21, 2024

Hey !
I have the same error after upgrading to After Effects v24.4 on macOS Sonoma 14.5.
When aerender is spawned by nexrender, the rendering process ends immediatly. The job log file is empty.
By debugging I discovered that the exit code on instance close is null.

If I copy the aerender process command and add quotes around some parameters it runs fine.

@inlife Do you have any idea to get more error logs from the spawned process ?

@inlife
Copy link
Owner

inlife commented May 21, 2024

@torresf could you share your aeprocess command line both before and after adding quotes?

@torresf
Copy link

torresf commented May 21, 2024

@torresf could you share your aeprocess command line both before and after adding quotes?

Of course, here is the log :

[nYsEfcbNSwYgTfVgUsln-] spawning aerender process: /Applications/Adobe After Effects 2024/aerender -project /var/folders/7p/mqjfrnb967n28vzl_9p9j0_00000gp/T/nexrender/nYsEfcbNSwYgTfVgUsln-/hfqn6xk6z9h..aep -comp LANDSCAPE_COMP -output /var/folders/7p/mqjfrnb967n28vzl_9p9j0_00000gp/T/nexrender/nYsEfcbNSwYgTfVgUsln-/result.mp4 -RStemplate Auguste Preview -r /var/folders/7p/mqjfrnb967n28vzl_9p9j0_00000gp/T/nexrender/nYsEfcbNSwYgTfVgUsln-/nexrender-nYsEfcbNSwYgTfVgUsln--script.jsx

And here is the working command line :

"/Applications/Adobe After Effects 2024/aerender" -project /var/folders/7p/mqjfrnb967n28vzl_9p9j0_00000gp/T/nexrender/nYsEfcbNSwYgTfVgUsln-/hfqn6xk6z9h..aep -comp LANDSCAPE_COMP -output /var/folders/7p/mqjfrnb967n28vzl_9p9j0_00000gp/T/nexrender/nYsEfcbNSwYgTfVgUsln-/result.mp4 -RStemplate "Auguste Preview" -r /var/folders/7p/mqjfrnb967n28vzl_9p9j0_00000gp/T/nexrender/nYsEfcbNSwYgTfVgUsln-/nexrender-nYsEfcbNSwYgTfVgUsln--script.jsx

Could it be a permission problem ?

@inlife
Copy link
Owner

inlife commented May 21, 2024

It could be -RStemplate problem, at least judging by the generated line

@torresf
Copy link

torresf commented May 21, 2024

I tried without the -RStemplate option but I get the same result.
Another info that might be useful : I have the same setup on Windows and it runs correctly with After Effects v24.

My guess is that it could come from node not having the right permission to run aerender as a child process on macOS or something like that.

@torresf
Copy link

torresf commented May 22, 2024

I fixed it 🎉
I needed to upgrade Node from v14 to v20, now everything works fine on latest macOS and After Effects version !

@inlife
Copy link
Owner

inlife commented May 22, 2024

Oh, great. Glad to hear that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants