Document not being created from custom code

0 votes
I ahve created a custom code which and uploaded on server, the same code while running from testCode working fine when i am trying to run it from android app it working but not as per expected Custom Code - create a user by passing jsondoc in it , using own custom key with permission of createuser and finddocumentsbyid and other required to make it run Android app - calling custom code with own access key with runjavacode permission. Issue facing - 1. if i run the app , user is being created but jsondocument for the same user not being created , 2. if i clear app data in in android and try registering new user with unique username i still get "Unauthorised Acess" Exception, i have already disabled "ACL protection" Exception :com.shephertz.app42.paas.sdk.android.App42SecurityException: {"app42Fault":{"httpErrorCode":401,"appErrorCode":1401,"message":"UnAuthorized Access","details":"Client is not authorized"}}
asked May 26, 2016 in Android by ajay parmar (10 points)

1 Answer

0 votes
Hi Ajay,

 

Could you please share the logs when you are getting the exception? It will help us to provide better support to you.

To print internal logs, put the below line of code just after the key initialization:

App42Log.setDebug(true);

 

Regards,

Himanshu Sharma
answered May 26, 2016 by hs00105 (2,005 points)
Uploaded new jar as advice , today i start getting unauthorized access, i have already disabled "Relay attack protection" , and keys are also matching.,
i have run the code using apphq , using this json
{
  "method":"1",
  "name" : "3453452554",
  "password":"8888888",
  "email":"aasdfasdfasdf@gmail.com"
}

giving error something went wrong , i am not aware where to check for logs
Hi Ajay,

It is possible that you can share your custom code with us at support@shephertz.com and allow us to check and replicate the same issue at our end? It will help us to provide better support to you.

regards,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...