Open machty opened 8 years ago
How exactly would that work? And how would that relate to JavaScript errors?
Client-side analytics platforms (one example being Localytics) often have error handling on their uploads, such that if the upload fails, it's saved for a later upload in localStorage (but perhaps just storing in memory is all we need). Then at some point in the future, it tries to send a batch of all prior unsent payloads. Bugsnag could adopt a similar approach.
It seems like an important feature just because, without it, you're losing data on any exceptions thrown if the user has a flaky connection at the time of the exception (mobile apps are particularly prone to this).
I see what you mean. To be honest I'd find it unlikely to be implemented into the library itself, but I like the idea. It would seem that it's something that can be implemented on a per-app basis, based on your own specifications. Having such a system would add additional 'bloat' to the existing js file, for something that would probably be an opt-in feature anyway.
Just my opinion, sorry. But I'd never thought about it before now. Very smart.
For me, this is actually very important. Do any other Bugtracking Services support this for JavaScript-based Errors?
This will also enable an easier integration with Cordova/Ionic applications
So I've put together some code for supporting in-memory error event retrying. There are a few of things to note, which need some feedback (cc @wordofchristian @kattrali).
notify.bugsnag.com/js
endpoint responds with an empty response. Meaning the onerror
event on the Image
object (when using the default notifyHandler
) is fired instead of the onload
event (because a zero byte image isn't valid).
status
from the XHR object, and determine whether the request was successful or not.document.body
rather than window
.So, just an update, my PR now includes support for using sessionStorage
/localStorage
for storing the errors to be sent at a later time. I still need to do some more testing (for bugs and browser support), but I'd love to get some feedback on this 😄
cc @kattrali
There's actually a huge bug I found this week that renders our servers useless if it accidentally goes offline. This would definitely solve that.
Can we please find a way to store reports / breadcrumb and send them when the user gets online again?
Hi @mathiasrw - yes this is something that we are looking into and hope to implement in a future release :)
Did this get released? Would need this as well!
Hey @wojtiku, this isn't something that's released yet. We'll keep you posted in this thread with any updates, but at the moment I don't have an ETA for this.
Hey, is there any update on this? Thanks.
Hi @cqcmdwym - this is still something on our backlog, and I don't have a firm ETA at the moment. As Xander said above we'll notify this thread as soon as there's any update.
@luke-belton great, looking forward to it.
Any update on this feature since 2021?
Hi @Taxman972, offline support for JS events is still on our backlog, and while I don’t have an ETA on this, we will continue to keep this thread updated once there are any further updates.
It seems there's no support for enqueuing notifications for later when the app is offline. Is there any plan to add this in the future?