chromeos_smart_card_connector icon indicating copy to clipboard operation
chromeos_smart_card_connector copied to clipboard

Store logs across Connector app restarts-after-crashes

Open emaxx-google opened this issue 9 years ago • 2 comments

Currently, the "Export logs" button in the Connector app only exports the logs collected from this application execution.

As the Connector app (in Release mode) automatically restarts itself in case of a fatal error, the logs containing the crash reason are effectively lost.

We should probably store the logs in a storage before restarting the app.

The only currently possible workaround for losing the logs is to open the DevTools console for the Connector app's background page, and execute the following line of code: GSC.Logging.getLogger('').setLevel(goog.log.Level.FINE); This workaround effectively disables the restart-on-crash behavior, and allows to preserve and export the logs that were collected before the crash happened.

emaxx-google avatar Aug 25 '16 19:08 emaxx-google

We might want to make progress on this one, since we're getting a user report about this repeated crash, for which we don't have specific repro steps.

emaxx-google avatar Aug 12 '20 11:08 emaxx-google

As a quick update, the improvement made in #156 reduces the severity of this issue: we now stop self-reloading in case we detect crash loops, which means that we do retain logs from the last crash.

emaxx-google avatar Nov 17 '21 21:11 emaxx-google

This is superseded by an alternative approach: Smart Card Connector now uses the (new) chrome.systemLog API in order to append its logs to the system's log. That way, the Connector's logs stop being lost whenever it restarts.

emaxx-google avatar Jan 09 '24 16:01 emaxx-google