Skip to main content
Participant
June 25, 2025
Question

unable to execute script at line 5. Expected: ;

  • June 25, 2025
  • 2 replies
  • 199 views

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?



 

2 replies

Mathias Moehl
Community Expert
Community Expert
June 25, 2025

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.


Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Participant
June 25, 2025

What I've tested:

  • 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.

  • Once After Effects is running and the error has appeared once, it doesn't appear again even if I delete all the components and script in the CEP panel.