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

Date-Time Format Issue on Save #99

Closed
hreineck opened this issue Jun 1, 2022 · 8 comments
Closed

Date-Time Format Issue on Save #99

hreineck opened this issue Jun 1, 2022 · 8 comments

Comments

@hreineck
Copy link
Contributor

hreineck commented Jun 1, 2022

When saving any changes via the REST Service, any date-time fields are filled with a format like:
2021-02-25T00:00:00.00-04:00

This causes a 500 error when trying to view in the OSCAL Viewer, presumably because that format is incorrect.
Setting the date manually to the format:
2021-02-25T00:00 instead seems to be the proper format.

@rgauss
Copy link
Contributor

rgauss commented Jun 2, 2022

The first format should be a valid dateTime-with-timezone, and this seems to be working for me.

Are there specific date-time fields you're noticing that aren't working, and can you point to an example?

@laurelmay
Copy link
Contributor

A few more questions to help narrow down the cause:

  • Does the error occur on the POST/PUT request (actually processing the new data and/or storing) or on the GET (loading the data back from disk)?
  • Are you able to reproduce in a scenario where you can pull the stack trace from Spring?
  • Is this actually a 500 error that you get for the service? Or another "Yikes"/unmounting of the OSCAL Viewer?
  • What browser (and version) are you using?
  • Are you using the Docker container or another means to run the server?

@mikeisen1
Copy link
Contributor

@kylelaker, I tested it out and got the error. Here are my results.

How the application was run: Docker
Browser: Google Chrome Version 101.0.4951.67 64-bit
Request type: PATCH (Update of SSP version)
Error Message in Console: Failed to load resource: the server responded with a status of 500 ()
Error Message in Viewer: Yikes! Something went wrong loading the OSCAL data. 500

Here is the spring logs of the error. The top line is the first entry after the PATCH request was made.
error log

Here is the stack trace:
save error stack trace

@rgauss
Copy link
Contributor

rgauss commented Jun 3, 2022

@mikeisen1, can you also give info on:

  • OS version
  • Docker version
  • Run command used
  • When the image you're using was last pulled (or what sources built from)

@laurelmay
Copy link
Contributor

@mikeisen1 Thanks for that report! So while there is an issue there, I think it's actually more related to #98 (because this is an AccessDeniedException). But I am really interested to hear more

@mikeisen1
Copy link
Contributor

@mikeisen1, can you also give info on:

  • OS version
  • Docker version
  • Run command used
  • When the image you're using was last pulled (or what sources built from)
  • OS version: Windows 11 Version 21H2
  • Docker version: Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1
  • Build command (run after starting the docker daemon): docker build --build-arg OSCAL_REACT_GIT_BRANCH=develop --build-arg OSCAL_REST_SERVICE_GIT_BRANCH=develop --tag oscal-editor-all-in-one .
  • Run command: docker run -p 8080:8080 -v "$(pwd)"/../../oscal-demo-content:/app/oscal-content oscal-editor-all-in-one

@hreineck
Copy link
Contributor Author

hreineck commented Jun 7, 2022

Upon further investigation, this is my bad. I was using an older version of my Docker image which hadn't been updated to liboscal-java 1.0.2. I haven't been able to reproduce this after updating so I'm assuming the issue was a discrepancy in going between the two versions.

@laurelmay
Copy link
Contributor

@hreineck I am going to go ahead and close this issue then (the error around date-time format); if we do find that this can be reproduced then we'll reopen it.

@mikeisen1 if you continue to experience your crash, we likely want to track that in a separate issue that includes the additional information you provided as well as the permissions of files in your environment.

@laurelmay laurelmay closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2022
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