Mobile App not working after HTTPS

Mobile App not working after HTTPS

by SECOMV EMARF -
Number of replies: 6

Hi, Folks,

I have a Moodle Mobile App installed on my Android 6.0. It was working fine for HTTP. 

When I changed to HTTPS (using Let's Encrypt certificate), it stopped working and now I get the error message "Detectado redirecionamento não suportado. A execução do script foi cancelada" (Non-supported redirecting. Script execution aborted).

It works fine on Chrome desktop.

Any ideas about what is going on?

My Moodle version is 3.4.1 with the latest patch installed.

Thank you very much.

Regards,

Luiz

Average of ratings: -
In reply to SECOMV EMARF

Re: Mobile App not working after HTTPS

by SECOMV EMARF -

Hi, Folks,

I took the comment from the parameter $CFG->sslproxy = true in the config.php file and now I can see the login and password fields.

When I try to connect I get the message: "Não é possível conectar-se: Verifique se digitou a URL corretamente e se seu site usa o Moodle 2.4 ou posterior" (Cannot Connect: Verify that you have typed correctly URL and that your site uses Moodle 2.4 or later)

The URL was typed correctly and our Moodle is 3.4.1. 

Does anybody know what can be happening?

Thanks

Luiz


In reply to SECOMV EMARF

Re: Mobile App not working after HTTPS

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

Hi,

do you have an HTTP or HTML redirection from http to https?

This is a typical problem, you must disable those kinds of redirections because the app is unable to follow redirections (there is a technical reason for that, and we can't solve it)

In reply to Juan Leyva

Re: Mobile App not working after HTTPS

by SECOMV EMARF -

Hello, Juan,

There is the suggested redirection:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourmoodle.com/$1 [R,L]
Is this one you are mentioning? Could it be the reason? In case it is, what would you suggest?

Thank you.

Regards,

Luiz

In reply to SECOMV EMARF

Re: Mobile App not working after HTTPS

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

Hi,

you should try first if disabling the redirection makes the app work, in some cases, you will have to disable it completely

In reply to Juan Leyva

Re: Mobile App not working after HTTPS

by SECOMV EMARF -

Hi, Juan,

It was a problem in the certificate chain. The infrastructure guys repaired it and now I can log on.

Thank you very much for your help. I really appreciate.

Regards, 

Luiz


In reply to SECOMV EMARF

Re: Mobile App not working after HTTPS

by Lucio Monter -

Hello everybody,

I hope this could help someone. I had the same problem, moodle app wasn't able to reach the moodle site.

In the beginning I thought it was a problem with redirection from HTTP to the HTTPS, as Juan suggested, but even disabling it wasn't helping.
But thanks to this post I find out there was a problem with certificate CHAIN (not with certificate itself, but with the CA certificate).
I was able to find out with the help of online tools like ssl checker and similar.

The strange thing is that it was working correctly on iOS, the problem was only on Android devices (which are usually more tollerant....)

So, just in case you have the same problem (HTTPS: iOS -> OK && Android -> KO) just check ssl certificate chain (and fix it of course).

Regards

Lucio