0

We have come across a bad issue on android where the user installs the app on an android device and logs into Salesforce with it. Then they uninstall the app, reinstall it, and login again. The first time it references the soup it returns this error:

file is not a database: , while compiling: select count(*) from sqlite_master;

The bad thing is that this error persists with that user no matter how many times they uninstall and then re-install the app. This started after installing the Cordova File Plugin. Initially initially we were on SF SDK 7.3.0 when it started to happen and then we upgrading to 8.1.0 and it is still happening. We have seen this on some of our android devices but not others.

0

We have an errorCallback method that is in all the catch functions of our soup actions and so I added this code to catch the code and clean it up. Its no the most elegant but it's what's necessary for a nasty persistent bug.

 if (error && typeof error === 'string' && error.includes('file is not a database: ,') && ionic.Platform.isAndroid()) { // cache error
      alert('The app is cleaning up a few things and will then close. Please restart the app once it closes.');
      // Continue to clearCache and exitApp regardless of success or failure
      navigator.smartstore.removeAllStores(()=>{
          navigator.app.clearCache();
          navigator.app.exitApp();
      },()=>{
          navigator.app.clearCache();
          navigator.app.exitApp();
      });
      return;
 } 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.