ohmage / gwt-front-end

The javascript/GWT code behind the front end.
6 stars 2 forks source link

On firefox, uploading a document shows error ‘there was a problem creating the document’ #293

Closed ctrance closed 10 years ago

ctrance commented 11 years ago

I was trying to upload a 37 kb jpg file getting error >>there was a problem creating the document<< but when I view all documents the document got uploaded.

jojenki commented 11 years ago

This is almost certainly the known server issue: https://github.com/cens/ohmageServer/issues/553

stevenolen commented 10 years ago

Still seems to be happening after the server bug was fixed:

[10:11:34.229] The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature. @ https://test.ohmage.org/app/document/create

[10:11:34.246] Mon Jul 08 10:11:34 GMT-700 2013 edu.ucla.cens.mobilize.client.ui.DocumentEditPresenter
SEVERE: Failed to parse json. Response was: <pre>{"result":"success","document_id":"62b87a52-4ef2-44ba-b0bc-ed943f677056"}. Error was: Error parsing JSON: SyntaxError: JSON.parse: unexpected character

[10:11:34.252] Mon Jul 08 10:11:34 GMT-700 2013 edu.ucla.cens.mobilize.client.ui.DocumentEditPresenter
SEVERE: Document create failed. Response was: <pre>{"result":"success","document_id":"62b87a52-4ef2-44ba-b0bc-ed943f677056"}
stevenolen commented 10 years ago

@ctrance @joshuaselsky here is the issue, still open. closing #299 in favor of this one.

jshslsky commented 10 years ago

Well, this is just odd. It is also broken on document edit. For some reason, FF decides to prepend a <pre> tag to the JSON that is returned even though the Content-Type in the response header is application/json.

jshslsky commented 10 years ago

This is fixed. Can someone test and close? I tested it locally and it would be good for someone else to try out otest.

ctrance commented 10 years ago

This is indeed fixed.