ibm mobilefirst - Worklight - EncryptedCache open fails with error status 10 -
i having problems encryptedcache on htc 1 android phone. same code works on phone , in browser simulator fails on htc 1 android phone unusual error code.
i using: worklight 6.2 
 failing on: htc one, android 4.4.2 (cyanogenmod)
 working on: samsung i9100 galaxy s ii
 working on: browser simulator
wl.encryptedcache.open fails on phone , return status 10.. 
 (* wl.encryptedcache.write fails on phone , return status 6..) 
i have run sample app developerworks as-is on htc 1 phone same results , error code. sample app link
logcat log:
- captured sample app
 1) destroyed cache
 2) entered new key
 3) opened cache
 4) got alert error message
full log can downloaded here
my code is:
function wlcommoninit(){  var storage_id = 'todos'; wl.encryptedcache.open(storage_id, true,          function(){ //success             console.log('--> cache opened');             console.log("--> loading angular");             angular.element(document).ready(function() {                  angular.bootstrap(document, ['todomvc']);                  //location.hash = "/";              });         },          function(status){ //fail             console.log("wl.encryptedcache open error status: " + status);                 switch(status){                 case wl.encryptedcache.error_key_creation_in_progress:                     alert("error: key creation in progress");                     break;                 case wl.encryptedcache.error_local_storage_not_supported:                     alert("error: local storage not supported");                     break;                 case wl.encryptedcache.error_no_eoc:                     alert("error: no eoc");                     break;                 case wl.encryptedcache.error_could_not_generate_key:                     alert("error: not generate key");                     break;                 case wl.encryptedcache.error_credentials_mismatch:                     alert("error: credentials mismatch");                     break;                 default:                     alert("an error has occured. status :: " + status);             }         });  } 
sorry cannot reproduce this.
- installed worklight studio 6.2 eclipse marketplace fresh copy of eclipse , new workspace
- downloaded encrypted offline cache sample project > import eclipse
- added android environment , > run > run on worklight development server
- installed on device (nexus 5, android 4.4)
- opened cache, encrypted value, closed cache, quit app, re-open, re-open cache, decrypt key, etc etc... operations seem pass.
could please use wireshark while use app , provide trace log there?
 in addition, if try above steps.
Comments
Post a Comment