bugsnag / bugsnag-js

JavaScript error handling tool for BugSnag. Monitor and report JavaScript bugs & errors.
https://docs.bugsnag.com/platforms/javascript
MIT License
838 stars 252 forks source link

Offline support? #117

Open machty opened 8 years ago

machty commented 8 years ago

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?

jmshal commented 8 years ago

How exactly would that work? And how would that relate to JavaScript errors?

machty commented 8 years ago

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).

jmshal commented 8 years ago

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.

codepunkt commented 8 years ago

For me, this is actually very important. Do any other Bugtracking Services support this for JavaScript-based Errors?

abrbhat commented 8 years ago

This will also enable an easier integration with Cordova/Ionic applications

foxyblocks commented 8 years ago

Notable: https://developers.google.com/web/updates/2015/12/background-sync

jmshal commented 8 years ago

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).

jmshal commented 7 years ago

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

ghost commented 4 years ago

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.

https://github.com/bugsnag/bugsnag-js/issues/628

mathiasrw commented 4 years ago

Can we please find a way to store reports / breadcrumb and send them when the user gets online again?

phillipsam commented 4 years ago

Hi @mathiasrw - yes this is something that we are looking into and hope to implement in a future release :)

wojtiku commented 3 years ago

Did this get released? Would need this as well!

xljones commented 3 years ago

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.

cqcmdwym commented 2 years ago

Hey, is there any update on this? Thanks.

luke-belton commented 2 years ago

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.

cqcmdwym commented 2 years ago

@luke-belton great, looking forward to it.

Taxman972 commented 3 weeks ago

Any update on this feature since 2021?

matthewjhowells commented 2 weeks ago

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.