Moodle Mobile App 3.9 'Cannot connect'

Moodle Mobile App 3.9 'Cannot connect'

by John Ultra -
Number of replies: 8

Hi All,

I've enabled the web services on our Moodle installation e.g., Enabled web services, enabled default web service, enabled protocols (REST). However, I can't still make the mobile app to work. Every time I try to connect to the site using the app, it always says 'Cannot connect'.

Is there any else that I am missing? Please let me know.

Thank you. 

Attachment 106390483_211299253361509_5007059012621772383_n.jpg
Average of ratings: -
In reply to John Ultra

Re: Moodle Mobile App 3.9 'Cannot connect'

by Isabel Renedo -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
In reply to Isabel Renedo

Re: Moodle Mobile App 3.9 'Cannot connect'

by John Ultra -

Hi Isabel,

Thank you for your response. I went through the checklist on the page you mentioned, and I can confirm that none of the issues listed were present on the site i.e., 

  • HTTPS cert is ok, 
  • debugging is None
  • using Apache so IIS item does not apply
  • can access website on chrome without problem
  • not using external db for authentication

I tested making a REST request (i.e., login/token.php) via web browser and it seems to work i.e., it gives me the expected response. 


Btw, is it required to register the site on the Apps Portal for it to work?

In reply to John Ultra

Re: Moodle Mobile App 3.9 'Cannot connect'

by Isabel Renedo -
Picture of Moodle HQ Picture of Particularly helpful Moodlers

Hello John

Can you double check that you activated web services for the Moodle app? (Site administration > Mobile app > Mobile settings > Enable web services for mobile devices)

Kind regards,

Isabel


In reply to Isabel Renedo

Re: Moodle Mobile App 3.9 'Cannot connect'

by John Ultra -

Hi Isabel,

I can confirm that I did in fact enabled web services, the default moodle_app external service, and Rest Protocol. As I've mentioned, I tested sending an API request via web browser (i.e., login/token.php) and it did give the expected response. 

Is there a way to see more details of the error message on the mobile app?

Best, 

John

In reply to John Ultra

Re: Moodle Mobile App 3.9 'Cannot connect'

by John Ultra -
Hi Isabel,

Thank you for looking into this issue. I temporarily disabled the web services-related settings on the instance at the moment hence the error. I have re-enabled the settings again, and I hope you could test it one more time.

I test the API via web, and it seems to work as I've mentioned before. However, the 'Cannot connect' error still shows when using the mobile app.


PS: If there's any way to delete the references to the URL of the site in this forum, I would really appreciate it. smile

Thank you,

John
In reply to John Ultra

Re: Moodle Mobile App 3.9 'Cannot connect'

by John Ultra -
Hi Isabel,

The setting for web services is different for the mobile web services. OMG, I did not see and understand this the first time. This is what I missed in the configuration. It works now! Thank you very much.

Best,

John
In reply to Isabel Renedo

Re: Moodle Mobile App 3.9 'Cannot connect'

by Bafana Radebe -

I'm also getting the same error as John above, my site is still on 3.8 though. I have followed all the suggestions above i.e. enabling web services, disabling debug etc. But I still can't access my site from the mobile app. I can access this from a browser on my phone. Can you please assist. 

In reply to Bafana Radebe

Re: Moodle Mobile App 3.9 'Cannot connect'

by Isabel Renedo -
Picture of Moodle HQ Picture of Particularly helpful Moodlers
Hello Bafan

Please revise the admin guide (https://docs.moodle.org/en/Moodle_app_guide_for_admins) as well as the FAQs (https://docs.moodle.org/en/Moodle_app_FAQ#I_can.27t_get_the_app_to_work._What_can_I_do.3F). Please check that your certificate is fine: SSL Checker (https://www.geocerts.com/ssl_checker) and SSL Server Test (https://www.ssllabs.com/ssltest/analyze.html). All the checks must be ok, including the "Certificate Chain Complete", otherwise the app might not work.

See the Moodle Mobile debugging WS requests guide: https://docs.moodle.org/dev/Moodle_Mobile_debugging_WS_requests

Kind regards,

Isabel