I have a plug-in that I developed on a Mac, and I’m installing it now onto a Windows machine. I can’t get the file picker from getFileForOpening to work on Windows.
To illustrate the issue, here’s a bit of code I ran in a UXP debug console on both machines:
const fsProvider = require('uxp').storage.localFileSystem;
async function getPath() {
selection = await fsProvider.getFileForOpening();
console.log(selection.nativePath);
}
getPath();
On the Mac, the system file picker opens, and, after I select a file, it prints the file’s path to the console.
On the Windows machine, the file picker never opens. getPath()
returns a pending promise that never resolves.
The manifest file for my plugin has "localFileSystem": "fullAccess"
.
The code is the same in the Mac and Windows plug-ins. On the Mac, I can get getFileForOpening
to work both from an in-progress plug-in in UXP Developer Tools and from a finalized, packaged plug-in in InDesign.
Do any Windows devs here know of any OS-level security setting that may be causing an issue? The OS version is Windows Server 2022 Standard.
Maybe there’s something else I’m missing?