These are chat archives for ushahidi/Community

8th
Sep 2015
Ushbot
@ushbot
Sep 08 2015 01:34
[Henry Addo, Ushahidi] @cmacdonell You could also build it and let it point to the demo API; http://api.demo.platform.ushahidi.com/ Let me know if you need help with regards to that.
Ushbot
@ushbot
Sep 08 2015 02:05
[Flock] <img src="[https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/332273409893335535-1441610077528.jpg](https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/332273409893335535-1441610077528.jpg)" height="24" width="24" /> <strong>Henry Addo</strong><br /><b>What did you accomplish yesterday?</b><br /><ul><li>Ported background processing of pending messages to the new code base of SMSsync.</li><li>Implement getting started screen to only show up on first launch of the app. Subsequent launches it shouldn't show.</li><li>Implement ability to import SMS from the stock messaging app.</li><li>Code review and merged a contributor's code to Platform Android</li></ul><b>What are you planning to do today?</b><br /><ul><li>Port rest of the background services for SMSsync into the code base</li><li>Make import icon functional so when tap it imports the messages.</li></ul><a href="[https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#](https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#)332842649474040141">View this status on Flock</a>
Cam Macdonell
@cmacdonell
Sep 08 2015 04:17
@rjmackay thanks, what about platform-android, is that more or less functional with V3?
I'm trying to get my own install of ushahidi v3 working but with no luck yet. Cannot login (see Sept 05 11:25) re: access token. As you may recall, I like to use Ushahidi in my university courses as an open-source example for my students to hack on.
Ushbot
@ushbot
Sep 08 2015 06:59
[Flock] <img src="[https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/331847692424577491-1441559328017.jpg](https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/331847692424577491-1441559328017.jpg)" height="24" width="24" /> <strong>Vaibhav Bhawsar</strong><br /><b>What did you accomplish yesterday?</b><br /><ul><li>Pushed more updates to the activity page. Now you can select time intervals for which you want to chart the data. <a href="[https://github.com/ushahidi/platform-client/tree/activity-page](https://github.com/ushahidi/platform-client/tree/activity-page)">https://github.com/ushahidi/platform-client/tree/activity-page</a></li></ul><b>What are you planning to do today?</b><br /><ul><li>Working on a solutions project (v2)</li></ul><a href="[https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#](https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#)332990549508227441">View this status on Flock</a>
Ushbot
@ushbot
Sep 08 2015 13:59
[Flock] <img src="[https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/330677596431843772-1441419841749.jpg](https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/330677596431843772-1441419841749.jpg)" height="24" width="24" /> <strong>Seth Hall</strong><br /><b>What did you accomplish yesterday?</b><br /><ul><li>Labor Day Vacation</li></ul><b>What are you planning to do today?</b><br /><ul><li>Platform tasks, dotcom tasks, connect with design team</li></ul><a href="[https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#](https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#)333201761638548042">View this status on Flock</a>
Ushbot
@ushbot
Sep 08 2015 15:58
[Flock] <img src="[https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/332600771352723989-1441649102240.jpg](https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/332600771352723989-1441649102240.jpg)" height="24" width="24" /> <strong>Zack Halloran</strong><br /><b>What did you accomplish yesterday?</b><br /><ul><li>Set up a couple servers, ran the deployment scripts for the platform DB and Job Queue servers in a production environment</li></ul><b>What are you planning to do today?</b><br /><ul><li>Set up some more servers, tweak some Ansible playbooks to add some additional server configs. modify job queue tasks to hierarchical run based on available arguments.</li></ul><a href="[https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#](https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#)333261624800445150">View this status on Flock</a>
Ushbot
@ushbot
Sep 08 2015 16:16
[Daudi Were, Ushahidi] yo @Robbie for the prebuilt client how should i edit config.js?
[Daudi Were, Ushahidi] no rush! when you wake up!
Ushbot
@ushbot
Sep 08 2015 17:26
[Flock] <img width="24" height="24" /> <strong>will</strong><br /><b>What did you accomplish yesterday?</b><br /><ul><li>Completed the media to cdn and resolved the AWS mimetype issue</li><li>Read myself into the feature limitation tickets</li></ul><b>What are you planning to do today?</b><br /><ul><li>Working <a href="[https://github.com/ushahidi/platform/pull/684](https://github.com/ushahidi/platform/pull/684)">ushahidi/platform#684</a> to return availabel status to client</li><li>Adding tests to ensure code is working as expected</li></ul><a href="[https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#](https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#)333306380490375987">View this status on Flock</a>
Ushbot
@ushbot
Sep 08 2015 18:26
[Flock] <img src="[https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/330800457586835905-1441434647905.png](https://s3.amazonaws.com/files.heyflock.com/avatar/60x60/330800457586835905-1441434647905.png)" height="24" width="24" /> <strong>Jason</strong><br /><b>What did you accomplish yesterday?</b><br /><ul><li>Limited contacts and notification search data for users on the API</li></ul><b>What are you planning to do today?</b><br /><ul><li>Continue working on the notifications UI and cleaning up the the API</li></ul><b>What challenges stand in your way?</b><br /><ul><li>Putting the UI together is taking longer than initially estimated</li></ul><a href="[https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#](https://heyflock.com/app/teams/329986239606292677?date=2015-09-08#)333336471182246738">View this status on Flock</a>
Cam Macdonell
@cmacdonell
Sep 08 2015 19:21

