alphagov / govuk-prototype-kit

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

Prototype failed due to corrupt session files #2269

Closed BenSurgisonGDS closed 1 year ago

BenSurgisonGDS commented 1 year ago

Description of the issue

The user had lost all styling within their page and an error was displayed. Please see below:

Screenshot 2023-07-24 at 14 12 08 The user also had the error continously repeating within the console:

Screenshot 2023-07-24 at 14 12 26

Steps to reproduce the issue

When running a freshly created prototype with a version of the govuk-prototype-kit that uses our own session-file-store, edit the session file within .tmp/sessions and make sure it is saved with invalid json.

Actual vs expected behaviour

The actual behaviour is as described above, the suggested behaviour is for the prototype to discard the invalid session file and continue. If a new session file is required, it should be created and although the data in the original session file may be lost, a new session file is created without the prototype being stuck in a loop with a failed session.