Posts

Showing posts with the label javascript

Uncaught(in Promise) DOM Exception

What is DOM Exception: The DOMException represents an abnormal event happening when a method or a property is used. Error Properties: Returns a DOMString that contains one of the string associated with an error constant. Root Cause for the problem: DOM Exception error occurs for the hybrid apps once the google webview has been updated to  66.0.3359.126 Because on the update the apps which is running in Android OS Version of 5.1 and 6.0 doesn’t allows the hybrid apps to work The problem arise because the local forage used in the application doesn’t use the catch block which cause the problem Example code: localforage.setItem('user', data).then(function (data) { vm.userData = data; }); Which will return to DOM Exception whereas if we use the catch block for it then the DOM Exception error will not occur. Correct Code: localforage.setItem('key', 'value').then(function () { return localforage.getIte...