Closed yurakruhlyk closed 2 years ago
See also #714.
Maybe in the case that it's unable to connect, it should try again after 5 seconds, then again after another 5?
This would probably help in the case that Fig launches (or invalidates a cache?) before the network interface is up, which would be my guess for what's happening here
@SeparateRecords Maybe there is possible to check when the device goes offline and after that when the device is online just to load all needed files again?
Seems to be issue with internet connection not being established on mac load. Fig is trying to load autocomplete but because there is no internet, we can't. Fig tries to reconnect to the internet just once.
Proposed solution We should attempt to reconnect to the internet multiple times but with an exponential back off. This should be done from the autocomplete app.
We should also indicate to the user that autocomplete didn't load. The autocomplete app should notify the desktop app that there was an error with the internet and should put this in the debugger
We implemented the solution discussed above except do not yet have a notification telling users that their wifi is enabled.
We still need to enable users to download the specs locally so it can work offline
We will likely enable users to download specs locally by running npm install -g @fig/autocomplete
This should be fixed! Please comment below if not :)
Sanity checks
fig doctor
in the affected terminal sessionIssue Details
Description:
When mac just reloaded or comes out of sleep, sometimes fig autocomplete just stops working. And it looks like this issue about internet connection because when I got the issue again and opened debug console I saw that some modules didn't load. After off/on to autocomplete in fig menu we got new logs in the console and everything works fine. So I think probably the module doesn't have time to load and do this before mac is online.
terminal: iTerm2 3.4.14 OS: macOS Monterey 12.0.1 (M1 Pro, 14-inch)
Environment