Can't log on to my site

Can't log on to my site

by Gus Hagelberg -
Number of replies: 22

I downloaded the Moodle App for the iPhone on to my iPad but am not able to log on to my moodle 2.1 site. We are using https. Is that perhaps the problem. Do I need to change anything on the moodle end to make it work?

Thanks,

Gus

Average of ratings: -
In reply to Gus Hagelberg

Re: Can't log on to my site

by Mark Davis -

You need to be on 2.1.x and then check this thread (my last post) to be sure everything is properly enabled (thanks to Dongsheng).

In reply to Mark Davis

Re: Can't log on to my site

by Gus Hagelberg -

I activated all the options as noted in the link above and I still can't log onto my site with my iPad and the Moodle App.

Ány ideas?

My site is only accessable within out university network. Could that be the problem?

Gus

In reply to Gus Hagelberg

Re: Can't log on to my site

by Jérôme Mouneyrac -

Hi,

if your iphone/ipad can access your moodle site with safari, then the mobile app should be able to access it. If your phone safari can not, then the app can not too.

If Safari can access the 2.1+ Moodle site then:

- can you access from safari : http://yourmoodlesite/login/token.php ? This page must not be blocked by your web server/firewall. If you access it like that, this page should display an error message saying username required (when Moodle debug mode set to 'developer').
- can you access from safari: http://yourmoodlesite/webservice/xmlrpc/server.php ? This page must not be blocked by your web server/firewall. If you access it like that, this page should display an error message saying access control exception (when Moodle debug mode set to 'developer').

If these two pages return the above error messages, then you site is available. In this case, let us know what error message you get.

Cheers,

Jerome

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by Gus Hagelberg -

I can access my site on the iPad with Safari. We have a public key certificate that I first have to approve, then I can log in.

When I try to access the site from safari through : http://yourmoodlesite/login/token.php? then I get the error message

{"error":"A required parameter (username) was missing", stacktrace":null,"debuginfo":null,"reproductionlink":null}

When I try to access the page from Safari

access from safari: http://yourmoodlesite/webservice/xmlrpc/server.php?

I get the error message:

faultCode()faultStringAccess control exception

 

Thanks

Gus

 

In reply to Gus Hagelberg

Re: Can't log on to my site

by Jérôme Mouneyrac -

Hi Gus,
you seem to be all good for using the mobile app. What error message do you get on the mobile app? 

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by Gus Hagelberg -

Hi

 

It's just a simple "Cannot connect to this site" message.

Could it have to do with the authentication settings? It doesn't work with our without LDAP.

Gus

In reply to Gus Hagelberg

Re: Can't log on to my site

by Jérôme Mouneyrac -

Hi Gus,
actually "My Moodle" app can only authenticate against the manual 'auth' plugin. We do not support other authentication methods like LDAP yet. We are working on it: http://server3.moodle.com/browse/MOBILE-113

sorry for this inconvenience, we omitted it for the first version and we hope to get it ready for 1.1.

If you create a user from Moodle (manual authentication method), then you should be able to connect with this user.

Cheers,
Jerome 

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by Jérôme Mouneyrac -

Ah maybe I miss read, did you mean that it doesn't work with the manual authentication method?

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by Gus Hagelberg -

Yes, I did also try it with just the manual authentication and that also didn't help.

Gus

In reply to Gus Hagelberg

Re: Can't log on to my site

by Jérôme Mouneyrac -

argh I'm running out of clue. Try to call http(s)://YOURMOODLE/login/token.php?username=USERNAME&password=PASSWORD&service=moodle_mobile_app

It should tell you what is wrong.

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by Gus Hagelberg -

Hi,

with this address in Safari I get this result:

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

In reply to Gus Hagelberg

Re: Can't log on to my site

by Jérôme Mouneyrac -

Hi Gus,
sorry to be a bit late.

Something in Moodle is trying to redirect you to another page. The script doesn't allow any redirection and so you see this error message.

I checked but can not find why Moodle redirects you. Are you sure that the user that you are testing has for authentication method: manual. (to see it, as admin, try to edit this user. 'auth' should be set to 'manual'). I think the redirection error message could be because you are testing with a user using another authenticaton plugin than manual.

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by J. Rutledge -

I also have LDAP authentication and can't log in. However, I can log in under the Admin login. While that let's me see how good this will be, it means that my teachers and their students can't use it yet.

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by bijay poudel -

web service must be enabled in advance feature. what does this mean? how can i enable in my mobile samsung galaxy dous?

In reply to Gus Hagelberg

Re: Can't log on to my site

by Graham Moir -

I have the same problem :

- running Moodle 2.1

- Web services enabled

- not an https:// site

- have the latest My Moodle iPhone/iPad app recently updated to improve error messages

- Can login to the site on the iPad using Safari or Dolphin browsers

- Get the username/password error and directed to contact the administrator when trying to login with the app.

Not a big issue as everything can be done via the browser, but thought I should report this so that it's not seen as an isolated incident.

 

In reply to Graham Moir

Re: Can't log on to my site

by Jérôme Mouneyrac -

Hi Graham,
- check the Enable mobile web service feature is ON (Admin > Plugins > Web services > Manage services )
- only connect with users who have an authentication method set to 'manual' (As administrator, edit the user, the 'auth' field should be set to 'manual'). There is an issue for this current authentication restriction: MDL-29583 

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by Alberto Para -

Hi there!

I'm new here and I have the same issue...

When I try to acces to my moodle site form the iPhone official application i get this error message:

Please check your login detail or ask your site administrator to check moodle configuration.

Mobile web services are enablen in my site, and user autentication method is set to manual as you said.

When I try to access to token.php (with the correct params, of course) using chorme, the token is shown in the response:

{"token":"6d056544345..."}

But doing the same with firefox... a window to download token.php appear!! I'm using the latest version of moodle form mac, downloaded today and I'm not using https.

Taking a look to the generated traffic (usign wireskark) when I try to login using the official mobile web app I noticed the next error:

Unsupported redirect detected, script execution terminated

I've attached a traffic capture, maybe it will help. What I'm missing?

Thanks in advance

 

Edit: The token.php file that firefox tries to download, contains the same info that is displayed in google chorme performing the same request, but... why FFx are trying to download the file instead of showing it? Myabe this is the "unsupported redirect"

In reply to Alberto Para

Re: Can't log on to my site

by Jérôme Mouneyrac -

Hi Alberto,

thanks for your report. I created an issue for this bug as you are now two to report this error message: MDL-29805

An idea: maybe your web server doesn't allow you to execute the script?

I'll try to reproduce again anyway. We can switch further discussion into the tracker issue (MDL-29805). Thanks.

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by Alberto Para -

Thanks Jerome!

I think that my server is fine, I'm using a all-in-one package provided in moodle so I supose that the configuration is the correct, anyway a request to token.php as you sugested works fine if it is performed using chrome.

I think this is simple to reproduce... install moodle (Mac OS Lion), enable mobile web services and try to connect from yout iPhone.

Thanks for the support ;)

In reply to Jérôme Mouneyrac

Re: Can't log on to my site

by Alberto Para -

I noticed this error in apache_error_log

Invalid method in request \x16\x03\x01

Maybe the problem is that the moodle mobile app is trying to talk with moodle using SSL and it is not enabled