Sorry for reposting but this is really holding me up.

Ultimately, I cannot login to the site.

via devtools I see numerous 400 errors for "The request is missing an access token in either the Authorization header or the access_token request parameter" for a API links such as "collections", "forms", "savedsearches". If I point my client at the demo API, I don't see these errors, so perhaps it's some thing with my API platform setup.

Any pointers or debugging tips for narrowing the cause are appreciated.

Ushbot
@ushbot
Sep 08 2015 19:37
[Will, Ushahidi] @robbie would you have 5 mins in 20mins to chat about current task? I have a couple of small questions
Robbie Mackay
@rjmackay
Sep 08 2015 21:53
@cmacdonell which requests are hitting 400s? Can you see the results of the login requests too?
Login should send a request to /oauth/token .. does that succeed and get an oauth token?
If login is failing its that request we need to check on
Cam Macdonell
@cmacdonell
Sep 08 2015 23:04
Here's the apache access log
127.0.0.1 - - [08/Sep/2015:18:58:21 -0400] "GET /index.php/api/v3/config/site HTTP/1.1" 200 735
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/config/site HTTP/1.1" 200 546
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/config/site HTTP/1.1" 200 547
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/config/site HTTP/1.1" 200 547
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/forms HTTP/1.1" 200 575
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/tags HTTP/1.1" 200 575
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/collections HTTP/1.1" 200 575
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/savedsearches HTTP/1.1" 200 574
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/collections HTTP/1.1" 200 574
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "GET /index.php/api/v3/tags HTTP/1.1" 400 3403
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "OPTIONS /index.php/api/v3/config/map HTTP/1.1" 200 546
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "GET /index.php/api/v3/forms HTTP/1.1" 400 3403
127.0.0.1 - - [08/Sep/2015:18:58:23 -0400] "GET /index.php/api/v3/config/site HTTP/1.1" 200 734
127.0.0.1 - - [08/Sep/2015:18:58:24 -0400] "GET /index.php/api/v3/savedsearches HTTP/1.1" 400 3403
127.0.0.1 - - [08/Sep/2015:18:58:24 -0400] "GET /index.php/api/v3/collections HTTP/1.1" 400 3403
127.0.0.1 - - [08/Sep/2015:18:58:24 -0400] "OPTIONS /index.php/api/v3/posts/geojson?order=desc&orderby=created&status=all HTTP/1.1" 200 554
127.0.0.1 - - [08/Sep/2015:18:58:24 -0400] "GET /index.php/api/v3/config/map HTTP/1.1" 200 827
127.0.0.1 - - [08/Sep/2015:18:58:24 -0400] "GET /index.php/api/v3/config/site HTTP/1.1" 200 734
127.0.0.1 - - [08/Sep/2015:18:58:24 -0400] "GET /index.php/api/v3/collections HTTP/1.1" 400 3403
127.0.0.1 - - [08/Sep/2015:18:58:24 -0400] "GET /index.php/api/v3/posts/geojson?order=desc&orderby=created&status=all HTTP/1.1" 400 3769
127.0.0.1 - - [08/Sep/2015:18:58:24 -0400] "GET /index.php/api/v3/config/site HTTP/1.1" 200 734
(Sorry for the massive paste)
That's for accessing the main page

