Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interview + audio uploads not working #41

Open
uozuAho opened this issue Feb 4, 2016 · 1 comment
Open

Interview + audio uploads not working #41

uozuAho opened this issue Feb 4, 2016 · 1 comment

Comments

@uozuAho
Copy link

uozuAho commented Feb 4, 2016

Apparently uploads are not working. I can't reproduce this in develop commit f29562a , running on Android 5.1.1 on Samsung Galaxy S2. My steps:

  • perform an interview
  • go to 'upload' from menu in start screen
  • press upload

Result logcat at end. Audio is not uploaded, due to missing call to processMediaFiles(interviewsToUpload).

02-04 19:15:41.864 30719-30727/org.rhok.linguist W/art: Suspending all threads took: 545.140ms
02-04 19:15:41.909 30719-30727/org.rhok.linguist W/art: Suspending all threads took: 27.395ms
02-04 19:15:41.975 30719-30719/org.rhok.linguist D/requestDump: {"interview":{"id":0,"interview_time":"/Date(1454573671000-0000)/","interviewee_id":0,"interviewer_id":0,"locale_id":0,"recordings":[{"audio_url":"2028be42f99e43038f233359725668c4.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":1},{"audio_url":"fec6467e87234a229c3feccadd19d59e.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":2},{"audio_url":"1822cd8b5cb1455daa525fa16b0a53ec.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":3},{"audio_url":"cba34e0ae3c04ce4b5a7fbd2e03a5581.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":4},{"audio_url":"7498bb0eb11f436e924525706fb4efc1.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":5},{"audio_url":"25aa20df8c784e768b47afe83ad30b16.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":6},{"audio_url":"a6c44882db0b4c79aa0ae3a4ef20fb61.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":7},{"audio_url":"79e003ba8cb2496db726a5ea6c51d86c.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":8},{"audio_url":"b2f73040df3c4fbaa230ae33167e2e2f.mp4","id":0,"interview_id":0,"language_id":0,"phrase_id":9}],"study_id":3},"interviewee":{"age":111,"education_level":"Eskola Primária","firstLanguage":"Adabe","gender":"Feto","id":0,"livedWholeLife":true,"livesInDistrict":"Aileu vila","livesInMunicipality":"Aileu","livesInVillage":"Aisirimou","name":"q","occupation":"Governu"}}
02-04 19:15:42.221 30719-30719/org.rhok.linguist D/ION: (0 ms) http://45.79.129.214/interviews/upload: preparing request
02-04 19:15:42.222 30719-30719/org.rhok.linguist D/ION: (0 ms) http://45.79.129.214/interviews/upload: preparing request
02-04 19:15:42.245 30719-30719/org.rhok.linguist I/ION: (0 ms) http://45.79.129.214/interviews/upload: Using loader: com.koushikdutta.ion.loader.HttpLoader@38e48ec
02-04 19:15:42.279 30719-31126/org.rhok.linguist D/ION: (0 ms) http://45.79.129.214/interviews/upload: Executing request.
02-04 19:15:42.324 30719-30727/org.rhok.linguist W/art: Suspending all threads took: 5.239ms
02-04 19:15:42.336 30719-31126/org.rhok.linguist V/ION: (57 ms) http://45.79.129.214/interviews/upload: Resolving domain and connecting to all available addresses
02-04 19:15:42.338 30719-31126/org.rhok.linguist V/ION: (59 ms) http://45.79.129.214/interviews/upload: attempting connection to /45.79.129.214:80
02-04 19:15:42.681 30719-31126/org.rhok.linguist V/ION: (402 ms) http://45.79.129.214/interviews/upload: socket connected
02-04 19:15:42.862 30719-30727/org.rhok.linguist W/art: Suspending all threads took: 27.698ms
02-04 19:15:42.868 30719-31126/org.rhok.linguist V/ION: (589 ms) http://45.79.129.214/interviews/upload: 
02-04 19:15:42.877 30719-31126/org.rhok.linguist V/ION: (598 ms) http://45.79.129.214/interviews/upload: request completed
02-04 19:15:43.600 30719-31126/org.rhok.linguist V/ION: (1321 ms) http://45.79.129.214/interviews/upload: Received headers:
02-04 19:15:43.723 30719-31126/org.rhok.linguist D/ION: (1444 ms) http://45.79.129.214/interviews/upload: Response is not cacheable
02-04 19:15:43.723 30719-31126/org.rhok.linguist V/ION: (1444 ms) http://45.79.129.214/interviews/upload: Final (post cache response) headers:
02-04 19:15:43.723 30719-31126/org.rhok.linguist D/ION: (1444 ms) http://45.79.129.214/interviews/upload: Connection successful
02-04 19:15:43.729 30719-31126/org.rhok.linguist D/responseDump: {"status":"500","error":"Internal Server Error"}
02-04 19:15:43.734 30719-31126/org.rhok.linguist D/ION: (1454 ms) http://45.79.129.214/interviews/upload: Recycling keep-alive socket
02-04 19:15:43.879 30719-30727/org.rhok.linguist W/art: Suspending all threads took: 60.024ms
@rockgecko-development
Copy link
Collaborator

Yes, doFileUpload is currently not called. It is pointing to LinguistApplication.getWebserviceUrl() + "api/uploadaudio", which I don't think is correct either. I can't find the media file API endpoint, is it here:
local-linguist-server/app/controllers/interviews_controller.rb ?

When I find the API endpoint, and see if it can handle multiple files at once, I can set the client to use MultiPartFormService instead of the code in UploadInterviewsActivity. Reason being is the former runs as an Android service, so can run in the background without being killed, unlike a AsyncTask running in an Activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants