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

How to fix an uncaught javascript exception error generated in the internal extendscript code

New Here ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

I have developed a script for after effects and i was testing it in after effects cc 2019 and everything looks perfect however when i tired to run the script from the ScriptUI folder in after effects cc 2018 i got a random error from the internal adobe code.

Just for records, the script was working fine in after effects cc 2018 but for some reason when AE bugged out and i forced it to quit from the task manager i started getting this error

Code Error in Extendscript Debugger

err.PNG

Any help would be really appreciated! Thank you guys.

TOPICS
Scripting

Views

4.0K

Translate

Translate

Report

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
Advocate ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

Do you have a try/catch block in your code that deals with exceptions?

From what I can tell looking at the code is that it throws SyntaxError() function, but there's no catch statement to actually catch it.

Votes

Translate

Translate

Report

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 ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

Thank you Thomas for the tip but the problem is that this abort function belong to Adobe extendscript internal code not the one i wrote.

And it only occurs in After effects CC2018 and below! because the AE2019 is working fine.

Votes

Translate

Translate

Report

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
Advocate ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

What do you mean by "Adobe extendscript internal code"?

Votes

Translate

Translate

Report

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 ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

This is the first 85 lines of the internal code i am talking about:

/*************************************************************************

* ADOBE CONFIDENTIAL

* ___________________

*

*  Copyright 2015 Adobe Systems Incorporated

*  All Rights Reserved.

*

* NOTICE:  All information contained herein is, and remains

* the property of Adobe Systems Incorporated and its suppliers,

* if any.  The intellectual and technical concepts contained

* herein are proprietary to Adobe Systems Incorporated and its

* suppliers and are protected by all applicable intellectual property

* laws, including trade secret and copyright laws.

* Dissemination of this information or reproduction of this material

* is strictly forbidden unless prior written permission is obtained

* from Adobe Systems Incorporated.

**************************************************************************/

/**

* After Effects Host ExtendScript Interface for CCX extensions

*/

AEFTBridge = {

    /**

     * Create and open the host's default document type.

     */

    createDefaultDocument: function() {

        app.newProject();

    },

   

    /**

     * Open a document with the specified file path.

     */

    openDocumentWithPath: function(filepath) {

        app.open(new File(filepath));

    },

    /**

     * Pop the default application 'Open' dialog.

     */

    openDocumentWithUI: function() {

        app.executeCommand(3 /*cmdOpen*/);  // via pro/src/app/egg/indep/Main/EggCmdDefines.h

    }

};

/*************************************************************************

* ADOBE CONFIDENTIAL

* ___________________

*

*  Copyright 2017 Adobe Systems Incorporated

*  All Rights Reserved.

*

* NOTICE:  All information contained herein is, and remains

* the property of Adobe Systems Incorporated and its suppliers,

* if any.  The intellectual and technical concepts contained

* herein are proprietary to Adobe Systems Incorporated and its

* suppliers and are protected by all applicable intellectual property

* laws, including trade secret and copyright laws.

* Dissemination of this information or reproduction of this material

* is strictly forbidden unless prior written permission is obtained

* from Adobe Systems Incorporated.

**************************************************************************/

/**

* Shorthand for converting char ID to type ID.

*

* @return Type ID for provided char ID.

*/

function cTID(key) {

return charIDToTypeID(key);

}

/**

* Shorthand for converting string ID to type ID.

*

* @return Type ID for provided string ID.

*/

function sTID(key) {

return stringIDToTypeID(key);

}

/**

* Get a named property out of an ActionDescriptor.

*

* @return The specified property from the provided descriptor, or undefined if not available.

*/

Note that i didnt write anything from this code it was automatically generated upon error generation.

Votes

Translate

Translate

Report

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 ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

In your screenshot I can see that the code that throws the error has something to do with parsing JSON.

Are you parsing JSON data in your app and if so, did you make sure to add your own implementation of a json parser?

See this tutorial for details:

https://aescripts.com/learn/After-Effects-Scripting-JSON-Tutorial/

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

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 ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

Thanks Mathias! I i have fixed this issue by rechecking my json file which is the responsible for this error! there was a strange bits of characters like so \ufeff that made the parse to fail (the program coudlnt figure out what type of escaping is that) and i dont know who added that lol so after i deleted that i got everything working fine

Votes

Translate

Translate

Report

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 09, 2020 Jun 09, 2020

Copy link to clipboard

Copied

LATEST

hi

i'm facing the same problem with my json, trying to parse it in jsx.

the json is valid, but for some reason i get an exception (in ExtendScript):

Error: Uncaught JavaScript exception: JSON.parse

 

here is the json:

[{"proxyData":{"proxySourceFileName":"0000216F.mp4","proxyFormatId":557,"proxySuAlias":[],"proxySourceFilePath":"\\dev-lala\dp1\video"},"hrData":{"originalSuId":23,"isPathChanged":false,"originalSourceFileName":"00002163.mxf","originalSuAlias":"m:\hires","originalSourceFilePath":"m:\hires","originalFormatId":"599"},"Id":"4688"}]

 

any suggetions ?

thanks in advance

Votes

Translate

Translate

Report

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