简体   繁体   中英

JSONStore errors - PROVISION_TABLE_SEARCH_FIELDS_MISMATCH or USERNAME_MISMATCH_DETECTED

We are interrogating the JSONStore (in a JS app) on a regular bases using the setInterval function and from time to time (ie cannot reproduce it) we get the errors PROVISION_TABLE_SEARCH_FIELDS_MISMATCH or USERNAME_MISMATCH_DETECTED.

The problem is that I never change the search fields or the username (as they are hardcoded).

Is there any reason that these errors are returned?

You can review the following list of JSONStore error codes: https://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.1.0/com.ibm.worklight.dev.doc/devref/r_jsonstore_errorcodes.html

-2 PROVISION_TABLE_SEARCH_FIELDS_MISMATCH Search fields are not dynamic. It is not possible to change search fields without calling the destroy method or the removeCollection method in the WL.JSONStore class before calling the init method with the new search fields. This error can occur if you change the name or type of the search field. For example: {key: 'string'} to {key: 'number'} or {myKey: 'string'} to {theKey: 'string'}.

and

-6 USERNAME_MISMATCH_DETECTED To log out, a JSONStore user must call the closeAll method in the WL.JSONStore class first. There can be only one user at a time.

My guess is that you may want to increase the timeout value you're using. This does suspiciously sound like a timing issue (you also say that it occurs from "time to time").

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM