Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by mamoun hourani -
Number of replies: 10
it appears in moodle mobile app that I can't connect to my website ( https://elearning.dt-ads.com )
I tried everything I saw in the posts before
and I can't understand the problem
my ssl is not self-signed and it's perfect

everything seems fine but I can't connect to moodle mobile app

please help .. 

here's an Admin user if someone can help :
Edited by Dani: I removed the credentials for security.

.....

I'm using Moodle 3.1 (Build: 20160523) , and latest moodle mobile app for both android and ios

Thanks in advance

(Editado por Daniel Palou - envío original viernes, 17 de junio de 2016, 07:25)

Average of ratings: -
In reply to mamoun hourani

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers

Hi mamoun,

the problem is the login script is returning something unexpected. You can check it in here:

https://elearning.dt-ads.com/login/token.php?username=a&password=b&service=c

It should return a JSON object saying the login isn't valid, like this:

http://school.demo.moodle.net/login/token.php?username=a&password=b&service=c

Kind regards,

Dani

In reply to Dani Palou

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by mamoun hourani -

Hello Mr Daniel

Thank you very much for your help, I've seen into these problem , and it seems that CAS (SSO) server is not configured properly , so I disabled it and now it returns normal JSON object through this link:

https://elearning.dt-ads.com/login/token.php?username=a&password=b&service=c

... after fixing this, the mobile app still unable to connect..

I'd appreciate help sir

thanks

In reply to mamoun hourani

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by mamoun hourani -

#Edit: website changed from https;//elearning.dt-ads.com to https://e.dt-ads.com due to DNS Problems

In reply to mamoun hourani

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

can you describe what is happening now? I see that the app open a browser to authenticate the user, after the user is authenticated in the browser the app won't open?

Juan

In reply to Juan Leyva

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by mamoun hourani -

Hi sir, not that exactly, when I open the mobile app

I type my website http://e.dt-ads.com/

then I proceed to login information

what ever I type in the login info, it gives me something says : Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

I tried to fix everything , I checked everything but I can't understand the problem
thanks in advance sir

In reply to mamoun hourani

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers

Hi mamoun,

if I open the website http://e.dt-ads.com/ in a browser I cannot see any Moodle, there's nothing in that URL. 

In reply to Dani Palou

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by mamoun hourani -

I was just fixing the problem, the link is back to https://elearning.dt-ads.com

I contacted my server hosting developers and they advice to turn off (mod_security) feature from hosting cpanel

now the app is working completely fine, thank you very much sir for your help

I'm still having a problem with the mobile notification, I tested the app in IOS 9.2 but I can't recieve any notification
is it okay if I asked about this here or should I post a new sub ?

Thanks

In reply to mamoun hourani

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

have you tried in Android? Is the Mobile notifications settings correctly configured in your site?

Please review https://docs.moodle.org/31/en/Mobile_app_notifications

Juan

In reply to Juan Leyva

Re: Getting Error when login- Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4

by mamoun hourani -

Hello sir


yes I tried it , and still having the same problem
I get push notifications only for messages

but the notification in the app show nothing

also I noticed in my website, when I open Configure notification methods for incoming messages

it says that : "No registered devices. Devices will automatically register after you allow a Moodle iOS app to receive push notifications."
even tho that theres devices in sql tables

I noticed a problem with the messages also I think it's involved:
after sending an instance message , it returens Unexpected end of JSON input

that was the details 

SyntaxError: Unexpected end of JSON input    at Object.parse (native)    at Object.Y.namespace.parse (https://elearning.dt-ads.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1467088608/mcore-debug.js:24483:18)    at SENDMSGDIALOG.success (https://elearning.dt-ads.com/theme/yui_combo.php?3.17.2/handlebars-base/handlebars-base.js&3.17.2/handlebars-compiler/handlebars-compiler.js&m/1467088608/core/handlebars/handlebars-debug.js&m/1467088608/core/notification/notification-ajaxexception-debug.js&m/1467088608/core/notification/notification-alert-debug.js&m/1467088608/core/notification/notification-exception-debug.js&m/1467088608/core_message/messenger/messenger-debug.js:3401:39)    at _notify (https://elearning.dt-ads.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1467088608/mcore-debug.js:13680:35)    at notify (https://elearning.dt-ads.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1467088608/mcore-debug.js:13709:24)    at _notify (https://elearning.dt-ads.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1467088608/mcore-debug.js:13372:17)    at _procSubs (https://elearning.dt-ads.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1467088608/mcore-debug.js:13498:36)    at fireSimple (https://elearning.dt-ads.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1467088608/mcore-debug.js:13465:18)    at _fire (https://elearning.dt-ads.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1467088608/mcore-debug.js:13447:29)    at Object.fire (https://elearning.dt-ads.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1467088608/mcore-debug.js:14600:22)

thanks in advance sir