We've received feedback from other zebra users (we use zebra tc70 android 8) on zebra related issues we posted about previously. Thus, want to summarize another issue we encountered and resolved in case it helps anyone in the community. Note: we are not sure whether this was zebra specific issue
as we were never able to ever really pinpoint the exact cause of the issue. Just what code was causing issues and how to work around it.
We were experiencing an issue with our devices where occassionally the work execution app would just lock up and the only way we could resolve it was to clear the cache and reestablish the connection. Eventually after adding debug statements to our js files and examing the chrome debug output we were able to pinpoint the locking up of the app to references to -@@EmptyComplexField@@-
It seemed to us that problems were arising due to getRequiredResource in _controlbase.js being passed an id of undefined. Seems to be that is due to view.js setResourceObject getting passed -@@EmptyComplexField@@- as resource.
we then put in the modeldata.getmodeldataset
if (!ConnectivityChecker.isDeviceConnected() ||
!this.wasCommittedToServer() || ((metadata.isSystem ||
metadata.additionalData) && (!metadata.refreshOnLogin ||
useExisting))) {
self['failureReportlist']='-@@EmptyComplexField@@-';
Logger.trace("DEBUG: Load from cached in-memory");
//Just load from cached in-memory
var fieldMetadata = metadata.getField(complexAttributeName);
Logger.trace("DEBUG: fieldMetaData is "+fieldMetadata);
return this._ensureModelServiceIsAvailable().
and it froze just like we were experiencing and throws the same error. Thus we had programmatic recreation steps.
we then updated with
then(function(){
if(self[complexAttributeName] && self[complexAttributeName] !== '-@@EmptyComplexField@@-'){
if (lang.isArray(self[complexAttributeName])){
Logger.trace("DEBUG: returning getLoadedModelDataSetOrNull");
return self.getLoadedModelDataSetOrNull(complexAttributeName);
}
Logger.trace("DEBUG: Returning self[complexAttributeName]");
return self[complexAttributeName];
}
else{
/* this is destructive and will set an empty set for the attribute */
Logger.trace("DEBUG: Returning ModelService.empty");
return ModelService.empty(fieldMetadata.referenceResource, null, self, complexAttributeName).then(function(dataSet) {
return dataSet;
});
}
and it rendered the view successfully. We then implemented this code change and have not had any devices reported as frozen since.
------------------------------
Victor Chin
------------------------------
#AssetandFacilitiesManagement#Maximo#MaximoAnywhere