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

unable to execute script at line 5. Expected: ;

New Here ,
Jun 25, 2025 Jun 25, 2025

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?



 

TOPICS
Error or problem , Expressions , How to , Scripting
87
Translate
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 ,
Jun 25, 2025 Jun 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. 
Translate
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 Expert ,
Jun 25, 2025 Jun 25, 2025
LATEST

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
Translate
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