Help with the new UXP createInsertProjectItemAction() method. "Script Action failed to execute"
Hi. I've been trying to use the new UXP createInsertProjectItemAction() method to insert a clip into my main sequence's timeline, but I can't seem to get it to work. I'm getting the following error ("Script Action failed to execute."):

Here's the Adobe documentation page for that method.
Here's a sample with all of the required parameters:
SequenceEditor.createInsertProjectItemAction(projectItem, TickTime, videoTrackIndex, audioTrackIndex, limitShift);
Below is the entirety of my code. The error happens at line 19, and execution of the script stops before it even gets to the executeAction() function (line 29), so I don't think that's the problem. For context, my Premiere project just consists of a sequence called "Main Sequence" and a video clip called "Iceberg.MOV".
1 const ppro = require("premierepro");
2
3 async function insertItem() {
4 try {
5 const project = await ppro.Project.getActiveProject();
6 const rootItem = await project.getRootItem();
7 const items = await rootItem.getItems();
8 const mainSequence = await project.getActiveSequence();
9 const editor = await ppro.SequenceEditor.getEditor(mainSequence);
10 const insertionTime = await ppro.TickTime.createWithSeconds(2);
11 var itemToInsert;
12
13 // Specify the item you want to insert into the timeline
14 items.forEach(element => {
15 if (element.name == "Iceberg.MOV") itemToInsert = element;
16 });
17
18 // Create the insertion Action
19 actInsertProjItem = await editor.createInsertProjectItemAction(itemToInsert, insertionTime, 1, 1, false);
20
21 // Execute the insertion Action
22 executeAction(project, actInsertProjItem);
23
24 } catch (err) {
25 console.error(err);
26 }
27 }
28
29 function executeAction(project, theAction) {
30 try {
31 project.lockedAccess(() => {
32 project.executeTransaction ((compoundAction) => {
33 compoundAction.addAction(theAction);
34 })
35 });
36 } catch (err) {
37 console.error(err);
38 }
39 }
40
41 document.querySelector("#btnPopulate").addEventListener("click", insertItem);
Things I've already investigated:
- Checked to make sure I'm running the latest version of the Premiere Pro beta app (25.3.0 build 33).
- My seqEditor variable is of the right type (SequenceEditor object).
- All of the parameters passed in the createInsertProjectItemAction() method are of the right type (projectItem, TickTime, numbers, booleans).
- Tried changing the values of the videoTrackIndex, audioTrackIndex parameters to different numbers.
- Tried changing the value of the limitShift parameter (true/false, 0/1 etc).
- Tried different types of items to insert (video clip, sequence, adjustment layer, color matte etc).
- I've also tried searching online for help, but Google literally returns zero pages discussing this method except for the Adobe documentation page and a Creative Cloud Developer forum page announcing its release 10 days ago (March 19, 2025).
If you have any ideas on how I can get it to work, or if you can spot any errors in my code please let me know. Thanks!

