Copy link to clipboard
Copied
Hi Everyone,
I'm building a custom CEP panel for Adobe After Effects 2025 (v25.3) and facing an issue when executing .jsx scripts via csInterface.evalScript().
On the first run after launching After Effects, when I click a button that triggers a script from the Scripts/ folder, I get the following error: Unable to execute script at line 5. Expected: ;
Strangely, after dismissing the error popup, the script still runs correctly. And on all subsequent clicks (until AE is restarted), the script executes with no error.
Why does this error only occur on the first execution after launching After Effects?
Copy link to clipboard
Copied
Verified that all individual scripts are syntactically correct — no errors when run via File > Scripts > Run script
Verified that each button works independently.
Scripts work perfectly when run outside the CEP panel.
Copy link to clipboard
Copied
Have you tried adding some debug output to the console like
- a messages right before your evalScript() with the code you are about to execute and
- a message when the code execution fiinished
Then you should be able to check if it is actually the code you eval, which causes the issue or if there is some other code executed (for whatever reason) which causes the error. If you output the code in the console before evaluating it, you can also check if the code itself looks correct.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now