Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionError: [WinError 5] Access is denied when building #2344

Closed
reefwarrior opened this issue Sep 5, 2020 · 12 comments
Closed

PermissionError: [WinError 5] Access is denied when building #2344

reefwarrior opened this issue Sep 5, 2020 · 12 comments

Comments

@reefwarrior
Copy link

can you try again?

system info given out the reason - spaces in absolute filepaths... I tried renaming the working repo dir, which triggered the issue you described. should work now

Originally posted by @mcspr in #2343 (comment)

@reefwarrior
Copy link
Author

Sorry, as this is a duplicate - the original 'ticket' was closed, so I don't know if you were able to get it @mcspr :)

@mcspr
Copy link
Collaborator

mcspr commented Sep 5, 2020

#2343 was closed via e1b643f
have you 'pull'ed from the repo again to sync it?

PermissionError: [WinError 5] Access is denied: 'C:\Users\Tinus Blaauw.platformio.cache\tmp\pkg-installing-i2fuchvm.git\objects\pack\pack-1e52effe1f9a5937ec9554213076ce1b1e541f6a.idx':
File "C:\users\tinus blaauw.platformio\penv\lib\site-packages\platformio\builder\main.py", line 169:

does not tell me anything useful :/
if you happen to run vscode, try again with pio.exe directly? (pio.exe run -e $PIO_ENVIRONMENT_NAME)

@reefwarrior
Copy link
Author

Tried. Get the same problem about PermissionError :(

@reefwarrior
Copy link
Author

Perhaps this is not related, but I can build (3d printer) Marlin firmware without an issue....

@reefwarrior
Copy link
Author

#2343 was closed via e1b643f
have you 'pull'ed from the repo again to sync it?

PermissionError: [WinError 5] Access is denied: 'C:\Users\Tinus Blaauw.platformio.cache\tmp\pkg-installing-i2fuchvm.git\objects\pack\pack-1e52effe1f9a5937ec9554213076ce1b1e541f6a.idx':
File "C:\users\tinus blaauw.platformio\penv\lib\site-packages\platformio\builder\main.py", line 169:

does not tell me anything useful :/
if you happen to run vscode, try again with pio.exe directly? (pio.exe run -e $PIO_ENVIRONMENT_NAME)

Sorry haven't answered - yes I have pulled the latest.

@mcspr
Copy link
Collaborator

mcspr commented Sep 5, 2020

WinError 5 issue is assumed to be fixed in PIO:
platformio/platformio-core#3328

idk about Marlin differences, seems almost the same.

https://github.com/me-no-dev/ESPAsyncTCP.git#7e9ed22

can sometimes become

https://github.com/me-no-dev/ESPAsyncTCP/archive/7e9ed22.zip

but, if WIFISUPPORT is enabled, I see the same git clones (which are supposedly the issue with Windows):
https://github.com/MarlinFirmware/Marlin/blob/9913333c33d234264a9072630e8b5ffbf07bad7e/platformio.ini#L357-L361

@mcspr mcspr changed the title can you try again? PermissionError: [WinError 5] Access is denied when building Sep 5, 2020
@reefwarrior
Copy link
Author

OK, SOMEHOW, and I still don't know how, I got this to build. There was a dependency that it didn't pull (a library item), which I installed manually... SPIFlash or something like that it is called. So I will TRY and see if I can get the new firmware uploaded....

@mcspr
Copy link
Collaborator

mcspr commented Sep 9, 2020

SPIFlash was the specific lib that always failed? We don't list it directly, but it comes from rfm69. Does removing rfm69 line from `lib_deps = ...' in the platformio.ini fix the issue?
Libraries are installed per env, have you tried building with another, does it fail?

edit: Upstream issues:
platformio/platformio-core#3479 (now closed)
platformio/platformio-core#3664

@Bmooij
Copy link

Bmooij commented Sep 9, 2020

The issue is due to the vscode git watch.
vscode "locks" .git folders

As a workaround you could disable the vscode git watch in settings.json:

{
    "git.enabled": false
}

@tita2000
Copy link

Hi, where to find the settings.json file? Thanks

@mcspr
Copy link
Collaborator

mcspr commented Sep 10, 2020

@tita2000
See code/.vscode/settings.json
You can use File > Preferences from the VSCode menu

@mcspr
Copy link
Collaborator

mcspr commented Sep 12, 2020

Per platformio/platformio-core#3664 (comment)
Things should work after pio upgrade --dev / when next version 5.0.2 is released

edit: vscode git integration is still bonkers though, it's just a workaround... but idk how to solve this from our side reliably without shoving libraries into global storage (or creating our custom libinstall dir) or replacing git repos with vendor'ed .zip archives / link to github archive feature instead.

@mcspr mcspr closed this as completed Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants