I have an issue on mac when trying to open an external app from an uxp plugin, where the call shell.openPath() fails w/: “Extension “” is not accepted for the path”. The manifest contains the “.app” entry in the extensions array. If I try to open an arbitrary file (e.g. rtf), w/out adding the extension to the manifest, I’ll get back the same error, but w/ extension listed in the message: “Extension “.rtf” is not accepted for the path”.
Opening an app (.exe) on windows, using the same call, succeeds.
The openExternal cannot be used because ‘file’ scheme is not supported.
please share the relevant parts of the manifest so we can help you better.
also sharing minimal code could help.
Manifest:
“manifestVersion”: 5,
“requiredPermissions”: {
“localFileSystem”: “request”,
“launchProcess”: {
“schemes”: [
“https”
],
“extensions”: [
“.png”,
“.exe”,
“.app”
]
}
}
Code:
try {
await shell.openPath(“/Users/…/external.app”)
}
I don’t have access to a mac machine, but I can assure you that the manifest is correct and your code does work on windows.
for the sake of testing, could you please try the following
"launchProcess": {
"schemes": [
"https",
"file",
""
],
"extensions": [
".png",
".exe",
".app"
],
"network": {
"domains": "all"
}
}
if it still doesn’t work, please try with file:/
:
await shell.openPath("file://Users/…/external.app")
please note that reloading the plugin is not enough when editing the manifest, you’ll need to unload and the load it so changes apply.
Thank you for looking into this.
We verified the code in windows, and it’s working.
Your suggestion to use ‘file://’ w/ the openPath call was a good one, because after I made the change, I got the prompt ‘Request for Permission’ (allow/block app). Unfortunately after clicking on Allow, I got an error message: “File not found”. The app can be launch w/out any problems from finder.
- does other extensions work?
- have you tried other locations?
- are you sure about the file path, maybe try it a browser? to narrow down the issue
If I try to open a jpg, using openPath("file://path), I’ll get the same behavior as before: permission prompt and then the error. If I don’t prepend the ‘file://’ to the path, then openPath(path) works for that jpg (or a txt file).
I double checked the path and it’s correct. Actually, all the test files are located on the plugin’s root.
To me it looks like a mac specific issue, when opening an external app. It would be great if another mac user could try it out.
could be a security issue. the call must be getting blocked somewhere.
how about running a script that starts the .app? does it work
other people confirmation would be great
I tried on a mac and .app did not work.
Perhaps it is because .app is actually a folder. What is executed is the executable file inside it.
So I added ""
to the allowed extensions and it worked. A dialog box appears asking if I want to allow it or not.
"extensions": [
"",
".png",
".exe",
".app"
],
That was a good suggestion. After adding an empty extension “” to the manifest, the call openPath(“/Users/…/external.app”) succeeds and the app is launched. Thank you.
InDesign manifest documentation says there is no need for .
dot. But Photoshop manifest documentation do has a .
https://developer.adobe.com/photoshop/uxp/2022/guides/uxp_guide/uxp-misc/manifest-v5/#launch-process