Modified:
Mar 10, 2020
Created:
Mar 3, 2020
Views:
4208
Author:
PH

Adobe ExtendScript "Cannot Execute Script" error

If you are using Adobe Extend Script Debugger to debug your ProSeleect Production scripts and you get the error "Cannot execute script in target engine 'main'"  (see below) then follow these instructions for a solution.

Solution 1

Restart your computer. The error is due to an incorrect timeout in one of the internal settings and restarting your computer should reset the system uptime to zero to bypass the problem (for a while).

Solution 2

Edit the ExtendScript Toolkit application file using the steps below (from this Adobe Support web page):

  1. Open the file(Mac): “/Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/SharedSupport/Required/cdic/11BTBackend.jsx”
  2. Search for the value: 604800000 (line reads bt.timeout = 604800000)
  3. Replace that value with 604800 and save
  4. Quit ExtendScript Toolkit and relaunch.

Hints for above in simpler terms...

1. In the Finder, navigate to find file "ExtendScript Toolkit.app" in your Applications -> Adobe ExtendScript Toolkit CC folder.

2. Right-click on the file and select "Show Package Contents". This will show a folder called "Contents".

3. Inside this folder, go to SharedSupport -> Required -> cdic

4. Open the file 11BTBackend.jsx in a text editor such a TextEdit.app or BBedit.app or even ExtendScript Toolkit. You may need to drop the file onto your chosen app's icon to open it in that app. Double-clicking on it will likely open it in the Extendscript debugger which is OK provided you have closed the Error dialog first.

5. Use the search function (usually CMD-F in most apps) to find the number "604800000".

6. Delete the last three zeros so the number becomes 604800.

7. Save the file.

8. If still running, Quit ExtendScript Toolkit.app.

9. Launch it again from within ProSelect by holding down the SHIFT-key when clicking on the Make Hi-Res images button  (as covered in this article:  Debugging Production Problems)

Caution: if you have multiple versions of Adobe ExtendScript Toolkit installer on your computer make sure that you are editing the same one that opened when started the debugging process.

Solution 3

Install Visual Studio Code and use that instead. See this Article: Debugging Photoshop Scripts with Photoshop CC 2020 or OSX Catalina 


KnowledgeBase Article: Adobe ExtendScript "Cannot Execute Script" error