error "localurl" when register user with moodlemobile

error "localurl" when register user with moodlemobile

by stmw technical -
Number of replies: 3

Hi everybody

I use moodlemoble 2.x and moodle 3.8

when I try to create a user with the mobile app it displays an error with the underneath title:

`invalid value parameter detected`


and when I turn the debugging mode on I found out the problem is :


redirect => invalid parameter value detected(invalid external api parameter :
 the value is “xxx/launch.php?service=moodle_mobile_app&passport=xxx.xxxx&urlscheme=App Name”,
 the server was expecting “localurl” type):
 * line 359 of /lib/externallib.php invalid_parameter_exception thrown 
* line 223 of /lib/externallib.php call to external_api::validate_parameters() 
* line 79 of /lib/ajax/service.php call to external_api::call_external_function()
and here is the screenshot
error

Average of ratings: -
In reply to stmw technical

Re: error "localurl" when register user with moodlemobile

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It might be helpful to share the code you have written that is causing this error (I'm assuming you have written some code, as this is the developer forum).

For the moment, the problem seems to be related to the part that says "urlscheme=STMW EDU" - that really shouldn't have a space in the middle of it. If you can remove that space from the app name (maybe replace it with "_"?) then it should work.
Average of ratings: Useful (1)
In reply to Davo Smith

Re: error "localurl" when register user with moodlemobile

by stmw technical -
thanks for your reply
I just used moodleMobile official app from Github and change the appearance and config.json file on moodlemobile app.
In reply to stmw technical

Re: error "localurl" when register user with moodlemobile

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hi,

as Davo said, the value of the url scheme (in your case, "STMW EDU") cannot have a space. Please review the changes done in the config.json file.

You might be interested in our branded app service, we can create a branded app for your institution. That way you won't have configuration issues like this one, and we have some exclusive features for branded apps.

Cheers,
Dani
Average of ratings: Useful (1)