I am using http://docs.ionic.io/services/database/ and for some reason the database needs to be “woken up” before it can be used. Whenever I try to load the database from my app, it only works if I’ve recently (in like the last 10 minutes) loaded the app–not necessarily on the same device.
Is there a way to get around this?
This is the console log I get when it does not work:
WebSocket connection to 'wss://api.ionic.io/ionicdb/<appid>' failed: Unexpected response code: 502 polyfills.js:3 Received an error: [object Event] main.js:108846 t main.js:108846 Connection Failed: Unexpected disconnect with error code 1006. main.js:109376 t.call.closeObserver.next main.js:109376 Retrying in 5 seconds. main.js:109378 t.call.closeObserver.next main.js:109378