Error Message when logging in to Mobile App

Error Message when logging in to Mobile App

by Stuart Jones -
Number of replies: 6

Hello,


My website is jonesmath.com, and I have been working on a site rework for the new school year, including getting a valid certificate for my site. Now, however, when I try to connect to the mobile app, it says "Cannot connect: Verify that you have typed correctly the URL and that your site uses Moodle 2.4 or later."


I have looked at the FAQ and the forum posts in this forum, and I have no idea what to do to fix the problem. Does anyone have any idea what I should do to fix the problem? Thanks!

Average of ratings: -
In reply to Stuart Jones

Re: Error Message when logging in to Mobile App

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

Hi,

the app tries to verify if your site is a valid Moodle site doing a request to:

http://www.jonesmath.com/login/token.php?username=a&password=b&service=c

But, it seems that you web server is doing a redirection when that page is requested to:

https://jonesmath.comlogin/token.php?username=a&password=b&service=c

That obviously is an invalid page, this is the reason the app doesn't work (because that weird redirection)

If you are using a hosting provider, this may be caused by some security extension enabled in your hosting provider

Juan

In reply to Juan Leyva

Re: Error Message when logging in to Mobile App

by Just H -

Hi Juan

"That obviously is an invalid page..."

Does that mean if I want to run a site fully over SSL using the workaround here it will break Moodle Mobile?

H

In reply to Juan Leyva

Re: Error Message when logging in to Mobile App

by Stuart Jones -

I'm not sure I understand what you are saying. The site is supposed to redirect to https so that it is secure. 

In reply to Stuart Jones

Re: Error Message when logging in to Mobile App

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

Redirect to https is good, but that redirection is not working:

When I tested it it was redirecting to:

https://jonesmath.comlogin/token.php?

Please, note that between .com and login a / is missing

If you fix the redirection, it should work

BTW, I tested it again and now it returns a 404 (Not found)

Juan

Average of ratings: Useful (2)
In reply to Juan Leyva

Re: Error Message when logging in to Mobile App

by Stuart Jones -

I'm afraid I'm not sure what to do. The redirect for ssl is simply a 301 redirect as a .htaccess file. I own the server, so I can modify anything I need to, I'm just not sure what needs to be modified. I see what you mean about the app being redirected to the wrong place, but I don't see how the 301 would do that.