Skip to main content
asakawa syouta
Participant
Sep 19, 2025 7:25 AM UTC
Answered

[UXP for Premiere Pro 25.0+] How to get the active project object? app.project is always undefined.

Hello, I am developing a UXP panel for Premiere Pro (v25.0 or later) with manifest v5.

I am trying to get the active project object, but I am having great difficulty. The object returned by "new Application()" consistently has a null or undefined ".project" property, even when a project is open.

Here is a summary of what I have tried:

  1. require('premierepro').app and require('premierepro').project are both undefined.

  2. new Application() returns an object, but (new Application()).project is undefined.

  3. await new Application() also returns an object, but (await new Application()).project is still undefined.

Here is my minimal test code:

JavaScript
 
// index.js
const Application = require('premierepro').Application;

async function testProjectAccess() {
    console.log("Attempting to get project object...");
    try {
        const app = await new Application();
        console.log("Application instance created:", app);

        if (app.project) {
            console.log("SUCCESS! Project Name:", app.project.name);
        } else {
            console.error("FAILURE: app.project is null or undefined.");
        }
    } catch (e) {
        console.error("An error occurred:", e);
    }
}

// Button click handler
document.getElementById("myButton").onclick = testProjectAccess;

The console always logs "FAILURE: app.project is null or undefined."

What is the correct and official method to get the active project object in Premiere Pro v25+ UXP scripting? Is there a bug in the current API version?

Thank you.

Bruce Bullis
Bruce BullisCorrect answer
Legend
Sep 19, 2025 11:59 AM UTC

> I am trying to get the active project object, but I am having great difficulty.


This code from the 3psample works: 

https://github.com/AdobeDocs/uxp-premiere-pro-samples/blob/4c4fc8b02b6fdee2739605882e9a280c652ef58f/sample-panels/3psample-panel/html/src/eventManager.ts#L49

 

 

1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
Sep 19, 2025 11:59 AM UTC

> I am trying to get the active project object, but I am having great difficulty.


This code from the 3psample works: 

https://github.com/AdobeDocs/uxp-premiere-pro-samples/blob/4c4fc8b02b6fdee2739605882e9a280c652ef58f/sample-panels/3psample-panel/html/src/eventManager.ts#L49

 

 

Translate