You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed this odd (probably wrong) behavior associated to the AutoCollection of Exceptions. In a brief: if "enableOfflineMode" if off, unhandled exceptions are not sent and pile up on disk.
Details follow:
If AutoCollection is enabled, all uncaught exceptions are trapped by "uncaughtException" event on the process. This causes the exception data to be sent to "handleCrash" method on Channel object with "isNodeCrashing" set to true. "handleCrash" sends the exception data to "saveOnCrash" and this method does not check if "_enableOfflineMode" is true. It just stores on disk.
If "_enableOfflineMode" if false, 2 (bad) things happen: Files are stored on disk even if this functionality is off. It may still make sense, since it's the only way to make unhandled exception collection work. But since "_enableOfflineMode" is false, files stored on disk are never sent.
So, ultimately:
Files will pile up forever on disk
Unhandled Exceptions will not be sent
Maybe it would be better to:
Not store exceptions to disk, since they will not be sent. It may happen that on first run offline mode is off, then switched on later. But its an odd scenario. If this is not the case, Exception files will be piled up forever.
Try to send exceptions (only) on next start even if offline mode is off.
What do you think?
The text was updated successfully, but these errors were encountered:
bragma
changed the title
Exceptions are stored on disk even if option is disabled, and the never sent
Exceptions are stored on disk even if offline mode is off and are never sent
Jan 13, 2016
Hi @bragma, thanks for writing this up. From what you're saying and looking at the code it looks like you're assessment is correct and this was probably a regression during one of the offlineMode changes. It should be noted that the crash handling is has been impacted by several of the last version changes of node so it's also possible that this is a version-specific issue.
I like your proposal. Separating crashes from the 'offlineMode' concept seems like the right thing to do. Feel free to make a pull request or ask @BogdanBe to triage.
I've noticed this odd (probably wrong) behavior associated to the AutoCollection of Exceptions. In a brief: if "enableOfflineMode" if off, unhandled exceptions are not sent and pile up on disk.
Details follow:
If AutoCollection is enabled, all uncaught exceptions are trapped by "uncaughtException" event on the process. This causes the exception data to be sent to "handleCrash" method on Channel object with "isNodeCrashing" set to true. "handleCrash" sends the exception data to "saveOnCrash" and this method does not check if "_enableOfflineMode" is true. It just stores on disk.
If "_enableOfflineMode" if false, 2 (bad) things happen: Files are stored on disk even if this functionality is off. It may still make sense, since it's the only way to make unhandled exception collection work. But since "_enableOfflineMode" is false, files stored on disk are never sent.
So, ultimately:
Maybe it would be better to:
What do you think?
The text was updated successfully, but these errors were encountered: