Support Topics Documentation Slack YouTube Blog

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


(Akshat Patni) #1

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.


(Mark Piller) #2

You get an error when the app is closing??


(Akshat Patni) #3

No while opening after closing the app


(Anton Govorushkin) #4

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


(Akshat Patni) #5

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);
}


(Anton Govorushkin) #6

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