DPCS-team / DPCS

Data Powered Crash Solver
7 stars 17 forks source link

Bug: posting crash report through http://54.93.105.103:8000/vd1/crash-reports/ #66

Open ignacy130 opened 8 years ago

ignacy130 commented 8 years ago

Reproduction steps:

  1. Go to: http://54.93.105.103:8000/vd1/crash-reports/
  2. Paste sample crash report from Apiary to field at the bottom:

{ "crash_report": { "application": { "name" : "Google Chrome", "version": "48.0.2564.116" }, "system_info": { "version": "14.04.1 LTS" }, "exit_code": 1, "stderr_output": "Lines from stdErr." } }

  1. Get Server Error (500) :(
ignacy130 commented 8 years ago

Similar thing when posting through requests editor in browser.

  1. Creating request as in Apiary 2016-03-30 22_06_49-portalkol web running - microsoft visual studio
  2. Getting unsupported media type 2016-03-30 22_07_01-portalkol web running - microsoft visual studio
MSusik commented 8 years ago

The same for me

{'crash_report': {'application': {}, 'stderr_output': 'Xlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nError: couldn\'t find RGB GLX visual or fbconfig\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nError: couldn\'t find RGB GLX visual or fbconfig\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\nXlib:  extension "GLX" missing on display ":0.0".\n/usr/bin/scilab-cli-bin: error while loading shared libraries: libscilab-cli.so.0: cannot open shared object file: No such file or directory\n', 'system_info': {'system_name': 'msusik-GE62-2QE', 'kernel': '4.2.0-30-lowlatency', 'architecture': 'x86_64'}, 'exit_code': 127}}
patrikos94 commented 8 years ago

Ok. So Currently the server is implemented in such a way in that it needs all the information to be passed in order to add a crash report(crash_report_id and crash_group_id as well, even if it means that crash_group_id is gibberish, and crash_report_id is random, but unique).

Also I've just noticed that the system information field mismatch: (systeminfo vs system_info), as well as "crash_report" field is unnecessary. My oversight. I'll try to throw in a change for that soon.

So as for now here is the example of the correct way to add a crash report using curl: curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"crash_report_id": 104,"crash_group_id": 100, "application": { "name" : "Google Chrome", "version": "48.0.2564.116" }, "systeminfo": { "version": "14.04.1 LTS" }, "exit_code": 1, "stderr_output": "Lines from stdErr."}' http://54.93.105.103:8000/vd1/crash-reports/

Also I think the server should be reconfigured because the static files fail to be delivered, and the form on the http://54.93.105.103:8000/vd1/crash-reports/ doesn't work correctly(but curl does!). Little hint for django deployment: https://docs.djangoproject.com/es/1.9/howto/deployment/

ignacy130 commented 8 years ago

I propose to post with unknown ids equal to -1.

By the way: is it possible to create api route to get all crash groups? Now, in order to get all cgs, you need to get all cg ids from crash reports and ask API about cg one by one. Even route /search would do if it returns all entities for search query equal to empty string.

For now, its implemented in front end, but cleaner solution to get all mentioned entities would be useful.

If you agree I'll post it as another issue and explain it with details.

-----Original Message----- From: "patrikos94" notifications@github.com Sent: ‎3/‎31/‎2016 14:22 To: "DPCS-team/DPCS" DPCS@noreply.github.com Cc: "Ignacy" ignacy130@gmail.com Subject: Re: [DPCS-team/DPCS] Bug: posting crash report throughhttp://54.93.105.103:8000/vd1/crash-reports/ (#66)

Ok. So Currently the server is implemented in such a way in that it needs all the information to be passed in order to add a crash report(crash_report_id and crash_group_id as well, even if it means that crash_group_id is gibberish, and crash_report_id is random, but unique). Also I've just noticed that the system information field mismatch: (systeminfo vs system_info), as well as "crash_report" field is unnecessary. My oversight. I'll try to throw in a change for that soon. So as for now here is the example of the correct way to add a crash report using curl: curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"crash_report_id": 104,"crash_group_id": 100, "application": { "name" : "Google Chrome", "version": "48.0.2564.116" }, "systeminfo": { "version": "14.04.1 LTS" }, "exit_code": 1, "stderr_output": "Lines from stdErr."}' http://54.93.105.103:8000/vd1/crash-reports/ Also I think the server should be reconfigured because the static files fail to be delivered, and the form on the http://54.93.105.103:8000/vd1/crash-reports/ doesn't work correctly(but curl does!). Little hint for django deployment: https://docs.djangoproject.com/es/1.9/howto/deployment/ — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

patrikos94 commented 8 years ago
I propose to post with unknown ids equal to -1.
Seems like a good idea to assign -1 to a crash_group_id field when creating new crash report.
For crash_report_id, however, you still have to provide unique number.
By the way: is it possible to create api route to get all crash groups?
It's already implemented. Try http://54.93.105.103:8000/vd1/crash-groups/
For each crash group, crash reports that are associated with it are displayed.
ignacy130 commented 8 years ago

@patrikos94 @bdfhjk told that while CR doesn't have CG crash_group_id should be null in database column - that's the best solution.

To be clear: are we talking about what API accepts or what Model and database are accepting?

Because how can I know it's unique, while being in client layer? :P Shouldn't database care about it?

patrikos94 commented 8 years ago

@ignacy130 My previous comments referred to current implementation of the server, and things you have to keep in mind in case you want to add a crash report/crash group/solution now. Currently, you have to provide a unique id to add a crash report. This was pretty comfortable for testing purposes when 1 person used the system, but obviously we do not want that with 100+ people using our server. And so, you should expect to be freed of this necessity to provide id in the next commit, but until it's there, the only way to add a crash report is to provide crash_report_id and crash_group_id fields, as I mentioned above.