Commit Graph

11 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar
0048fc6e4a Crash reporter plugin
Summary: This diff adds a static function `onRegisterDevice` which is being called whenever an  device gets registered. This callback is used to add loglisterner for android. I even moved the logic of iOS from `onRegisterPlugin` to this callback. The reason for not adding android log listener in `onRegisterPlugin` was that there were cases when baseDevice was not yet registered before calling `onRegisterPlugin`. For android, I want the instance of `BaseDevice` so that I can add logListener on it.

Reviewed By: danielbuechele

Differential Revision: D13563282

fbshipit-source-id: b5be40f3dbc808bdaeabae28423c563cf2345a22
2019-01-09 10:42:55 -08:00
Pritesh Nandgaonkar
9d4bb45dbc Refactor CrashReporter plugin
Summary: This diff refactors CrashReporter Plugin. The business logic of crash reporter plugin was placed in the `iOSDevice.js` as it gets the hook to the initialisation of iOSDevice. This diff moves the business logic to the Crash Reporter plugin files under the plugins folder. To get the hook, so that we can add our watcher, I have added a static function over `FlipperBasePlugin`, which if exists, will be called once `REGISTER_PLUGIN` event is dispatched

Reviewed By: danielbuechele

Differential Revision: D13529035

fbshipit-source-id: 28216b273b4032727859107d8a6751c6465af9ac
2018-12-21 07:03:21 -08:00
Pritesh Nandgaonkar
ade6eabdb0 Fix the regressed deeplink support for crash reporter plugin
Summary: The deeplink from crash notification to crash reporter plugin was broken. It always showed the latest crash.With this diff the crashreporter plugin shows the correct crash information.

Reviewed By: danielbuechele

Differential Revision: D13487792

fbshipit-source-id: eee6826bb0a84d0aab9b432a1c9a04aa7d528402
2018-12-19 07:01:09 -08:00
Pritesh Nandgaonkar
a12768539e Crashreporter plugin by adding a watchman for crash log
Summary:
This diff adds a watcher on `~/Library/Logs/Diagnostics/` library and fires a notification whenever a crash log is added there. This will only work for iOS crashes. With this change, for iOS we should be able to see all kind of crash notification be it due to uncaught exception or a native crash or signal errors.

For android, it will still show notifications due to uncaught exceptions. In upcoming diffs, I will change the logic for android too by parsing Logcat logs.

This diff doesn't support physical device crash reporting. The crashes for physical devices are synced to other folder and that too they are symbolicated.

Reviewed By: danielbuechele

Differential Revision: D13404648

fbshipit-source-id: 7219855ebc73451af87f77f90cc3ed0f2ab5287c
2018-12-18 13:42:40 -08:00
Pritesh Nandgaonkar
e3fb1e1d84 Disable crash reporter plugin for iOS and update callstack from array to string
Summary:
This diff does the following

- Comments out the code in iOS which sends the message to the desktop side
- Also comments out the part where signal handler is initialised, as we no longer need it. I will remove the iOS implementation completely in next few diffs
- Updated the JS side to expect call stack as a string instead of an array
- Updated the android side to send callstack as a string

I have commented out the code for crash reporter plugin of iOS as for iOS I will be adding a watchman  to a directory where crash logs are dumped. The diff related to this is in the stack

Reviewed By: passy

Differential Revision: D13424824

fbshipit-source-id: b1105da912292bf73cff948206c031de9b059abd
2018-12-18 13:42:40 -08:00
Daniel Büchele
1fc73ad2fb update plugin's package.json
Summary:
For all plugins:
- move static fields `title`, `id` and `icon` to `package.json`
- adds "bugs" field for all plugins containing links to support groups/oncalls.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13417286

fbshipit-source-id: 7b341176915f3ed7b473b95c1d879f21d7d634ef
2018-12-18 10:36:35 -08:00
Daniel Büchele
fd1a00f05e linking to logs plugin
Summary: changing the payload to work with the updated logs plugin

Reviewed By: passy

Differential Revision: D13376392

fbshipit-source-id: ccfb1b1a7a2ec3e9d3899e70c9bdd199a489da88
2018-12-11 07:57:59 -08:00
Pritesh Nandgaonkar
e84e859fc1 Limit the size of the containers and make it scrollable
Summary:
Improves the UI of crash reporter plugin

- Added max height on the value container with scrollable capabilities
- Fixed the bug in UI of the plugin where it showed the latest crash data even though one navigated to the plugin from old crash notification

Reviewed By: danielbuechele

Differential Revision: D13307302

fbshipit-source-id: 97eb96d3d9947a2835cd5572053256e0bdc01e27
2018-12-04 05:51:59 -08:00
Pritesh Nandgaonkar
fd022e3c73 Improvise UI of crash reporter plugin
Summary:
- New improved UI
- Instead of sending the callstack as a string from android, now sending it as an array
- Deeplink to Logs support just for android. In iOS crash is not automatically logged in Logs plugin, atleast thats what happens in sample app

Reviewed By: jknoxville

Differential Revision: D13216477

fbshipit-source-id: d8b77549c83572d0442e431ce88a8f01f42c9565
2018-11-30 05:28:46 -08:00
Pritesh Nandgaonkar
14431e6b76 Make crash reporter plugin device only
Summary: Makes a crash reporter plugin as a device plugin

Reviewed By: passy

Differential Revision: D13203954

fbshipit-source-id: 02ef2aff05d5a240eaff588f9b515d3d610fc182
2018-11-29 06:59:16 -08:00
Pritesh Nandgaonkar
543bc6c4fb Crashreporter Plugin
Summary: Desktop side of Crash reporter plugin

Reviewed By: jknoxville

Differential Revision: D13176724

fbshipit-source-id: d77b86b2bd9c78c0626f2e3b8c0057227d75e2b2
2018-11-26 03:43:26 -08:00