Unable to package photoshop UXP plugin

Hi all, hope this is the right place, appreciate any help. I’m pretty much a noob with UXP (also only barely used CEP) but quite proficient with ExtendScript. I had a panel in CEP that was basically just a bunch of buttons to run extend scripts from my dropbox. Remaking this in UXP was very tricky, since accessing the filesystem is so much harder. I think my way of going about it was kinda hack-y, and though the plugin loads fine and works fine in Dev mode, it fails with an error that doesn’t really say much when I try to package it. It’s a pain to have to open UXP tools and hit “Load” every day/time I restart PS, but that’s what I’ve been doing for now.
Is there an official, accepted way to permanently grant a panel access to a folder in the filesystem? I haven’t been able to find one. Everything indicates you need a file picker every time you call a file from the system, which if I were going to do that I may as well just hit File>Scripts>Browse every time.
Thanks for taking the time to read

The ability to access the file system is allegedly available now:

I haven’t had a play yet so can’t comment.

My old way of doing it uses the file picker once on plugin install to grab a persistent token and then stores it in a json settings file for later. On subsequent plugin load that token is retrieved et voila filesystem access
Here’s a demo:
Access demo

As to why your plugin doesn’t package - can you share a repo?

Thank you so much! What you’re doing in that demo worked perfectly for me. Took me a while to figure out as I’m coming from ECMAScript 2 I think haha, so all the new stuff with async and such is a question mark to me, but I was eventually able to get what I needed from your code and it now packages successfully and works perfectly!
I haven’t upgraded to v24 yet, but I’ll check out the new way when I do. Will also have to eventually start porting all my ExtendScripts when they start to deprecate it, but hopefully that bridge doesn’t need to be crossed for a while…

1 Like

Glad that worked out for you!
I hear what you’re saying - coming from CEP to UXP I discovered that ExtendScript had tricked me into thinking I knew JavaScript :rofl:
I did a course on Udemy and once I’d grasped asynchronous code UXP made a lot more sense!