posit-dev / publisher

MIT License
5 stars 1 forks source link

Permissions: when opening a folder that includes files/folders without user perms a confusing error is thrown #2032

Closed kgartland-rstudio closed 3 months ago

kgartland-rstudio commented 3 months ago

I hit this originally in Workbench, where this may occur more frequently than a local install but I was able to reproduce locally as well.

Using the Workbench instance here: https://dev.palm.ptd.posit.it/

If I open the /home/ directory which includes all Users. I can click Add Deployment but then this error is thrown:

Unable to continue with project inspection failure. An error has occurred at newDeployment, configurations.inspect, Msg=Cannot read properties of null (reading 'forEach')

Screenshot 2024-07-25 at 1 52 21 PM

I was able to reproduce this locally by opening / (root) dir and clicking Add Deployment.

kgartland-rstudio commented 3 months ago

@mmarchetti : you're right, this also happens on empty folders

mmarchetti commented 3 months ago

This is an API bug; curl output is a literal null.

dotNomad commented 3 months ago

We now get a proper error when we detect no entrypoints due to permissions or empty folders.