Moodle Mobile gives error

Moodle Mobile gives error

by David Deel -
Number of replies: 7

Hey all,

I am having some issues when trying to connect the moodle app iOS to my server for the initial setup. It was working fine as of the beginning of August as I used it several times with the new students to show them how to use the app. With the update to iOS 9 I went back to make sure everything they needed was working correctly and here I found a problem.

If the student had already activated the app, signed in once they seem to be ok. They can access everything just fine but if somebody has not used the app before when you try to connect to the server it give the cannot connect to server error, asking to check the url and that it is using 2.4 or later.

I was running on 2.8 but with the error I decided to go ahead and do the upgrade maybe something had happened but still after the update to 2.9.2 still the same issue. 

Average of ratings: -
In reply to David Deel

Re: Moodle Mobile gives error

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

Hi David,

there were some errors with the app running on iOS9, one of them affecting requests to sites without SSL. Last Saturday we released a version that fixes several issues. Can you please verify that your Moodle Mobile app is updated to the latest version?

If the error persists, please send me your Moodle URL and a test account via private message so I can test it.

Regards,

Dani

In reply to David Deel

Re: Moodle Mobile gives error

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

Thanks for the credentials,

this isn't an iOS9 issue, it fails in Android too. I've opened an issue about this:

https://tracker.moodle.org/browse/MOBILE-1237

The problem is that a server call takes too long to respond. In the next release we'll increase the timeout value of this call. With this increased value I can access in your site but it takes a while to do so. 

This call to login/token.php is taking 23 seconds to respond, that's not normal. Your admin should verify why is it taking that long.

Regards,

Dani

In reply to Dani Palou

Re: Moodle Mobile gives error

by David Deel -

Thanks for the help,

I will check the sever to see if there is a particular reason why it is taking so long.

I am the only one that works on the server and nothing has changed since it was working so I am not sure where to go to see what is wrong.

In reply to David Deel

Re: Moodle Mobile gives error

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

Actually, it worked before because the app didn't send any data when checking if the site exists. Let me explain myself.

When a user types a URL in the app, it sends a request to check if the site exists. In previous versions of MoodleMobile we didn't pass any param to this call, so the script immediately rejected the request.

In MOBILE-1144 we decided to send some fake data to this script to be able to use CORS. So now this script checks if the username exists, and that's slower.

You can manually emulate this call:

<YOURMOODLEURL>/login/token.php?username=a&password=b&service=c

You'll notice that if you remove the params then the script immediately rejects the request.

Regards,

Dani

In reply to Dani Palou

Re: Moodle Mobile gives error

by nikhil jagatiya -

Hello Daniel,


 I'm facing same problem as  David face. Can you help me?

 I already set all the settings for the web-services from the Administration side. And also assign   mobile web-service_token to user. When I try to access my using Moodle Mobile App and login with the  Username Password. It gives me same error.

 Error: Cannot connect : verify that you have typed correctly the URL and that your site must uses Moodle 2.4 or later

Right now I'm using Moodle 2.9 and my site URL my site contains "http://".

Can You help me what I'm missing?

 Thank you  ['}



In reply to nikhil jagatiya

Re: Moodle Mobile gives error

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

Hi nikhil,

can you please send me your Moodle URL and a testing account via private message so I can test it?

Thanks,

Dani

In reply to Dani Palou

Re: Moodle Mobile gives error

by nikhil jagatiya -

Hello Daniel,


  Thank you for reply. I sent the credentials in private message.

  Please check in your inbox.

  Let me know if you can find something in Moodle Mobile App

 Thank you

 Nikhil