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

Extendscript currentProject Unknown Exception Error

Participant ,
Aug 26, 2022 Aug 26, 2022

Copy link to clipboard

Copied

In my script, I start by running this code lifted straight from the PPro Github:

 

var viewIDs = app.getProjectViewIDs();
for (var a = 0; a < app.projects.numProjects; a++) {
var currentProject = app.getProjectFromViewID(viewIDs[a]);
if (currentProject) {
if (currentProject.documentID === app.project.documentID) { // We're in the right project!
//here's where my actual script goes, but that doesn't really matter
}
}
}
 
Sometimes it'll work and script runs as intended, but many times it doens't run and when I do a debug I get an "Unknown error exception" on the line:
if (currentProject.documentID === app.project.documentID)
 
I've tried messing around and found that occasionally one of the currentProject will show up like the attached. Any idea why?
 
Thanks!
 
TOPICS
Error or problem , SDK

Views

77

Likes

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

correct answers 1 Correct answer

Adobe Employee , Sep 08, 2022 Sep 08, 2022

Good info! Yes, we're tracking that issue as DVAPR-4237895; work has not yet been scheduled.

Likes

Translate

Translate
Adobe Employee ,
Aug 29, 2022 Aug 29, 2022

Copy link to clipboard

Copied

Any idea why?

 

None! 🙂

I think the key will be in figuring out the 'sometimes', in 'sometimes it'll work'...

Can you provide any necessary project(s), as well as step-by-step instructions that, if followed, reliably reproduce the problem? 

Likes

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
Participant ,
Sep 01, 2022 Sep 01, 2022

Copy link to clipboard

Copied

Ahh, therein lies the issue! It seems completely at random. It's not necessarily one project that produces the error. Somtimes I'll get the error when I'm trying to run the script on a particualr project, then close a few other projects I have open and then, boom, works again. Almost always it'll work on a fresh restart if i'm running the script on the only project I have open.  But, I"ll try to do some sleuthing and report back, thanks!

Likes

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
Adobe Employee ,
Sep 01, 2022 Sep 01, 2022

Copy link to clipboard

Copied

Speculative: Perhaps having multiple views into one project open (e.g., one open project panel, and another panel showing the contents of a bin from within that project) helps confuse PPro?

Likes

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
Participant ,
Sep 06, 2022 Sep 06, 2022

Copy link to clipboard

Copied

Great idea, I'd been toying around with something of that nature. I'm still working on isolating, and it seems running it while having multiples views of one project causes the issue. BUT I've also found that after having , say a bin of one project open in addition to the project panel and then closing the bin view, app.getProjectViewIDs() still returns a viewID associated with that view (presumably, I just know that it returns too many viewIDs for the amount of views open) even though it's no longer open.  Switching between workspaces seems to fix that issue and get PPro to retun the proper amount of viewIDs.

 

Likes

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
Adobe Employee ,
Sep 08, 2022 Sep 08, 2022

Copy link to clipboard

Copied

LATEST

Good info! Yes, we're tracking that issue as DVAPR-4237895; work has not yet been scheduled.

Likes

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