Start a new topic

The credentials used to authenticate this request are not authorized to run this operation

Hi guys,


I am using kinvey android 2.10.1. I was able to query a collection without error but not sure why suddenly get this error. I know someone has asked this error before but it doesn't solve my problem ok. 


After successfully login, I need to query a collection and where this error comes:


 

AsyncAppData<UserSetting> aggregate = AppController.getInstance().getKinveyClient().appData("usersetting", UserSetting.class);

Query myQuery = new Query();
myQuery.equals("_acl.creator", user.getId());
aggregate.get(myQuery, new KinveyListCallback<UserSetting>() {

	@Override
	public void onSuccess(final UserSetting[] result) {

        }

                    @Override
                    public void onFailure(Throwable throwable) {

}
});

 The _acl field is like below:


{"creator":"55a0795bea1237bf7100a93f","gr":false,"gw":false}


I am sure after successful login the user id I got is 55a0795bea1237bf7100a93f and I use this user id to query usersetting collection.


fyi, I am able to query this collection from kinvey javascript without issue.


Appreciate anyone help please.


Thanks,

Mark Thien


stack trace I got is below: Appreciate anyone help please as I really got stuck in this and need to move on. Like I said, I do not have problem querying this collection (usersetting) via javascript HTML5.


    The credentials used to authenticate this request are not authorized to run this operation. Please retry your request with appropriate credentials

            at com.kinvey.java.core.AbstractKinveyJsonClientRequest.newExceptionOnError(AbstractKinveyJsonClientRequest.java:70)

            at com.kinvey.java.core.AbstractKinveyJsonClientRequest.newExceptionOnError(AbstractKinveyJsonClientRequest.java:28)

            at com.kinvey.java.core.AbstractKinveyClientRequest.executeUnparsed(AbstractKinveyClientRequest.java:441)

            at com.kinvey.java.core.AbstractKinveyClientRequest.executeUnparsed(AbstractKinveyClientRequest.java:357)

            at com.kinvey.java.core.AbstractKinveyClientRequest.execute(AbstractKinveyClientRequest.java:466)

            at com.kinvey.java.offline.AbstractKinveyOfflineClientRequest.offlineFromService(AbstractKinveyOfflineClientRequest.java:133)

            at com.kinvey.java.offline.OfflinePolicy$1.execute(OfflinePolicy.java:43)

            at com.kinvey.java.offline.AbstractKinveyOfflineClientRequest.execute(AbstractKinveyOfflineClientRequest.java:159)

            at com.kinvey.java.cache.AbstractKinveyCachedClientRequest.fromService(AbstractKinveyCachedClientRequest.java:119)

            at com.kinvey.java.cache.CachePolicy$1.execute(CachePolicy.java:36)

            at com.kinvey.java.cache.AbstractKinveyCachedClientRequest.execute(AbstractKinveyCachedClientRequest.java:134)

            at com.kinvey.java.AppData$Get.execute(AppData.java:618)

            at com.kinvey.java.AppData$Get.execute(AppData.java:538)

            at com.kinvey.android.AsyncAppData$AppDataRequest.executeAsync(AsyncAppData.java:610)

            at com.kinvey.android.AsyncClientRequest.doInBackground(AsyncClientRequest.java:71)

            at android.os.AsyncTask$2.call(AsyncTask.java:288)

            at java.util.concurrent.FutureTask.run(FutureTask.java:237)

            at com.kinvey.android.AsyncClientRequest$KinveySerialExecutor$1.run(AsyncClientRequest.java:145)

            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

            at java.lang.Thread.run(Thread.java:818)



below are the javascript code query without any issue:


 

				Kinvey.User.me({
				
					success: function(response) {

						var query = new Kinvey.Query();
				
						query.equalTo('_acl.creator', response._id);
						
						Kinvey.DataStore.find('usersetting', query, {
						
							success: function(response1) {

                                                       }

                                               });

                                        }

                             });

 

holyshit, I downgraded to kinvey 2.6.15 jar file and problem solved.
it is pretty obvious that the latest version 2.10.1 got bugs.

 

I have been wasting 8 hours on trying to figure out how to solve this issue before downgraded back to 2.6.15 >:<

 

Mark,


Depending on what IDE you're using, there may or may not be Native AAR support (rather than JAR) out of the box.  This could be causing some classpath issues.  Beyond that, I will do some quick testing with the library itself to see if I can recreate these issues.


Thanks,

Mark,


Could you please enable debugging in the library (instructions found here: ( http://devcenter.kinvey.com/android/guides/troubleshooting#HTTPDebugLogging ) ) and try to run the queries in the different versions of the library?


Are you using the same user?  The rejection in the stacktrace seems to be server based, but the only thing that was different in these tests was the library itself, correct?  


Please let me know at your earliest convenience.


Thanks,

This problem has been indentified ?

Fabreax, 


I believe I was waiting on you here, since I was hoping you could provide a debug log from the failed query.


Could you reproduce this issue and send the debug log over to damien@kinvey.com?


Thanks,

I'm not the owner of this post but I'm facing a similar issue. I'm currently trying to identify it.

My Kinvey version is the latest (2.10.2). I have sent my logs by email.

Hi Damien, have you received my email ?

The issue has been solved in the version 2.10.3

Dang, you beat me back here Fabreax.


It looks like this issue has been solved via the update, as Fabreax has said.


Mark, can you let us know?


Thanks,

Login or Signup to post a comment