ohmage / gwt-front-end

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

Upload document error #299

Closed ctrance closed 10 years ago

ctrance commented 10 years ago

Error 'there was a problem creating the document' was encountered by admin user (mwf.cathy.a) when uploading a document 156kb image .png file.

stevenolen commented 10 years ago

server logs to show that document/create is successful:

2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [DEBUG] [org.ohmage.request.RequestBuilder] - /app/document/create
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.request.UserRequest] - Creating a user request.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.request.document.DocumentCreationRequest] - Creating a new document creation request.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.validator.DocumentValidators] - Validating a document's name.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.validator.DocumentValidators] - Validating a document's privacy state.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.validator.CampaignDocumentValidators] - Validating a list of campaign ID and document role pairs.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.validator.ClassDocumentValidators] - Validating a list of class ID and document role pairs.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.validator.DocumentValidators] - Validating a document's description.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.request.document.DocumentCreationRequest] - Servicing a document creation request.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.request.UserRequest] - Authenticating the user.
2013-08-12 08:45:29,527 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.request.document.DocumentCreationRequest] - Checking if the user is an admin.
2013-08-12 08:45:29,528 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.request.document.DocumentCreationRequest] - The user is an admin.
2013-08-12 08:45:29,528 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.request.document.DocumentCreationRequest] - Verifying that the campaigns in the campaign-role list exist.
2013-08-12 08:45:29,529 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.request.document.DocumentCreationRequest] - Creating the document.
2013-08-12 08:45:29,533 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [DEBUG] [org.ohmage.request.Request] - Returning a GZIPOutputStream
2013-08-12 08:45:29,533 [http-bio-8080-exec-96] [e0577cf4-87ac-4a40-b9c3-03591ac94530 client=ohmage-gwt] [INFO] [org.ohmage.jee.servlet.RequestServlet] - Time to process '/app/document/create':6
stevenolen commented 10 years ago

hrm. @ctrance can you give browser info for this one? Just tried it on chrome 28.0.1500.95 and couldn't recreate..

stevenolen commented 10 years ago

nevermind, re-created in FF. @joshuaselsky, I feel like we ran across this before....here's the firebug log. Looks like firefox is reading <pre> for some reason:

Mon Aug 12 09:46:36 GMT-700 2013 edu.ucla.cens.mobilize.client.ui.DocumentEditPresenter
SEVERE: Failed to parse json. Response was: <pre>{"result":"success","document_id":"c7442d6a-f3fb-48e0-b06b-8ae1d2688354"}. Error was: Error parsing JSON: SyntaxError: JSON.parse: unexpected character

Mon Aug 12 09:46:36 GMT-700 2013 edu.ucla.cens.mobilize.client.ui.DocumentEditPresenter
SEVERE: Document create failed. Response was: <pre>{"result":"success","document_id":"c7442d6a-f3fb-48e0-b06b-8ae1d2688354"}