Forums | Mahara Community
Mobile Mahara
/
Mahara Mobile - Unable to sync data with the server
22 November 2017, 16:49
Hi there, I'm having issues logging in with Mahara Mobile against a 16.10.2 Mahara instance, https://ep.unisa.edu.au.
SSL is enabled, the webservice API has been auto-configured and all institutions have Webservices authentication enabled, but every login gets met with "Unable to sync data with the server" and the following in the Mahara logs:
[Wed Nov 22 14:14:43.037188 2017] [:error] [pid 1776] [client 130.220.0.2:8619] [WAR] 0c (lib/mahara.php:1450) sprintf(): Too few arguments
[Wed Nov 22 14:14:43.037204 2017] [:error] [pid 1776] [client 130.220.0.2:8619] Call stack (most recent first):
[Wed Nov 22 14:14:43.037228 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * log_message(string(size 28), integer, true, true, string(size 32), integer) at /apps/mahara/prod/lib/errors.php:521
[Wed Nov 22 14:14:43.037237 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * error(integer, string(size 28), string(size 32), integer, array(size 3)) at Unknown:0
[Wed Nov 22 14:14:43.037240 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * sprintf(string(size 33)) at Unknown:0
[Wed Nov 22 14:14:43.037242 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * call_user_func_array(string(size 7), array(size 1)) at /apps/mahara/prod/lib/mahara.php:1450
[Wed Nov 22 14:14:43.037245 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * format_langstring(string(size 33), array(size 0), string(size 7)) at /apps/mahara/prod/lib/mahara.php:518
[Wed Nov 22 14:14:43.037247 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * get_string_location(string(size 18), string(size 15), array(size 0)) at /apps/mahara/prod/lib/mahara.php:307
[Wed Nov 22 14:14:43.037250 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * get_string(string(size 18), string(size 15)) at /apps/mahara/prod/webservice/lib.php:2223
[Wed Nov 22 14:14:43.037252 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * WebserviceException->__construct(string(size 18), string(size 125)) at /apps/mahara/prod/webservice/lib.php:683
[Wed Nov 22 14:14:43.037254 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * external_api::clean_returnvalue(object(external_single_structure), array(size 5)) at /apps/mahara/prod/webservice/rest/locallib.php:202
[Wed Nov 22 14:14:43.037257 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * webservice_rest_server->send_response() at /apps/mahara/prod/webservice/lib.php:1815
[Wed Nov 22 14:14:43.037259 2017] [:error] [pid 1776] [client 130.220.0.2:8619] * webservice_base_server->run() at /apps/mahara/prod/webservice/rest/server.php:75
[Wed Nov 22 14:14:43.037262 2017] [:error] [pid 1776] [client 130.220.0.2:8619]
Not sure what other things I can try - I've tried token creation (which I'd prefer not to use, too clunky) but that gets me a different error: "Unable to login to server. Is the server address correct?"
Any help would be appreciated :)
Cheers,
Scott
22 November 2017, 17:16
Actually, there's a lot more to that error log:
[Wed Nov 22 14:46:02.863462 2017] [:error] [pid 1606] [client 130.220.0.2:60931] [DBG] e8 (webservice/lib.php:1923) executing: module_mobileapi_sync/sync
[Wed Nov 22 14:46:02.899336 2017] [:error] [pid 1606] [client 130.220.0.2:60931] [WAR] e8 (module/mobileapi/webservice/functions/module_mobileapi_sync.php:515) Undefined variable: blog
[Wed Nov 22 14:46:02.899378 2017] [:error] [pid 1606] [client 130.220.0.2:60931] Call stack (most recent first):
[Wed Nov 22 14:46:02.899384 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * log_message(string(size 24), integer, true, true, string(size 81), integer) at /apps/mahara/prod/lib/errors.php:521
[Wed Nov 22 14:46:02.899387 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * error(integer, string(size 24), string(size 81), integer, array(size 9)) at /apps/mahara/prod/module/mobileapi/webservice/functions/module_mobileapi_sync.php:515
[Wed Nov 22 14:46:02.899390 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * module_mobileapi_sync::get_blogs(integer, integer, false, integer, integer) at Unknown:0
[Wed Nov 22 14:46:02.899394 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * forward_static_call_array(array(size 2), array(size 5)) at /apps/mahara/prod/module/mobileapi/webservice/functions/module_mobileapi_sync.php:41
[Wed Nov 22 14:46:02.899396 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * module_mobileapi_sync::sync(array(size 5), array(size 2), null, array(size 3), array(size 0), array(size 1)) at Unknown:0
[Wed Nov 22 14:46:02.899399 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * call_user_func_array(array(size 2), array(size 6)) at /apps/mahara/prod/webservice/lib.php:1924
[Wed Nov 22 14:46:02.899402 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_base_server->execute() at /apps/mahara/prod/webservice/lib.php:1796
[Wed Nov 22 14:46:02.899404 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_base_server->run() at /apps/mahara/prod/webservice/rest/server.php:75
[Wed Nov 22 14:46:02.899407 2017] [:error] [pid 1606] [client 130.220.0.2:60931]
[Wed Nov 22 14:46:03.027061 2017] [:error] [pid 1606] [client 130.220.0.2:60931] [WAR] e8 (webservice/lib.php:651) Undefined property: external_single_structure::$type
[Wed Nov 22 14:46:03.027111 2017] [:error] [pid 1606] [client 130.220.0.2:60931] Call stack (most recent first):
[Wed Nov 22 14:46:03.027116 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * log_message(string(size 52), integer, true, true, string(size 36), integer) at /apps/mahara/prod/lib/errors.php:521
[Wed Nov 22 14:46:03.027120 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * error(integer, string(size 52), string(size 36), integer, array(size 2)) at /apps/mahara/prod/webservice/lib.php:651
[Wed Nov 22 14:46:03.027122 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), null) at /apps/mahara/prod/webservice/lib.php:710
[Wed Nov 22 14:46:03.027125 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_multiple_structure), array(size 3)) at /apps/mahara/prod/webservice/lib.php:681
[Wed Nov 22 14:46:03.027128 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), array(size 2)) at /apps/mahara/prod/webservice/lib.php:681
[Wed Nov 22 14:46:03.027131 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), array(size 5)) at /apps/mahara/prod/webservice/rest/locallib.php:202
[Wed Nov 22 14:46:03.027134 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_rest_server->send_response() at /apps/mahara/prod/webservice/lib.php:1816
[Wed Nov 22 14:46:03.027176 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_base_server->run() at /apps/mahara/prod/webservice/rest/server.php:75
[Wed Nov 22 14:46:03.027180 2017] [:error] [pid 1606] [client 130.220.0.2:60931]
[Wed Nov 22 14:46:03.027720 2017] [:error] [pid 1606] [client 130.220.0.2:60931] [WAR] e8 (lib/mahara.php:1450) sprintf(): Too few arguments
[Wed Nov 22 14:46:03.027746 2017] [:error] [pid 1606] [client 130.220.0.2:60931] Call stack (most recent first):
[Wed Nov 22 14:46:03.027758 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * log_message(string(size 28), integer, true, true, string(size 32), integer) at /apps/mahara/prod/lib/errors.php:521
[Wed Nov 22 14:46:03.027762 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * error(integer, string(size 28), string(size 32), integer, array(size 3)) at Unknown:0
[Wed Nov 22 14:46:03.027766 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * sprintf(string(size 33)) at Unknown:0
[Wed Nov 22 14:46:03.027770 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * call_user_func_array(string(size 7), array(size 1)) at /apps/mahara/prod/lib/mahara.php:1450
[Wed Nov 22 14:46:03.027775 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * format_langstring(string(size 33), array(size 0), string(size 7)) at /apps/mahara/prod/lib/mahara.php:518
[Wed Nov 22 14:46:03.027779 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * get_string_location(string(size 18), string(size 15), array(size 0)) at /apps/mahara/prod/lib/mahara.php:307
[Wed Nov 22 14:46:03.027783 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * get_string(string(size 18), string(size 15)) at /apps/mahara/prod/lib/mahara.php:293
[Wed Nov 22 14:46:03.027787 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * string_exists(string(size 18), string(size 15)) at /apps/mahara/prod/webservice/lib.php:2223
[Wed Nov 22 14:46:03.027799 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * WebserviceException->__construct(string(size 18), string(size 114)) at /apps/mahara/prod/webservice/lib.php:684
[Wed Nov 22 14:46:03.027806 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), array(size 2)) at /apps/mahara/prod/webservice/lib.php:681
[Wed Nov 22 14:46:03.027815 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), array(size 5)) at /apps/mahara/prod/webservice/rest/locallib.php:202
[Wed Nov 22 14:46:03.027819 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_rest_server->send_response() at /apps/mahara/prod/webservice/lib.php:1816
[Wed Nov 22 14:46:03.027822 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_base_server->run() at /apps/mahara/prod/webservice/rest/server.php:75
[Wed Nov 22 14:46:03.027826 2017] [:error] [pid 1606] [client 130.220.0.2:60931]
[Wed Nov 22 14:46:03.028165 2017] [:error] [pid 1606] [client 130.220.0.2:60931] [WAR] e8 (lib/mahara.php:1450) sprintf(): Too few arguments
[Wed Nov 22 14:46:03.028185 2017] [:error] [pid 1606] [client 130.220.0.2:60931] Call stack (most recent first):
[Wed Nov 22 14:46:03.028197 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * log_message(string(size 28), integer, true, true, string(size 32), integer) at /apps/mahara/prod/lib/errors.php:521
[Wed Nov 22 14:46:03.028204 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * error(integer, string(size 28), string(size 32), integer, array(size 3)) at Unknown:0
[Wed Nov 22 14:46:03.028208 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * sprintf(string(size 33)) at Unknown:0
[Wed Nov 22 14:46:03.028211 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * call_user_func_array(string(size 7), array(size 1)) at /apps/mahara/prod/lib/mahara.php:1450
[Wed Nov 22 14:46:03.028214 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * format_langstring(string(size 33), array(size 0), string(size 7)) at /apps/mahara/prod/lib/mahara.php:518
[Wed Nov 22 14:46:03.028226 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * get_string_location(string(size 18), string(size 15), array(size 0)) at /apps/mahara/prod/lib/mahara.php:307
[Wed Nov 22 14:46:03.028230 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * get_string(string(size 18), string(size 15)) at /apps/mahara/prod/webservice/lib.php:2224
[Wed Nov 22 14:46:03.028233 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * WebserviceException->__construct(string(size 18), string(size 114)) at /apps/mahara/prod/webservice/lib.php:684
[Wed Nov 22 14:46:03.028236 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), array(size 2)) at /apps/mahara/prod/webservice/lib.php:681
[Wed Nov 22 14:46:03.028239 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), array(size 5)) at /apps/mahara/prod/webservice/rest/locallib.php:202
[Wed Nov 22 14:46:03.028242 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_rest_server->send_response() at /apps/mahara/prod/webservice/lib.php:1816
[Wed Nov 22 14:46:03.028245 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_base_server->run() at /apps/mahara/prod/webservice/rest/server.php:75
[Wed Nov 22 14:46:03.028248 2017] [:error] [pid 1606] [client 130.220.0.2:60931]
[Wed Nov 22 14:46:03.028607 2017] [:error] [pid 1606] [client 130.220.0.2:60931] [WAR] e8 (lib/mahara.php:1450) sprintf(): Too few arguments
[Wed Nov 22 14:46:03.028619 2017] [:error] [pid 1606] [client 130.220.0.2:60931] Call stack (most recent first):
[Wed Nov 22 14:46:03.028622 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * log_message(string(size 28), integer, true, true, string(size 32), integer) at /apps/mahara/prod/lib/errors.php:521
[Wed Nov 22 14:46:03.028625 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * error(integer, string(size 28), string(size 32), integer, array(size 3)) at Unknown:0
[Wed Nov 22 14:46:03.028627 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * sprintf(string(size 33)) at Unknown:0
[Wed Nov 22 14:46:03.028629 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * call_user_func_array(string(size 7), array(size 1)) at /apps/mahara/prod/lib/mahara.php:1450
[Wed Nov 22 14:46:03.028632 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * format_langstring(string(size 33), array(size 0), string(size 7)) at /apps/mahara/prod/lib/mahara.php:518
[Wed Nov 22 14:46:03.028635 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * get_string_location(string(size 18), string(size 15), array(size 0)) at /apps/mahara/prod/lib/mahara.php:307
[Wed Nov 22 14:46:03.028637 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * get_string(string(size 18), string(size 15)) at /apps/mahara/prod/lib/mahara.php:293
[Wed Nov 22 14:46:03.028641 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * string_exists(string(size 18), string(size 15)) at /apps/mahara/prod/webservice/lib.php:2223
[Wed Nov 22 14:46:03.028645 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * WebserviceException->__construct(string(size 18), string(size 125)) at /apps/mahara/prod/webservice/lib.php:684
[Wed Nov 22 14:46:03.028649 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), array(size 5)) at /apps/mahara/prod/webservice/rest/locallib.php:202
[Wed Nov 22 14:46:03.028652 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_rest_server->send_response() at /apps/mahara/prod/webservice/lib.php:1816
[Wed Nov 22 14:46:03.028655 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_base_server->run() at /apps/mahara/prod/webservice/rest/server.php:75
[Wed Nov 22 14:46:03.028657 2017] [:error] [pid 1606] [client 130.220.0.2:60931]
[Wed Nov 22 14:46:03.028941 2017] [:error] [pid 1606] [client 130.220.0.2:60931] [WAR] e8 (lib/mahara.php:1450) sprintf(): Too few arguments
[Wed Nov 22 14:46:03.028963 2017] [:error] [pid 1606] [client 130.220.0.2:60931] Call stack (most recent first):
[Wed Nov 22 14:46:03.028967 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * log_message(string(size 28), integer, true, true, string(size 32), integer) at /apps/mahara/prod/lib/errors.php:521
[Wed Nov 22 14:46:03.028970 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * error(integer, string(size 28), string(size 32), integer, array(size 3)) at Unknown:0
[Wed Nov 22 14:46:03.028973 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * sprintf(string(size 33)) at Unknown:0
[Wed Nov 22 14:46:03.028976 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * call_user_func_array(string(size 7), array(size 1)) at /apps/mahara/prod/lib/mahara.php:1450
[Wed Nov 22 14:46:03.028980 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * format_langstring(string(size 33), array(size 0), string(size 7)) at /apps/mahara/prod/lib/mahara.php:518
[Wed Nov 22 14:46:03.028984 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * get_string_location(string(size 18), string(size 15), array(size 0)) at /apps/mahara/prod/lib/mahara.php:307
[Wed Nov 22 14:46:03.028987 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * get_string(string(size 18), string(size 15)) at /apps/mahara/prod/webservice/lib.php:2224
[Wed Nov 22 14:46:03.028990 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * WebserviceException->__construct(string(size 18), string(size 125)) at /apps/mahara/prod/webservice/lib.php:684
[Wed Nov 22 14:46:03.028992 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * external_api::clean_returnvalue(object(external_single_structure), array(size 5)) at /apps/mahara/prod/webservice/rest/locallib.php:202
[Wed Nov 22 14:46:03.028995 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_rest_server->send_response() at /apps/mahara/prod/webservice/lib.php:1816
[Wed Nov 22 14:46:03.028997 2017] [:error] [pid 1606] [client 130.220.0.2:60931] * webservice_base_server->run() at /apps/mahara/prod/webservice/rest/server.php:75
[Wed Nov 22 14:46:03.029000 2017] [:error] [pid 1606] [client 130.220.0.2:60931]
23 November 2017, 7:49
Hello Scott,
Which version of Mahara Mobile do you use?
When you write you configured the web services API, do you mean the maharamobile API under Administration -> Extensions -> Plugin administration? If not, please do so by turning off web services and then going into the plugin configuration and turning it on. I once had it that this resolved an issue when someone had manually configured the web services.
You don't need the web services authentication enabled for an institution.
Can you please try using demo.mahara.org from your Mahara Mobile? I could upload a file successfully via the latest Android version into an account there.
Cheers
Kristina
23 November 2017, 11:38
Hi Kristina,
I'm running the latest store version, 1.4.0.
I used the auto configure you mentioned, sorry for the confusion :)
As for demo.mahara.org I've made an account and been able to login. Worth reporting to the devs is that if you have no folders in the files area you cannot upload files, even though you'd assume it'd just drop the files in your home folder.
If you then create a folder you need to refresh a few times before it becomes available, and if you already had a pending upload it will still fail:
Once I got all that sorted it was fine, and as mentioned earlier I'm able to login to my mahara and upload as well once I navigated the idiosyncracies of the app. I'd just recommend to the devs that some user-friendliness is still required :)
Cheers,
Scott
24 November 2017, 6:11
Hello Scott,
Thank you for giving it another go and providing some additional information. Your images didn't come through though.
The issue with the folder not showing up has already been reported at https://github.com/MaharaProject/mahara-mobile/issues/50
I created an issue for the file upload without folder at https://github.com/MaharaProject/mahara-mobile/issues/51
Cheers
Kristina