Android error - Unsupported redirect detected

Android error - Unsupported redirect detected

by Mario Igrec -
Number of replies: 5

We have Moodle 2.9.1+ (Build: 20150716)

Hi guys, got the error "Unsupported redirect detected, script execution terminated" when trying to log in, on the android play store app I downloaded and won't let the me/user go further. If relevant, I was trying on an android galaxy II tablet.

Could this be related to the website using a subdomain (ie. lms.academy247.co.za)? It's the only thing I was wondering about, however the site login is fine. I only enabled the mobile web service today.

We really want to promote the "moodle mobile" side of things to the students.

Suggestions will be appreciated, thank you.

Average of ratings: -
In reply to Mario Igrec

Re: Android error - Unsupported redirect detected

by Mario Igrec -

This issue is also experienced on the Apple iOS app.

Also to mention, we have the latest PHP 5.6 on the server, if that's relevant.

In reply to Mario Igrec

Re: Android error - Unsupported redirect detected

by Frédéric Massart ⭐ -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Mario,

would you be able to send me a test login/password via private message (or mail: fred@moodle.com) so that I can try to reproduce the problem? Thanks!

Fred

In reply to Frédéric Massart ⭐

Re: Android error - Unsupported redirect detected

by Mario Igrec -

Thanks Frédéric, email sent.

In reply to Mario Igrec

Re: Android error - Unsupported redirect detected

by Frédéric Massart ⭐ -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Mario,

I have tested using Android 4.1, 5.0, Google Chrome and Google Chromium (insecure) and I could always connect and use the site without any problem.

One thing I noticed, which might be a source of problems in some scenarios, is that the domain using HTTPS is reachable, but has an expired certificate. But also, that HTTPS site is not Moodle.

Maybe you should investigate there and remove the SSL version of your site, so that the mobile app does not get confused.

Lastly, applying the patch we introduced here might help: MDL-50107

Let me know how you go.

Cheers!

Fred

In reply to Frédéric Massart ⭐

Re: Android error - Unsupported redirect detected

by Mario Igrec -

Hi Fred, apologies for the late reply. Been a busy period for me.

I checked the patch instruction on github, but the change was already in the token.php file (addition of header(...) line). Hopefully there isn't anything else I missed.

It still gave me the following error/result in the test CORS.html file

Response...

{"error":"Unsupported redirect detected, script execution terminated","stacktrace":null,"debuginfo":null,"reproductionlink":null}


I guess that only leaves the SSL side to check. Did you see the HTTPS URL to which you say it's not a moodle site? However, I know Joomla is linked to moodle with Joomdle plugin, if that's perhaps what you saw?

Thanks.