App does not load on device unless I am USB debugging - Android 4.4.4

Hello,

My application will not load on one specific device running android 4.4.4 (HTC Desire) but works fine on others.

It just hangs on the splash screen and never gets past it.

If I connect the cable and start USB Debugging it works absolutely fine, as soon as I try load the app without the cable connected it hangs on the splash screen.

If I connect the device once it’s already ‘hung’ and try inspect it (using chrome://inspect/#devices), it just sits on a white screen.

I am struggling to troubleshoot this issue due to it working fine when the usb debugging is active.

I deployed to the device using ionic run android --prod command

I have tested it on the following other devices and it works fine.

  • Nexus 5x - Android 7.1,
  • Samsung Galaxy - Android 6.0.1
  • HTC One - Android 5.1.1
  • Nexus 7 Tablet - Android 5.1.1
  • Nexus 9 Tablet - Android 7.1.1

Here is my ionic info if this helps

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.7.0
Xcode version: Not installed

Here is my installed plugins too

cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-inappbrowser 1.5.0 "InAppBrowser"
cordova-plugin-network-information 1.3.1 "Network Information"
cordova-plugin-splashscreen 4.0.1 "Splashscreen"
cordova-plugin-statusbar 2.2.1 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-sqlite-storage 1.4.9 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"

Does anyone have any suggestions?

Thanks in advance

I believe I have spotted the cause of my problem but not yet resolved.

I had an issue with my SQLite database initialisation, which was throwing an error - my error handler is trying to write an error to a local SQLite database so I am stuck in an infinite loop and therefore the app is hanging.

The reason it has only came to light (ha pun intended) on this device is the point at which I was trying to initialise the database was happening slower on the older device.

Off to solve my SQLite issue.