File scheme not supported issue in shell.openExternal (since 22.5)

One of the features of my plugin is the ability to open a Windows Explorer or Finder window in a given location. This is used to show the source file location for a Photoshop layer.

This was done using “require(“uxp”).shell.openExternal”, which could take simple Windows file paths or the URI equivalent prefixed by “file://” when using macOS.

This was the code used so far which worked on 22.4 and prior:

/* layerFilePath example on Windows: "D:\Work\png_v001" */
const operatingSystemStart = require("os").platform().substring(0, 3);
if (operatingSystemStart == "win") {
await require("uxp").shell.openExternal(layerFilePath); 
} else {
await require("uxp").shell.openExternal("file://" + encodeURI(layerFilePath));

On 22.5 it seems like shell.openExternal no longer supports local paths, and gives the following error message in the console: “file scheme is not supported”.

Does anyone know if there’s a way around this? It would be great if I could resolve this ASAP. Thank you :pray:

Can someone from Adobe comment on this please?

Has there been a deliberate decision to disallow opening a Windows explorer window from a plugin?

It would be useful to know so I can remove this feature to avoid user confusion.

I have the same problem!

What is you API version in the manifest? Is this broken for both?

Mine was API version 1. I’ve just tried changing the manifest to API version 2 which has introduced some new issues, but I’m sure I can iron them out. Will respond here once plugin is updated to API 2. Thanks for the reply :grinning:

I’m seeing the same problem. Can’t get it to work anymore.

1 Like

I also tried every way but I can’t get it to work anymore

Looks like this was introduced as part of an improved API (openPath) that hasn’t quite made it to release. The gating in this API didn’t quite align with the release of the newer API that was designed for opening Finder/Folder windows.

I’ll see if we can get it fixed for Ps 22.5.1 (September release).