Summary:
This change will allow us to display correct stack traces in flipper UI as well as send them to scuba.
Currently correct stack traces are only displayed in the console and we do not have access to them.
Reviewed By: ivanmisuno
Differential Revision: D50015827
fbshipit-source-id: 2a60315dd5c06b2635ce0414f612ff1fdca0e489
Summary: No need to check for updates on Electron builds.
Reviewed By: antonk52
Differential Revision: D49821903
fbshipit-source-id: d836e4254bbe793921bb4a627220fee961c1c402
Summary: There are reports in which kill as is doesn't kill the process. Using the '-9' flag does, so update troubleshoot message.
Reviewed By: LukeDefeo
Differential Revision: D49537427
fbshipit-source-id: a062c92528589cecf0f41e1c344c5d0ae1c3345d
Summary: This change only adds the PWA as capable of handling files with the ".flipper" extension.
Reviewed By: aigoncharov
Differential Revision: D48353437
fbshipit-source-id: fd78942ac4dffb7d26d5ca5be826290018465b93
Summary: Not really a connectivity related log, so removed [conn] from it.
Reviewed By: passy
Differential Revision: D48266546
fbshipit-source-id: e384301d6301940366b594b4bc612349cc2264ce
Summary: Combine the two used commands as will make things easier for our users.
Reviewed By: passy
Differential Revision: D48266474
fbshipit-source-id: 1ee5c568ff001dc5ba3f11e21b09a2a6ab430ac7
Summary: It's troubleshooting in general, not only connectivity. So rename and refactor accordingly.
Reviewed By: antonk52
Differential Revision: D47914411
fbshipit-source-id: 658563bfd33427f11fe9f7660b0985fc3f013866
Summary: Reuse the function that was refactored on previous diff.
Reviewed By: antonk52
Differential Revision: D47873752
fbshipit-source-id: 71e12cd34d1826080487297e308450cb2a2a5c26
Summary:
Extract notification creation from inside the existing function.
This will be reused to display connection notifications from the server event.
Reviewed By: antonk52
Differential Revision: D47873728
fbshipit-source-id: c01dc93dfef28135ecf7e77e92d4d517af082125
Summary:
There's a generic notification server event.
This change introduces a new notification server event dedicated for connection troubleshoot.
The difference is, this notification will have a button to troubleshoot the issue. Additionally, in the future, we may even be able to add a payload so that we can troubleshoot the exact problem.
Reviewed By: antonk52
Differential Revision: D47873697
fbshipit-source-id: 28843a08836d0054909f6b9ab7a88b14b8a1b868
Summary: Add key for server error notifications as to prevent duplicates.
Reviewed By: antonk52
Differential Revision: D47869240
fbshipit-source-id: 7c826ab07a8f92bd053200786ed990ad78bbfa67
Summary: If the notification is shown, allow engineers to switch to the connectivity troubleshooting view as it may highlight where the problem is.
Reviewed By: antonk52
Differential Revision: D47869154
fbshipit-source-id: f4154bb230d891dc4ac108b5acbe7e6541ffed1a
Summary: Add a key such that the same notification does not appear again for the same device/app.
Reviewed By: antonk52
Differential Revision: D47835045
fbshipit-source-id: 78237b4102aa199ebea23b7c5726b567fc4de91e
Summary: Timeout exceptions while connection to new clients where rethrown but catched nowhere. Probably this warning should be handled more gracefully, but this at least moves it to warn rather than spawning our monitoring on transient issues
Reviewed By: passy, antonk52
Differential Revision: D47665050
fbshipit-source-id: ad51808d12e9f4de318d4426933ecb3787839b7c
Summary: "send" returns "void" which means we do not care about the execution result, including errors
Reviewed By: lblasa
Differential Revision: D47398015
fbshipit-source-id: ef185575f6e91d69356ab88c7f3d213033759da8
Summary:
Usage tracking comes from Electron's `main.tsx`. There's a timer that dispatches an IPC event every 60 seconds.
This is all good for Electron builds.
For non-electron builds, there's no such thing as IPC.
So, react to the IPC event whenever necessary but also handle the interval internally such that usage is tracked independently of explicit callers.
Reviewed By: antonk52
Differential Revision: D47053404
fbshipit-source-id: f17694e65eed18678b45a2e815813bafab69c3f1
Summary: A transition period of 2 years should be enough.
Reviewed By: LukeDefeo
Differential Revision: D47053216
fbshipit-source-id: c9f9bfbff82a05942d408b325088095a6069cced
Summary:
^
Basically, update Jest and fix any raised issues. Mainly:
- Update necessary dependencies
- Update snapshots
- `useFakeTimers` caused a few issues which meant that the way we hook into the performance object had to be tweaked. The main code change is: `//fbsource/xplat/sonar/desktop/scripts/jest-setup-after.tsx`
- `mocked` -> `jest.mocked`
Changelog: Update Jest to v29.5.1
Reviewed By: antonk52
Differential Revision: D46319818
fbshipit-source-id: d218ca8f7e43abac6b00844953ddeb7f4e1010a2
Summary: It makes little sense to hide this info from developers. It was also requested by antonk52
Reviewed By: LukeDefeo
Differential Revision: D44631235
fbshipit-source-id: 1756c5ca2a95b2f815f8c4336621d3c057b704f2
Summary:
This command is never actually dispatched so removing to avoid future confusion.
When new plugins are downloaded a check is done here https://fburl.com/code/e3zedljb to see if pluginIsDisabledForAllConnectedClients, if so, load command is queued, which internally calls update (which resets state)
If the plugin is not disabled then a message appears asking user to manually reload.
Reviewed By: aigoncharov
Differential Revision: D44502476
fbshipit-source-id: b796b77f843218c07ee612d9f45cacba073362d3
Summary:
Previously the left rail state was decided by prescense of user profile but we are moving to logged in state being based on the atom.
As a result we need to cache the user profile so we have something to display when user not on vpn on startup
Reviewed By: aigoncharov
Differential Revision: D44502477
fbshipit-source-id: 11462d24c773d6d364e844b4f606e124e5278348
Summary: See https://fb.workplace.com/groups/flippersupport/permalink/1586389021841750/. Flipper suggests that not connecting to VPN is the problem, while the problem can also not being logged in.
Reviewed By: antonk52
Differential Revision: D44164192
fbshipit-source-id: 993d2a4bdc6a9cb0c45f35856b83449cea294d45
Summary: Plugin download failure is typical a transient error, no need to trigger monitoring for that
Reviewed By: ivanmisuno
Differential Revision: D43118116
fbshipit-source-id: 0cd0f87f0ed6123adcba28139308ecea92b1b508
Summary:
In our organization, Flipper is distributed in a version controlled way. As a result, we do not want users to manually update or receive prompts to update when a new version is available. There is already a `--updater` flag in the command line arguments for flipper.exe, but it isn't piped through. This change pipes it through and disables all update related UI when `--no-updater` is passed in.
## Changelog
Support --updater and --no-updater options for flipper.exe
Pull Request resolved: https://github.com/facebook/flipper/pull/4277
Test Plan: Ran `yarn build --win` in flipper/desktop, and launched flipper.exe from flipper/dist/win-unpacked with the `--updater`, `--no-updater` and no flags and ensured the proper behavior was observed (update UI shows by default or when `--updater` is specified, and doesn't show when `--no-updater` is specified).
Reviewed By: passy
Differential Revision: D41298321
Pulled By: mweststrate
fbshipit-source-id: 5ddfede2700954f0fdd6a111b20d0836fab25565
Summary:
Flipper plugins fail when importing css from third-party dependencies. This diff tries to fix that.
Effectively, the plugin can import the css and export it when is bundled.
When we load the plugin, we check if there's a css file for it. If there's one, we return it and try to use it.
Reviewed By: aigoncharov
Differential Revision: D40758178
fbshipit-source-id: e53afffcc481504905d5eeb1aea1f9114ee2a86b
Summary:
There were some situations were we would hang waiting for new clients but one had connected.
Additionally the old approach would close and reopen the dialog every time a state update happened in the redux store which was a little jarring. Now the polling of the update is independant the dialog
The dialog still flashes for other parts of the flow (when scanning for devices) and would be nice to fix this too in the future
Reviewed By: mweststrate
Differential Revision: D40477502
fbshipit-source-id: d1ff161f262493cf5b3fb74e22b49ed65de8c292
Summary: We were incorrectly assuming a client did not support a plugin because it was not fully initialized. This issue was only apparant on start deep links
Reviewed By: mweststrate
Differential Revision: D40477503
fbshipit-source-id: 5fd9db765f559b8eb80cc3680ee694dfd2cf9a37
Summary:
Show users a way to fix Flipper EADDRINUSE on their own without filing a support request
CHANGELOG: Better error message for EADDRINUSE
Reviewed By: mweststrate
Differential Revision: D40338164
fbshipit-source-id: ec0419c78983b55736aa773757775b5302da51e0
Summary: Previously opening a deep link would always fail with flipper thinking the plugin did not exist. In this diff we wait for plugins to be initialized
Differential Revision: D40142275
fbshipit-source-id: 7894fc60a6df57e13395e05263b0905847b11ad3
Summary: Without this change gatekeeped and disabled plugins are also counted as loaded, which results in plugin duplication in the UI
Reviewed By: lblasa
Differential Revision: D39695335
fbshipit-source-id: 759e2e0eaead1bee0f7d61e4ba3d1b8e4b6c0976
Summary:
We would like to version control Flipper and some of our custom plugins that are installed on developers' systems.
Flipper by default prompts users to upgrade so they sometimes do the update and then all our custom plugins break because they were compiled for an older version.
See https://github.com/facebook/flipper/issues/3947 for feature request info.
## Changelog
Adds notifyAvailable flag to config.json to disable prompting for users that "an update is available"
Pull Request resolved: https://github.com/facebook/flipper/pull/3992
Test Plan:
Tested by running locally.
Had to comment out the isProduction() check to confirm this it worked properly because this flag is false on dev versions.
Couldn't figure out how to manually test the handleOpenPluginDeeplink.tsx change but made a similar change there; happy to test that if you can tell me how to exercise that path.
Reviewed By: antonk52
Differential Revision: D39654481
Pulled By: antonk52
fbshipit-source-id: cef6b48d870915c48f620269c42d24b8ef1f4c29
Summary:
In D39311893 (094c5bdfdd) we started monkey-patching `require` to resolve global dependencies in the plugins. Apparently, patching `globalThis.require` did not work in the electron env. On my local machine it kept working because I had the experimental `flipper-server` feature enabled which embeds flipper-server into the electron build. In flipper-server we properly patch `require` via `Module.prototype.require` which affected the global require in electron.
With this fix we now properly patch require in electron via Module.prototype.require all the time
Changelog: Fix plugin loading with experimental flipper-server disabled
Reviewed By: nikoant
Differential Revision: D39633821
fbshipit-source-id: 9554f643c625620d116075ae87f573d8447850f6
Summary: `requirePlugin` in electron uses native `require` which has a built-in cache. Without this fix a stale version of the plugin loaded.
Reviewed By: lblasa
Differential Revision: D39542121
fbshipit-source-id: e6c4b65f9ea7b816803baaae537c234914fcb3d7
Summary: esbuild references external modules via `require`. We wrap `require` to point the references to built-in modules to global variables
Reviewed By: lblasa
Differential Revision: D39311893
fbshipit-source-id: a99480161c082f4095d78c22271f114532f32c16
Summary: As we stopped bundling plugins in D39276249, we no longer need the entry points for the bundled plugins (these entry points are always going to be empty)
Reviewed By: lblasa
Differential Revision: D39307565
fbshipit-source-id: 43751fe31c8bd962677c226b27cfe52093d3f2d4
Summary: Stop bundling plugins into Flipper Server bundles. In later diffs, we will start building all plugins even in dev mode which removes the need to bundle them.
Reviewed By: lblasa
Differential Revision: D39276249
fbshipit-source-id: 091405cfcf58aa7e1bd2b382da40f8d9841ae6b1