These are chat archives for ushahidi/Community

22nd
Feb 2019
Simon Njuguna
@simnjuguna_twitter
Feb 22 05:30
Hi there. I am running Ushahidi 3.12.3. platform/api/v3/config works, but platform/api/v3/roles or platform/api/v3/users gives error 401, "title": "The request is missing an access token.
I can't login as admin admin. User can sign up and I can see the details in the database but they can't login either. Have really struggled to sort this, kindly assist
@ushbot Please assist
Ushbot
@ushbot
Feb 22 09:22
[David Losada, Ushahidi] @simnjuguna the 401 for /api/v3/roles and /api/v3/users is expected while you are not logged in yet. What is the result of the /oauth/token request that is sent when trying to log in? http status and error content would be great to know
Simon Njuguna
@simnjuguna_twitter
Feb 22 09:42
platform/oauth/token gives status 400
Simon Njuguna
@simnjuguna_twitter
Feb 22 09:57
firebug shows error: invalid scope
{"error":"invalid_scope","error_description":"The requested scope is invalid, unknown, or malformed. Check the \"*\" scope."}
Ushbot
@ushbot
Feb 22 10:19
[David Losada, Ushahidi] oh… that’s interesting
Ushbot
@ushbot
Feb 22 10:29
[David Losada, Ushahidi] that’s a new one, I’ll do some research and let you know
Simon Njuguna
@simnjuguna_twitter
Feb 22 10:39
ok
The parameters show as below:
client_id ushahidiui
client_secret 35e7f0bca957836d05ca0492211b0ac707671261
grant_type password
password admin
scope *
username admin
Ushbot
@ushbot
Feb 22 10:43
[David Losada, Ushahidi] just a quick check, the web app you are using is also version 3.x, right? not 4.x
Simon Njuguna
@simnjuguna_twitter
Feb 22 10:43
Yes. 3.12
sorry
checking
I set up the current one
Simon Njuguna
@simnjuguna_twitter
Feb 22 11:01
In the meantime let me try with v3.12
Ushbot
@ushbot
Feb 22 12:01
[David Losada, Ushahidi] that’s probably the issue , the oauth processing significantly changed from v3 to v4 , and probably some of those changes affected the request that the client should send
Simon Njuguna
@simnjuguna_twitter
Feb 22 12:22
ok. let me test and get back to you
Simon Njuguna
@simnjuguna_twitter
Feb 22 12:27
Works like a charm!!..Thanks a lot you for pointing out the problem
Simon Njuguna
@simnjuguna_twitter
Feb 22 12:41
Only issue so far is that the search function on the map is not working when creating a post
fredy cuello
@fredycuello_twitter
Feb 22 13:35

Hello, I installed an api and client platform at http://158.69.225.126:3000/.

I'm trying to connect the android application but when I enter this url the application shows the message 'adding' and stays waiting.

Can You check if any configuration is missing?

Diego F. Pajarito Grajales
@diegopajarito
Feb 22 15:39
Well @fredycuello_twitter I just tried with my Android app client and it trows a message "Problem Adding Deployment". "The deployment does not have the necessary configuration to be added into the app. If you are the deployer, please update your developer, please upgrade your deployment...."
@ushbot Is there any limit for offline posts?? I tried collecting 20 offline posts and just the last 8 loaded. I also got some errors when the app tried to post after going back online.
Diego F. Pajarito Grajales
@diegopajarito
Feb 22 15:47
Now after closing the app, the non-posted (about 12) messages are gone.
fredy cuello
@fredycuello_twitter
Feb 22 17:13
thanks @diegopajarito, config.json is in platform-client\App folder, this is the content of file:{
client_id: "ushahidiui",
client_secret: "35e7f0bca957836d05ca0492211b0ac707671261",
backend_url: "http://158.69.225.126:8000",
google_analytics_id: "",
intercom_app_id: "",
mapbox_api_key: "",
raven_url: ""
}
I run client with gulp command, how configure web server to add cors headers?
Manuel Portela
@manuchis
Feb 22 18:53
@fredycuello_twitter Uhm, is that a public server? are you in nginx or apache? see the docs here https://www.ushahidi.com/support/connecting-to-ushahidi-mobile-app
BTW, @fredycuello_twitter it happened to me in ios that app was no responding well, so I've deleted it and reinstalled and worked well after server configuration
fredy cuello
@fredycuello_twitter
Feb 22 23:23
@manuchis I reintalled client in Apache/2.4.37 (Win64) PHP/7.2.14, cors headers are added. new url is http://158.69.225.126:8089.
I installed the android application again and when I want to add the deployment it stays waiting with a message that says "adding", but it does not end