Start a new topic
Answered

Error on Scoping with queries on HTML5

Hi


I am facing an issue when using a query before an aggregation with the HTML5 framework.


The code is below:

                        var dataStore = Kinvey.DataStore.collection('Hits' ,Kinvey.DataStoreType.Network);

                        var myquery = new Kinvey.Query();

                        myquery.equalTo('user_name', 'pepito');


                        var aggregation = Kinvey.Aggregation.count('date');

                        aggregation.query = myquery;


                        var stream = dataStore.group(aggregation);


                        stream.subscribe(function(result) {

                             console.log('Found entities!');

                        });


The above code will return an error on the line

aggregation.query = myquery;


The error message is as follows:

"Right-hand side of 'instanceof' is not an object"


I am using Chrome Version 60.0.3112.101 (Official Build) (64-bit)

Kinvey SDK 3.3.3


Actually the query and the aggregation functions work fine, it is just when assigning the query to the aggregation object when I get this error. 


Any ideas?


Thanks



Best Answer

Emilio,


Can you try following?


aggregation._query = myquery;


Let me know if it works.


Thanks,

Pranav


Emilio,

Glad I could help.

There is a typo in our documentation. I have escalated this to engineering and it will be updated soon.

Thanks,
Pranav
MLIBZ-2061

 

this worked actually :)


Can you explain the trick? Was it a new update?

Answer

Emilio,


Can you try following?


aggregation._query = myquery;


Let me know if it works.


Thanks,

Pranav

Hi Billy


Thanks for the usual prompt support. Isn't there a previous version without this error? 


Looking forward for the next release, please let me know


Best regards,

Hello Emilio,


This has been identified as a bug and escalated to the Engineering team for remediation. Unfortunately, there is no workaround for the bug, we will need to release a new version of the SDK. I don't have a release date for a new version yet but it could be as early as late next week. I will confirm with you as soon as I know the date.


Please let us know if you have any questions.


Regards,


Billy Gee

MLIBZ-2060

Hi Billy


Any findings yet? Please this is quite critical :( We have a customer base and we need to filter the data relevant for each of them otherwise we cannot continue


Thanks and regards,



Hello Emilio,


We will investigate this and get back to you with questions or suggestions as soon as possible.


Regards,


Billy Gee

hi Billy

I tried with that version and it is not working (both by including it in the header and referencing to the library locally)


Hi Billy


Thanks for the prompt answer


I have replaced the library as follows and I still get exactly the same issue :(

<script src="https://da189i1jfloii.cloudfront.net/js/kinvey-html5-sdk-3.8.1.min.js"></script>


Best regards,

Hello Emilio,


Thank you for posting to the Kinvey Forum. I have just responded to the support ticket that you opened where I had asked you to move your problem to the Forum since you are currently subscribed to our Developer subscription plan.


Since you are currently using a very old version of the Kinvey HTML5 SDK v3.3.3 (and our logs show that you're using v3.3.2), you should upgrade to the latest version of the HTML5 SDK which is v3.8.1 because it contains many fixes and improvements. The version(s) that you are currently using are over nine months old. The latest SDK can be found at the following URL.

 

https://devcenter.kinvey.com/html5/downloads

 

Once you have upgraded to the latest SDK, please test for this error again and if you still experience it, update this post and let us know and we will be happy to assist you.


Regards,


Billy Gee



Login or Signup to post a comment