Uncaught promise DOM exception in service-worker.js - service-worker

Service worker registered successfully but I'm still getting the above error in chrome.

What verb/action caused the error? You know you can't access the DOM in an SW right?

Related

Terminating app due to uncaught exception 'NSInternalInconsistencyException' - HTTPS Error

I see the following error when getting data from Firebase for my iOS app:
*2018-01-06 14:55:09.327043-0500 Spirit-App[65852:5935746] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'URL must be in the form of http[s]://firebasestorage.googleapis.com/v0/b//o/[?token=signed_url_params]'*
I suspected this may have something to do with Info.plist so as a workaround I attempted to modify the App Transport Security Settings but the same message still appears. Is there another location, besides Info.plist, that would need changed? Or is there a specific location where I can edit the firebase URL referenced above to correct the issue? Thanks!
You are most likely using one of the internal reference functions of Firebase which converts a URL to a storage reference. For e.g. the code below
let httpsReference = storage.reference(forURL: "https://firebasestorage.googleapis.com/b/bucket/o/images%20stars.jpg")
In such an instance, the above exception is thrown if the URL is not in the correct format as explained in the error message. You will need to check that the URL has the valid prefix in the string before passing it to the reference function.
I am trying to answer your question without having a view of your source code where the error is occurring. So if you want more details, please post the source code and I will update my answer.

Terminating app due to uncaught exception 'FirebaseShutdown', reason: 'Firebase error

Terminating app due to uncaught exception 'FirebaseShutdown', reason: 'Firebase error. Please ensure that you spelled the name of your Firebase correctly' in ios.
Can any one help me solve this issue?
Using this demo for real time message:
https://github.com/firebase/ios-swift-chat-example
Is there any demo for real time chat in iOS?
The error you're getting is actually from calling [Firebase initWithUrl:] with a URL that isn't backed by a valid Firebase.
This exception is thrown so that you as a developer know that the Firebase you're connecting to is invalid.
If you put in the right Firebase URL, you shouldn't be getting this error.
Could you explain the situation in which you might need to connect to a Firebase that may not be valid?
Note:- You will need to check your base URL for the Firebase, Because you have try to access data from the wrong URL

Terminating app because of errors. How can i minimize these app closes

I have an app without try catch. App terminates when error occurred. I want to get error logs when error happen but don't terminate the app. Is this possible to handle this errors? I searched try, guard, defer but don't know how to use? Thanks.

BugSense unable to log catched exception

I have integrated BugSense library available at HERE in my iOS project.
When my application crashed because of uncauchgt exception I can see details in "Errors" bookmark. But when I try to log catched exception (via BUGSENSE_LOG macro), no error details are visible. I want to check my trial version before upgrade.
Could anyone explain me what's wrong? I would appreciate any help
Solved: My problem was because I've tried to log exception which wasn't directly throwed. Somewhere in my code I throw exception (let's suppose A) and in try-catch statement this exception was handled. In catch statement I've created another exception (let's suppose B) by call initWithName: reason: userInfo: and set exception A as caused to B. Log exception B failed, but when I logged A, it works!

iOS 7: UIWebView crashes because of range exception

I'm currently building an App that uses the krpano viewer, which is a Panorama Viewer built with JavaScript. I'm loading this Panorama viewer in a UIWebView with local images that are saved on the iPad.
But after using the Panorama viewer for a while, I get this error and the app crashes:
Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[WebCoreSharedBufferData getBytes:range:]: range {0, 4000} exceeds data length 0'
*** First throw call stack:
(0x2e213f53 0x38a226af 0x2e213e95 0x2eb4dc31 0x2e16ca65 0x2ef4ce47 0x2ef4cd21 0x2ef68f03 0x2ef682db 0x2ef68029 0x2ef67e61 0x2ef67dcf 0x2ef6bd39 0x2ef6b813 0x2ef5471f 0x2e29b2ed 0x30635c6d 0x30635117 0x30621069 0x30620bad 0x3061d949 0x3061c051 0x38f0c297 0x38f0c09b 0x38f0cd15 0x38f0cf8d 0x39047dbf 0x39047c84)
libc++abi.dylib: terminating with uncaught exception of type NSException
Does anyone have an idea why this happens? When I load the online page in the UIWebView there is no problem.
Thanks for your help!
This is probably a memory related issue. When a web application allocates too much memory using Javascript, weird things will happen.
Your best bet is to observe memory warning notifications and try to influence the web app from the outside. Of course this depends on the specifics of the web app but you might want to try disabling userInteractionEnabled for a while to let the web view catch up with queued user input actions or, if the memory warning persists, try to reload the web view.
Unfortunately there are no easy solutions here.

Resources