ismop / eitwid

1 stars 0 forks source link

Unexpected error in Analysis view #146

Closed nowakowski closed 7 years ago

nowakowski commented 7 years ago

Following an optimization change in the DAP MeasurementsController the Analysis view in the UI displays a brief "Error occurred" message when activated - however the view appears to work and all the charts are presented correctly.

What's even stranger is that this behavior persists after reverting to the master branch and restarting DAP. Need help debugging this. DAP branch is named 'optimize_measurements'.

nowakowski commented 7 years ago

Further research indicates that this issue is unrelated to my changes:

D, [2016-10-28T15:17:23.895933 #5272] DEBUG -- :   ESC[1mESC[35mThreatAssessment Load (202.7ms)ESC[0m            SELECT id, created_at,
 status, rank
            FROM (
              SELECT id, created_at, status, rank()
              OVER (PARTITION BY profile_id ORDER BY created_at DESC)
              FROM (
                SELECT threat_assessments.id, threat_assessments.created_at, threat_assessments.status, profile_selections.profile_id
                FROM threat_assessments JOIN profile_selections ON threat_assessments.id=profile_selections.threat_assessment_id
                WHERE threat_assessments.created_at BETWEEN 'Fri Oct 21 09:00:00 GMT+200 2016' AND 'Fri Oct 21 09:15:00 GMT+200 2016') 
tpq
            ) inq
          WHERE rank < 2
E, [2016-10-28T15:17:23.896033 #5272] ERROR -- : PG::InvalidParameterValue: ERROR:  time zone "gmt+200" not recognized
LINE 8: ...      WHERE threat_assessments.created_at BETWEEN 'Fri Oct 2...
                                                             ^
:           SELECT id, created_at, status, rank
            FROM (
              SELECT id, created_at, status, rank()
              OVER (PARTITION BY profile_id ORDER BY created_at DESC)
              FROM (
                SELECT threat_assessments.id, threat_assessments.created_at, threat_assessments.status, profile_selections.profile_id
                FROM threat_assessments JOIN profile_selections ON threat_assessments.id=profile_selections.threat_assessment_id
                WHERE threat_assessments.created_at BETWEEN 'Fri Oct 21 09:00:00 GMT+200 2016' AND 'Fri Oct 21 09:15:00 GMT+200 2016') 
tpq
            ) inq
          WHERE rank < 2
I, [2016-10-28T15:17:23.896260 #5272]  INFO -- : Completed 500 Internal Server Error in 1406ms

@tbartynski Did you push a non-master branch to dap-prod...?

nowakowski commented 7 years ago

OK, fixed it myself. Closing ticket.