flow / flow-for-vscode

Flow for Visual Studio Code
Other
994 stars 111 forks source link

Flow fails to start on macOS #354

Closed Cyberuben closed 5 years ago

Cyberuben commented 5 years ago

Hi,

I'm attempting to run Flow using the extension on macOS. Every time Flow is enabled, I can see it processing something at the bottom of my editor (statusbar), only to be prompted with the red label Flow 0.96.0 (!). It then prompts me with a popup on the right side of the screen saying [webshop/.flowconfig] Flow: server is stopped. I couldn't find any more detailed error until I started digging into the log files.

The log in VSCode shows the following:

[Info  - 3:10:06 PM - webshop/.flowconfig] Found flow using option `useNPMPackagedFlow`
[Info  - 3:10:07 PM - webshop/.flowconfig] Using flow '/path/to/project/webshop/node_modules/flow-bin/flow-osx-v0.96.0/flow' (v0.96.0)
Launching Flow server for /path/to/project/webshop
Spawned flow server (pid=14369)
Logs will go to /private/tmp/flow/zSpathzStozSprojectzSwebshop.log
Monitor logs will go to /private/tmp/flow/zSpathzStozSprojectzSwebshop.monitor_log

Upon opening the monitor logs, I find the following error:

Aug  5 15:10:21.684 [error] Closing connection 'server #1' due to uncaught exception in read loop: End_of_file
Aug  5 15:10:21.684 [error] backtrace:
Aug  5 15:10:21.684 [error] Raised at file "map.ml", line 130, characters 10-25
Aug  5 15:10:21.684 [error] Called from file "src/core/lwt.ml", line 817, characters 20-60
Aug  5 15:10:21.684 [error]
Unable to obtain kernel buffer: Operation not permitted
usage: sudo dmesg
Aug  5 15:10:21.704 [error] Flow server (pid 14371) exited with code Unknown_error (110)
Aug  5 15:10:21.704 [info] Monitor is exiting (Dying along with server)
Aug  5 15:10:21.704 [info] Broadcasting to threads and waiting 1 second for them to exit

I can't seem to get Flow to work and after a quick Google search I can't find any error as shown here. Is there anything I can do to get it to work?

Cyberuben commented 5 years ago

I found the solution in the core of flow. Some other issues on this repo showed me that people reported errors with monorepos. After digging a bit, I found that when running flow check, the error that showed up was Subprocess(19311): fail 16Unhandled exception: SharedMem.Hash_table_full. This issue shows a fix (upping the hash table size I'm assuming)

Mayank1791989 commented 5 years ago

@Cyberuben So it's working now?

Mayank1791989 commented 5 years ago

Looks like issues is resolved.