# Unable to package photoshop UXP plugin

**URL:** <https://forums.creativeclouddeveloper.com/t/unable-to-package-photoshop-uxp-plugin/5515>\
**Category:** UXP Plugin API\
**Created:** [November 18, 2022, 11:57pm UTC](https://forums.creativeclouddeveloper.com/t/unable-to-package-photoshop-uxp-plugin/5515 "2022-11-18T23:57:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Alexander](https://forums.creativeclouddeveloper.com/u/Alexander)\
**Post date:** [November 18, 2022, 11:57pm UTC](https://forums.creativeclouddeveloper.com/t/unable-to-package-photoshop-uxp-plugin/5515/1 "2022-11-18T23:57:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [November 19, 2022, 12:06am UTC](https://forums.creativeclouddeveloper.com/t/unable-to-package-photoshop-uxp-plugin/5515/2 "2022-11-19T00:06:44Z")

</div>

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

> [@Replace content function does not work with batchPlay](http://forums.creativeclouddeveloper.com/t/replace-content-function-does-not-work-with-batchplay/5503/5):
>
> Without file picker you can access only 3 folders: getTemporaryFolder() getDataFolder() getPluginFolder() With the new FileSystem API it’s possible to read/write without file picker: [https://developer.adobe.com/photoshop/uxp/2022/uxp/reference-js/Modules/FileSystem/](https://developer.adobe.com/photoshop/uxp/2022/uxp/reference-js/Modules/FileSystem/) It requires manifest version 5 and PS 24.0.0. In the manifest also declare: "requiredPermissions": { "localFileSystem": "fullAccess" }

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](https://github.com/timothybennette8/accessDemo)

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [November 19, 2022, 12:07am UTC](https://forums.creativeclouddeveloper.com/t/unable-to-package-photoshop-uxp-plugin/5515/3 "2022-11-19T00:07:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alexander](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Alexander](https://forums.creativeclouddeveloper.com/u/Alexander)\
**Post date:** [November 23, 2022, 2:35pm UTC](https://forums.creativeclouddeveloper.com/t/unable-to-package-photoshop-uxp-plugin/5515/4 "2022-11-23T14:35:17Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [November 23, 2022, 3:44pm UTC](https://forums.creativeclouddeveloper.com/t/unable-to-package-photoshop-uxp-plugin/5515/5 "2022-11-23T15:44:33Z")

</div>

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 🤣  
I did a course on Udemy and once I’d grasped asynchronous code UXP made _a lot_ more sense!
