burningmantech / ranger-ims-server

Ranger Incident Management System—Server
Apache License 2.0
27 stars 7 forks source link

getting 'Invalid JSON Response' in test event. #65

Closed corprew closed 8 years ago

corprew commented 8 years ago

image

I'm getting an invalid JSON response in the test event, the 2016 event works fine. let me know if there's something i can do to help repro.

safari Version 9.1.1 (11601.6.17)

corprew commented 8 years ago

Response in (chrome) developer tools is the following string. note 'Internal Error' at end of apparent JSON, if had ] instead of 'Internal Error' would be valid JSON.

[{"number":1,"priority":3,"summary":"Capybara on the run","location":{"name":"Moscow","type":"garett","concentric":3,"radial_hour":5,"radial_minute":30,"description":"Portapots"},"ranger_handles":["Foofurr","J.C.","Judas"],"incident_types":["Missing Person"],"report_entries":[{"author":"Foofurr","text":"Participant reports missing capybara. Last seen wearing purple spandex tights and pink fairy wings. Responds to Sweetcheeks. Knows tricks","created":"2016-06-22T02:53:25Z","system_entry":false},{"author":"Foofurr","text":"Foofurr has dibs","created":"2016-06-22T02:53:32Z","system_entry":false},{"author":"Foofurr","text":"Capybara soon on motorcycle headed towards the man","created":"2016-06-22T03:06:37Z","system_entry":false}],"timestamp":"2016-06-22T02:50:58Z","state":"new"},{"number":2,"priority":3,"summary":"Markle said I did it","location":{"name":"Mark's camp","type":"garett","concentric":null,"radial_hour":null,"radial_minute":null,"description":null},"ranger_handles":["Tool"],"incident_types":["Green Dot"],"report_entries":[{"author":"Tool","text":"blah blah","created":"2016-06-22T03:27:46Z","system_entry":false}],"timestamp":"2016-06-22T03:27:30Z","state":"closed"},{"number":3,"priority":1,"summary":"beeeeees....","location":{"name":"Tokyo","type":"garett","concentric":null,"radial_hour":null,"radial_minute":null,"description":null},"ranger_handles":["Fuzzy","Safety Phil","Tao Skye","Zeitgeist"],"incident_types":["Courtesy Notice"],"report_entries":[{"author":"Tool","text":"knees","created":"2016-06-23T01:04:26Z","system_entry":false}],"timestamp":"2016-06-22T17:38:08Z","state":"new"},{"number":4,"priority":3,"summary":"Lost contact lens","location":{"name":"Camp Thoughtful","type":"garett","concentric":5,"radial_hour":4,"radial_minute":30,"description":"Large Brain on playa"},"ranger_handles":["Lens","Octokoi"],"incident_types":["Green Dot","Medical"],"report_entries":[{"author":"Po-Boy","text":"Participant asked for Rangers help in finding a contact lens she says was lost in the street outside of the camp. Rangers helped the participant look for the lens, but not luck.","created":"2016-06-23T03:44:45Z","system_entry":false},{"author":"Po-Boy","text":"Participant reports being very anxious about not being able to see \"out of one eye\". Ocotokoi referred the female participant to Rampart and provided other options, like the Burner Express to Reno, where a replacement might be procured. Participant calmed down and thanked both Ranger profusely.","created":"2016-06-23T03:46:21Z","system_entry":false}],"timestamp":"2016-06-23T03:42:57Z","state":"new"},{"number":5,"priority":5,"summary":"Splinter has too much to do","location":{"name":"9:00","type":"garett","concentric":6,"radial_hour":11,"radial_minute":10,"description":"First Live Coffee shop in brooklyn, NY 11221"},"ranger_handles":["Abakus","Baby Huey","CCSallie","DL","Eagle Eye","FIB","G-Ride","H2O","Icarus"],"incident_types":["Gate","Echelon"],"report_entries":[{"author":"Splinter","text":"The name entry thing is kooky. Not going to be fast...","created":"2016-06-23T17:16:00Z","system_entry":false},{"author":"Splinter","text":"Other changes to the document, like New, On Hold, etc don't seem to require saving, nor give you the option TO save... Bug or feature?","created":"2016-06-23T17:17:24Z","system_entry":false},{"author":"Splinter","text":"Only by typing in this Incident Report does it ask you to save...","created":"2016-06-23T17:18:02Z","system_entry":false}],"timestamp":"2016-06-23T17:11:09Z","state":"on_hold"},{"number":6,"priority":3,"location":{"name":null,"type":"garett","concentric":null,"radial_hour":null,"radial_minute":null,"description":null},"ranger_handles":["Tool"],"incident_types":[],"report_entries":[{"author":"Splinter","text":"test","created":"2016-06-23T17:37:07Z","system_entry":false}],"timestamp":"2016-06-23T17:32:47Z","state":"new"},{"number":7,"priority":3,"location":{"name":null,"type":"garett","concentric":null,"radial_hour":null,"radial_minute":null,"description":null},"ranger_handles":["Abakus","Baby Huey","CCSallie","DL","Eagle Eye","FIB","G-Ride","H2O","Icarus","J.C.","KT","LAM #03","M-Diggity","NaFun","OJ","Painless","Quandary","Raccoon","Sabre","T-Rex","Ubercarney","Valkyrie","Wahiro","Xanadu","Yardsale","Zaphod"],"incident_types":[],"report_entries":[],"timestamp":"2016-06-23T17:37:47Z","state":"new"},{"number":8,"priority":3,"summary":"Dog poop in the road","location":{"name":null,"type":"garett","concentric":null,"radial_hour":null,"radial_minute":null,"description":null},"ranger_handles":[],"incident_types":[],"report_entries":[],"timestamp":"2016-06-23T23:17:04Z","state":"new"},{"number":9,"priority":3,"location":{"name":null,"type":"garett","concentric":null,"radial_hour":null,"radial_minute":null,"description":null},"ranger_handles":["Danger Ranger"],"incident_types":[],"report_entries":[],"timestamp":"2016-06-23T23:17:08Z","state":"new"},{"number":10,"priority":3,"location":{"name":null,"type":"garett","concentric":null,"radial_hour":null,"radial_minute":null,"description":null},"ranger_handles":[],"incident_types":["Courtesy Notice"],"report_entries":[],"timestamp":"2016-06-23T23:17:12Z","state":"new"},{"number":11,"priority":3,"location":{"name":"First Camp","type":"garett","concentric":null,"radial_hour":null,"radial_minute":null,"description":null},"ranger_handles":[],"incident_types":[],"report_entries":[],"timestamp":"2016-06-23T23:17:17Z","state":"new"},{"number":12,"priority":3,"location":{"name":null,"type":"garett","concentric":10,"radial_hour":8,"radial_minute":35,"description":null},"ranger_handles":[],"incident_types":[],"report_entries":[],"timestamp":"2016-06-24T00:19:04Z","state":"new"}Internal error.

wsanchez commented 8 years ago

OK I'm not going to fix this, because it really is an error to have bogus data in the DB; the fix will be to prevent #64.

wsanchez commented 8 years ago

c251c9a7422af6c0cc66ef0255a66613134c8451 should prevent bad data from going on, which should prevent this error.