Closed jshslsky closed 11 years ago
I'm a master student. I've decided to write my master thesis about doing some analytics for football players. We'd like to import the data to ohmage and doing analytics by using R language.
I found myself not productive because I didn't manage to find a high-level description of the hierarchy of the source code. I think it would be better if you can give me some simple task to work on ohmage.
Thank you in advance.
Hi, I don't think you need to use ohmage to do this. You can use Open CPU directly. @jeroenooms https://public.opencpu.org
Thanks for the rapid reply. We need the survey anyway because the head coach will hand out the survey to each player after each match. I would like to use ohmage as a foundation.
Well, the easiest way to use ohmage in that case is to have the players install the ohmage app. You can script your survey in XML.
Yes. I did it. But I was stuck at the login process. The app said "Unable to communicate with server"
I set up the ohmage server locally. The client app (2.16.2) couldn't connect to the server. My server address is https://iad0.cs.uit.no/ohmage. It's not a public hostname; But I can access the website through the explorer on my phone.
I installed ohmage-server and ohmage-standalone.
Did you try the IP address?
Hi @zhangway, I think the trouble you're having here is because the ohmage android app appends /app to the server address you've entered, and makes all requests to that endpoint (in this case: https://iad0.cs.uit.no/ohmage/app). If your ohmage server isn't listening there, that is likely to be your problem. Try modifying the actual endpoint ohmage runs at to end in /app -- hopefully that will fix the issue.
The same error. :(
@stevenolen Thanks for your explanation. I have a doubt. I saw the source code of android-lib. The method handlelogin in AuthenticationUtilities.java. I didn't see /app was appended to the server address.
Perhaps the code tries both situations. I'm not too familiar with the phone source to point that out.
The other suggestion is that I notice you are using HTTPS. are you using a real cert, or a snakeoil cert? If you're using the snakeoil cert, it's likely that the phone's browser will allow you to visit the page, but the phone app itself will reject.
Are you familiar with the android sdk? Could you run logcat with the device when making login requests and paste the output?
It gets the same error when using both https and http. I'm using snakeoil cert when the app connects to https://.
I pluged in my android phone and ran "adb logcat AuthenticationUtilities:V *:S". But no log was extracted.
C:\adt-bundle-windows-x86_64\sdk\platform-tools>adb logcat AuthenticationUtilities:V *:S --------- beginning of /dev/log/system --------- beginning of /dev/log/main C:\adt-bundle-windows-x86_64\sdk\platform-tools>
@zhangway, I don't get any log in my stream when logging in and limiting by AuthenticationUtilities. try logcat without filtering and look for some 'OhmageApi' items.
I couldn't paste here because of the comment limitation. Could you please send an email to my box? wzh000@post.uit.no. Thanks a lot.
@zhangway so that perhaps others can use this to debug in the future, a public method of sharing data like that is preferred. Could you use pastebin.com to send the log snippet?
Done. Please search by "ohmage app login failed log".
can you send the link along? I'm not able find it by searching with that query..
ah, my fault -- I didn't realize you were running the opencpu-based ohmage installer. In this configuration, ohmage server is served from the /app endpoint and the gwt-frontend is served from /ohmage (which was where my confusion came from before.
If you put exactly: http://iad0.cs.uit.no/ (or the ip address directly: http://129.242.19.117/ ) in the server selection (most importantly, without any endpoint) it will work. I just tested with your server (using the IP directly) and received authentication failure, rather than unable to communicate with the server.
It said the same error.
can you make a dummy account for me to test? When I set my server selection to http://129.242.19.117/ (note the trailing slash, and non-https) I was able to communicate from my device to your server just fine..
User name: user_dummy Password: 12345678
Using ohmage 2.16.6 (from the play store) I was able to use your server to log in with that information. I've attached a screenshot with exactly what I typed. Perhaps you are running another app on your device that may inhibit off-device communication in some way?
I logged in after reboot. :+1:
Could you please tell me why it failed on those two conditions:
I had been stuck for three days....
absolutely!
Hopefully this helps!
I've decided to use ohmage for my master thesis and do some customization on ohmage. It's really difficult to sort out the hierarchy by looking though the source code.
Could you please send me some high-level documentation? I'd like to be deeply involved in this project. :)
@stevenolen Thanks a lot for your step-by-step help of digging into the issue with me. Possibly there might be more question to you in the future. Hope it's not disturbing you~
@zhangway sure!!! we're happy that folks are using ohmage :+1:.
The majority of the documentation that I know of is in the wiki (existing apis, ACL and system structure). From the development side, that's the best place for answers.
This issue was originally for something else and it turned into a big debug session related to SSL certificates and the ohmage Ubuntu installer.