when I try to login, I see

27.0.0.1 - - [08/Sep/2015:19:04:22 -0400] "OPTIONS /index.php/oauth/token HTTP/1.1" 200 327
127.0.0.1 - - [08/Sep/2015:19:04:22 -0400] "POST /index.php/oauth/token HTTP/1.1" 200 551
127.0.0.1 - - [08/Sep/2015:19:04:26 -0400] "OPTIONS /index.php/api/v3/users/me HTTP/1.1" 204 492
127.0.0.1 - - [08/Sep/2015:19:04:26 -0400] "GET /index.php/api/v3/users/me HTTP/1.1" 400 3403

Robbie Mackay
@rjmackay
Sep 08 2015 23:14
Can you have a look in the dev tools in the browser? If you can see the request to api/v3/users/me
What feedback do you get in the UI when you log in? since that looks like your /oauth/token request went through fine.. does it redirect away from login?
Cam Macdonell
@cmacdonell
Sep 08 2015 23:18
Here's what I see on the page with dev tools open http://imgur.com/1tPJT3z
after trying to login with admin:admin
Cam Macdonell
@cmacdonell
Sep 08 2015 23:23
and with the error shown when I click on the 400 error on "me" http://imgur.com/jyALhUN
Robbie Mackay
@rjmackay
Sep 08 2015 23:32
Can you see the headers sent with the /users/me request?
and check what came back in the body of the /users/token request?
Cam Macdonell
@cmacdonell
Sep 08 2015 23:35
Yup
Offhand, do you know how to view the headers in Chrome's dev tools?
Ah, found it
Robbie Mackay
@rjmackay
Sep 08 2015 23:39
In the network tab, click on the request and theres a headers tab
:)
also probably worth checking your user table in the DB. You should have
admin $2y$15$Ha7nHVZApHXfzhrD2HCukuUjjQhIUzPJ0JNWk7KooT6edQFTbeWr6
Cam Macdonell
@cmacdonell
Sep 08 2015 23:41

Here's the 'me' request

http://i.imgur.com/wib3pH1.png

And the token response

http://i.imgur.com/8cTsJsS.png

Cam Macdonell
@cmacdonell
Sep 08 2015 23:47
and yes the users table has that entry for 'admin'
A more complete header from the /me request
http://i.imgur.com/kBHnOXV.png
Ushbot
@ushbot
Sep 08 2015 23:50
[Robbie Mackay, Ushahidi] Right.. the access token coming back looks fine
Cam Macdonell
@cmacdonell
Sep 08 2015 23:50
yes it does
Ushbot
@ushbot
Sep 08 2015 23:50
[Robbie Mackay, Ushahidi] You need to check the 2nd /user/me request
[Robbie Mackay, Ushahidi] the browser does a preflight OPTIONS request followed by the real GET
[Robbie Mackay, Ushahidi] and the first request doesn't send auth headers or anything.
Cam Macdonell
@cmacdonell
Sep 08 2015 23:56
I notice that the proper access token is under "Authorization" in the header
Robbie Mackay
@rjmackay
Sep 08 2015 23:58
yea that all looks perfectly fine.. which leaves me super confused
Cam Macdonell
@cmacdonell
Sep 08 2015 23:58
this is in a VM, is there any chance that clock weirdness could affect it? Although the browser is running in the same VM