alphagov / govuk-prototype-kit

Rapidly create HTML prototypes of GOV.UK services
https://prototype-kit.service.gov.uk
MIT License
305 stars 236 forks source link

session-file-store on Windows can sometimes have `EPERM: operation not permitted rename` errors #1811

Closed lfdebrux closed 1 year ago

lfdebrux commented 1 year ago

Description of the issue

On Windows, a prototype will intermittently print errors similar to the following in the terminal:

EPERM: operation not permitted, rename 'C:\Users\lfdeb\Documents\prototypes\test-prototype\.tmp\sessions\ehaFpZQViD5Q~FAGIXwYAKFjsASLKJ.json.4283232820' -> 'C:\Users\lfdeb\Documents\prototypes\test-prototype\.tmp\sessions\ehaFpZQViD5Q~FAGIXwYAKFjsASLKJ.json.4283232820'

Steps to reproduce the issue

In a prototype with forms, click around the prototype, answer questions.

A nice and simple example is available at https://github.com/asmith-nhsx/prototypes/tree/main/rocket-licence

Actual vs expected behaviour

No errors in terminal.

Environment (where applicable)

lfdebrux commented 1 year ago

Looking at the issues for session-file-store, this appears to be a known bug, but it's been open for some time with multiple attempts at fixing it 😟

https://github.com/valery-barysok/session-file-store/issues/69

joelanman commented 1 year ago

seeing this with both users in training on Windows

HannahJMWood commented 1 year ago

Read through the link that @lfdebrux shared in his comment above. This does seem to be a known bug with session-file-store. As it's not been fixed yet and our investigations have found that it doesn't effect our session storing functionality, we have decided to implement a suppression of these errors so that users don't see them and panic.

HannahJMWood commented 1 year ago

Need to re-visit and test this to make sure that its not an issue anymore following the new implementation of the session file store

HannahJMWood commented 1 year ago

@ollie-b-gds and I have tested this on a Windows VM. We're not seeing the errors anymore so we're happy to close this issue.