Backendless Support
 
Works as Designed

Error 1013 User has no permission to find data in persistence storage.

I was using keep me logged-in in authentication, it was working but now when I login and after that when I close or kill the app it gives me 1013 error and again ask for username and password.

Leave a Comment

Comments (5)

photo
1

You get an error when the app is closing??

photo
1

No while opening after closing the app

photo
photo
1

Hello Akshat

Please provide detailed steps of what are you doing so we could reproduce the issue.

Also please provide your app id

Regards Anton

photo
1

My AppID:B9977E96-7E72-5333-FFB2-48B60E24DF00

-----------Code which is giving error-----------------------------

String userToken = UserIdStorageFactory.instance().getStorage().get();

if (userToken != null && !userToken.equals("")) {

Backendless.Data.of(BackendlessUser.class).findById(userToken, new AsyncCallback<BackendlessUser>() {

@Override

public void handleResponse(BackendlessUser response) {

Backendless.UserService.setCurrentUser(response);

user=Backendless.UserService.CurrentUser();

prog.setVisibility(View.GONE);

startActivity(intent1);

}

@Override

public void handleFault(BackendlessFault fault) {

prog.setVisibility(View.GONE);

Toast.makeText(getApplicationContext(), fault.getCode() + " " + fault.getMessage(), Toast.LENGTH_LONG).show();

startActivity(intent2);

}

});

}

else {

startActivity(intent2);

}

photo
1

As I see in your app you have set DENY permissions in owner policy in the Users table. As user's object Id is his owner id - when you try to findById you face the DENY find permission in Owner Policy. That's why you get this error which is expected.

Set permission to 'grant' and it will be solved.

Regards Anton