Connection issue moodle mobile

Connection issue moodle mobile

by Sebastián Paciuk -
Number of replies: 7

Hi everyone, I recently migrated my moodle site from version 2.4.6 to 3.3.3.


The issue is that in version 2.4.6 I was able to connect to my site using the official moodle mobile app for Android (the app version is 3.4.0 ). But now with moodle version 3.3.3 I can't connect to my site, because when I enter my moodle site URL and press connect I get the error "Coding error detected, it must be fixed by a programmer: Invalid json in request: no error". I'm using php 5.6.32. I've read forum messages with similar problems, but solutions given don't fix it.


Well, If someone could help me I would appreciate it.

Average of ratings: -
In reply to Sebastián Paciuk

Re: Connection issue moodle mobile

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

Hi Sebastian,

what's your URL site? We can take a look (we don't need and username or password, just the URL)

Meanwhile you can take a look to the FAQ for admins Moodle Mobile FAQ, I'd recommend you to upgrade to 3.3.4 too.

Regards, Juan

In reply to Juan Leyva

Re: Connection issue moodle mobile

by Walter J -
Hi Juan,
The URL is campusvirtual.frsf.utn.edu.ar , Sebastian works with me but he is on vacation right now. Thanks!
In reply to Juan Leyva

Re: Connection issue moodle mobile

by Sebastián Paciuk -

Hi Juan ! 

We just upgrade to 3.3.4 and moodle mobile still not working. 

Did you see something with the URL Walter give you ?

In reply to Sebastián Paciuk

Re: Connection issue moodle mobile

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

Hi,

sorry for my late response.

I just checked it and the site Web Services are returning errors, in order to see what's the exact error you should enable debugging:

  1. Go to Debugging in the Site administration
  2. For "Debug messages" select 'DEVELOPER'
  3. Tick "Display debug messages"
  4. Click the 'Save changes' button.
Please, note that this may display warning messages on top of your pages if there is anything missconfigured (but it should be fine).

Once enabled, please execute this curl command in your linux/mac console:

curl 'https://campusvirtual.frsf.utn.edu.ar/lib/ajax/service.php' --data '[{"index":0,"methodname":"tool_mobile_get_public_config","args":{}}]' --compressed

And copy here the error returned (if you can't execute the command, just let me know)

Juan




In reply to Juan Leyva

Re: Connection issue moodle mobile

by Sebastián Paciuk -

Juan, I enabled debug messages, and executed the command you give me, and it return this, I send you and attachment with the result too:


[{"error":true,"exception":{"message":"Detectado valor de respuesta no v\u00e1lido","errorcode":"invalidresponse","backtrace":"* line 424 of \/lib\/externallib.php: invalid_response_exception thrown\n* line ? of unknownfile: call to external_api::clean_returnvalue()\n* line 233 of \/lib\/externallib.php: call to call_user_func()\n* line 59 of \/lib\/ajax\/service.php: call to external_api::call_external_function()\n","link":"https:\/\/campusvirtual.frsf.utn.edu.ar\/","moreinfourl":"http:\/\/docs.moodle.org\/33\/es\/error\/debug\/invalidresponse","debuginfo":"guestlogin => Detectado valor de respuesta no v\u00e1lido: Invalid external api response: the value is \"\", the server was expecting \"int\" type\nError code: invalidresponse"}}]

Sebastián

In reply to Sebastián Paciuk

Re: Connection issue moodle mobile

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

Hi Sebastián,

somehow, in your Moodle site there is an incorrect value for this setting: guestloginbutton

I'm not sure how this could happen, but there is a simple way to fix it, just use the Site administration search option, search for "guestloginbutton" change the value of the field (from show to hide or hide to show), save the changes and then set the field back to its original value and save the changes.

This should fix the issue because a 0 or 1 will be saved

Regards, Juan


In reply to Juan Leyva

Re: Connection issue moodle mobile

by Sebastián Paciuk -

Hi Juan, we made the change that you said, it fixed the issue. Thanks a lot ! Now the moodle mobile app is working, this issue was driving me (more) crazy haha. 


Well, thanks again !

Best regards,

Sebastián