edX Android Mobile App is not working

400 views
Skip to first unread message

siva...@teachedison.com

unread,
Jul 23, 2015, 12:12:38 PM7/23/15
to Open edX operations
Hi,

I have done the following steps for edx mobile app setup,

1.) Installed edx fullstack on azure Ubuntu VM

2.) Have changed the following values in lms.env.json

"FEATURES" : {
    ...
    "ENABLE_MOBILE_REST_API": true,
    "ENABLE_OAUTH2_PROVIDER": true,
    "ENABLE_COMBINED_LOGIN_REGISTRATION": true
}

3.) Created oauth2 from my edx admin panel
       url : http://my azure vm name/api/mobile/v0.5/?app=android
           redirect url : same as url
           client type : public

4.) Cloned edx-app-android in my windows machine.

5.) Change the following values in my config file

       API_HOST_URL: 'http://10.0.2.2:8000' // Here i placed my azure ip running edX
       OAUTH_CLIENT_ID: ''  // Here i placed my oauth id generated using step 3

​6.) Enabled port 8000 in my azure VM endpoints

But, while running the application in android studio it shows following error

org.edx.mobile.http.Api﹕ Auth response= {"error_description": "A secure connection is required.", "error": "invalid_request"}

Can some one help me to resolve this issue? Looking forward. Thanks.

Akiva Leffert

unread,
Jul 23, 2015, 5:10:31 PM7/23/15
to opene...@googlegroups.com, KalyanaKannan p
It looks like your instance is set up to use SSL for oauth, but your server isn’t set up for SSL. First you should try using ‘https’ instead of ‘http’. If that doesn’t work you need to either configure SSL on your server (recommended) or disable the check by adding the following additional feature flag:

"OAUTH_ENFORCE_SECURE": ""

-Akiva Leffert


On Jul 23, 2015, at 12:07 PM, siva...@teachedison.com wrote:

Hi,

I did the following steps for edx mobile app setup,

--
You received this message because you are subscribed to the Google Groups "Open edX operations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/0b2e0924-6ae2-46bf-9d97-661cc843b9be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kalyana...@teachedison.com

unread,
Jul 24, 2015, 1:51:39 AM7/24/15
to Open edX operations, ak...@edx.org
thanks for your reply, we already disable OAUTH_ENFORCE_SECURE=false

Akiva Leffert

unread,
Jul 27, 2015, 11:40:39 AM7/27/15
to KalyanaKannan p, opene...@googlegroups.com
Hrrrm.
I’m not an expert on that codepath, but if you’re still seeing that error, it probably still thinks that SSL is required. Maybe you have the flag misformatted? The documentation says

"OAUTH_ENFORCE_SECURE": “"

not

“OAUTH_ENFORCE_SECURE"= false

as you say in your email. It may be they’re the same in the end, or that you did the first thing and weren’t clear in your email, but it seems like a place to start.

-Akiva Leffert


> On Jul 23, 2015, at 7:36 PM, KalyanaKannan p <kalyana...@teachedison.com> wrote:
>
> Frist thanks for your reply, I already disable this flag by setting value to false. Then also it'show this error.
> --
> p.kalyanakannan
> +91-9597413110
>

kalyana...@teachedison.com

unread,
Jul 27, 2015, 11:50:50 AM7/27/15
to Open edX operations, ak...@edx.org
thank you for your reply, I use a self-signed certificate for SSL.is there any issue. after configuring my certificate, i remove the following flag. but now it's showing the error about SSL.
Reply all
Reply to author
Forward
0 new messages