Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The flow server is not responding" #1428

Closed
mvolkmann opened this issue Feb 21, 2016 · 31 comments
Closed

"The flow server is not responding" #1428

mvolkmann opened this issue Feb 21, 2016 · 31 comments

Comments

@mvolkmann
Copy link
Contributor

I get this message when trying to start the flow server on a Mac by just entering "flow".
I do not have a flow server running in a different terminal.
I installed flow with "npm install -g flow-bin".
I did not install it using homebrew.

@samwgoldman
Copy link
Member

Thanks for reporting!

If you still have the terminal output around, or you are able to reproduce the issue, can you provide a verbatim transcript of your session? (Or at least as much as you can/feel comfortably with.)

That particular error message should be accompanied by more output, specifically a) the number of retries remaining and b) some status like [parsing], [merging inference] or [processing].

Also, Flow should have output a path to a log file. The contents of that log file would be enormously helpful to debug this issue.

@mvolkmann
Copy link
Contributor Author

Here is the session output:

flow$ flow
Launching Flow server for /Users/Mark/Documents/training/React/react-examples/flow
Spawned flow server (child pid=5640)
Logs will go to /private/tmp/flow/zSUserszSMarkzSDocumentszStrainingzSReactzSreact-exampleszSflow.log
Launching Flow server for /Users/Mark/Documents/training/React/react-examples/flow
Spawned flow server (child pid=5668)
Logs will go to /private/tmp/flow/zSUserszSMarkzSDocumentszStrainingzSReactzSreact-exampleszSflow.log
Launching Flow server for /Users/Mark/Documents/training/React/react-examples/flow
Spawned flow server (child pid=5695)
Logs will go to /private/tmp/flow/zSUserszSMarkzSDocumentszStrainingzSReactzSreact-exampleszSflow.log
Launching Flow server for /Users/Mark/Documents/training/React/react-examples/flow
Spawned flow server (child pid=5722)
Logs will go to /private/tmp/flow/zSUserszSMarkzSDocumentszStrainingzSReactzSreact-exampleszSflow.log
The flow server is not responding (0 retries remaining): [processing] /
Out of retries, exiting!
flow$

Here is the log file content:

[2016-02-20 22:32:53] Initializing Server (This might take some time)
[2016-02-20 22:32:53] executable=/usr/local/lib/node_modules/flow-bin/vendor/flow
[2016-02-20 22:32:53] version=0.22.0
/Users/Mark/Documents/training/React/react-examples/flow/flow-libs/ No such file or directory
[2016-02-20 22:32:53] Parsing
/Users/Mark/Documents/training/React/react-examples/flow/public No such file or directory
[2016-02-20 22:32:53] Building package heap
[2016-02-20 22:32:53] Running local inference
[2016-02-20 22:32:53] Re-resolving directly dependent files
[2016-02-20 22:32:53] Calculating dependencies
[2016-02-20 22:32:53] Merging
[2016-02-20 22:32:53] Done
[2016-02-20 22:32:53] Server is READY
[2016-02-20 22:32:53] Took 0.480581 seconds to initialize.
Fatal error: exception End_of_file

@mvolkmann
Copy link
Contributor Author

I think I see the problem. Here is my .flowconfig file:

[ignore]
.*/node_modules

[include]
public
../node_modules/

[libs]
flow-libs/

[options]
module.name_mapper='.css$' -> 'empty/object'

Note how it references the directories flow-libs and public. Those directories didn't exist. After I added those, it worked. Maybe error messages that describe that issue could be added or maybe that shouldn't be an error.

@samwgoldman
Copy link
Member

Thanks! We absolutely should fix the error message here. What's happening
is an unhandled exception that crashes the server, which we need to catch.
Will attempt to repro using the information provided.
On Sun, Feb 21, 2016 at 4:15 AM Mark Volkmann notifications@github.com
wrote:

I think I see the problem. Here is my .flowconfig file:

[ignore]
.*/node_modules

[include]
public
../node_modules/

[libs]
flow-libs/

[options]
module.name_mapper='.css$' -> 'empty/object'

Note how it references the directories flow-libs and public. Those
directories didn't exist. After I added those, it worked. Maybe error
messages that describe that issue could be added or maybe that shouldn't be
an error.


Reply to this email directly or view it on GitHub
#1428 (comment).

@mroch
Copy link
Contributor

mroch commented Jul 8, 2016

Pretty sure we fixed this crash in 0.26 or 0.27. Let me know if it happens again!

@mroch mroch closed this as completed Jul 8, 2016
@techrah
Copy link

techrah commented Feb 23, 2017

This happened to me today with flow 0.37.4. I ended up rebooting to get it to work again.

@imoby
Copy link

imoby commented Mar 14, 2017

This is still happening to me as well

@suark
Copy link

suark commented Apr 11, 2017

Getting this error when running it

$ yarn run flow
yarn run v0.21.3
$ "C:\Users\Brian\dev\personal\website\node_modules\.bin\flow"
Launching Flow server for C:\Users\Brian\dev\personal\website
Spawned flow server (pid=1148)
Logs will go to C:\Users\Brian\AppData\Local\Temp\flow\CzCzBUserszB
BrianzBdevzBpersonalzBwebsite.log
flow is still initializing; this can take some time. [local inferen
flow is still initializing; this can take some time. [merging infer
flow is still initializing; this can take some time. [merging infer
flow is still initializing; this can take some time. [merging infer
The flow server is not responding (3 retries remaining): [processin
The flow server is not responding (2 retries remaining): [processin
The flow server is not responding (1 retry remaining): [processing]
The flow server is not responding (0 retries remaining): [processin
g] /
Out of retries, exiting!
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation ab
out this command.

@antonellil
Copy link

It is happening still with 0.46.0 on windows

@darekkay
Copy link

There is another (open) issue: #3323

@Saturate
Copy link

Saturate commented Jun 7, 2017

This happens for me when I use the following configuration on Windows 10.

[ignore]
.*/node_modules/stylelint/.*
[include]

[libs]

[options]

@nahuelhds
Copy link

Folks, in my case (I'm on Windows 10) the issue were resolved by running watchman watch-del-all and then uninstalling watchman. It seems just weird but anytime I install watchman flow doesn't work.

@strizzwald
Copy link

This is still happening. I experienced on windows 10. I removed the contents of .flowconfig re-ran flow and added the contents of .flowconfig back.

@Jorundur
Copy link

Jorundur commented Jan 3, 2018

I just experienced this on macOS High Sierra, couldn't fix using any of the ideas above.
However, soon my mac got quite noisy so I opened up Activity Monitor and saw that flow was using 37GB of Memory. I quit it in Activity Monitor and that fixed it, running flow again works now.

@Apidcloud
Copy link

Same here (windows 10).

Probably an issue with .flowconfig that goes unreported and crashes the server.

@pietrofxq
Copy link

pietrofxq commented Jan 21, 2018

I'm having this issue too on windows 10. This issue appears to be random, sometimes just adding a blank line in the .flowconfig file and running flow again makes it work, the same for deleting all the contents and then adding the file again. Sometimes, a flow.exe process is left behind and this causes the issue too - stopping the process and running flow again fixes the issue.

I'll have to stop using flow due to this, it's really annoying.

@gtdeng
Copy link

gtdeng commented Jan 25, 2018

My solution involves killing all instances of it pkill -f flow-bin on osx with flow@0.63.1 installed locally.

@mifrej
Copy link

mifrej commented Feb 6, 2018

Still occurs macOS

@alessandro-pianetta
Copy link

I tried the solution that @gtdeng proposed, but running npm run flow afterwards still results in the error The flow server is not responding.

I'm using the .flowconfig file that react-native init creates for you, with the version modified to ^0.65.0 as I got errors when I used npm i flow-bin@0.63. I noticed that in [libs], node_modules/react-native/flow-github/ was listed. I removed it and flow started working again, but throws the following error after finding a typing error:

Error: src/App.js:24
24:     return x;
               ^ number. This type is incompatible with the expected return type of
22: function foo(x: ?number): string {
                              ^^^^^^ string


Found 1 error
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! flowtest@0.0.1 flow: `flow`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the flowtest@0.0.1 flow script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aapiane09/.npm/_logs/2018-02-11T23_36_45_792Z-debug.log

Running flow status afterwards did not repeat this error, though.

@hom-bahrani
Copy link

@gtdeng solution works the first time I ran flow status after it crashed, it restarted the background process and reported the errors as before. But when I tried to run flow status again I experienced the same error message above

The flow server is not responding (0 retries remaining): /
Out of retries, exiting!

@hom-bahrani
Copy link

running flow check command instead of flow status seems to be ok for me

@chiaweilee
Copy link

the same #6025

@achepukov
Copy link

Faced with this issue b/c flow was installed globally, and global's version mismatch local project's one. Removing global fixed the issue.

@stereobooster
Copy link

I was getting The flow server is not responding on Mac OS X a lot, but haven't seen those on Linux. So I decided to run Flow from Docker

docker run -v $(pwd):/opt/project -w /opt/project stereobooster/flow

But I haven't yet figured out how to keep Flow server running in the background

@toblerpwn
Copy link

An empty [include] 'section' was my issue. Removing the [include] line (which was unused anyway) fixed my problem.

@EugeneZ
Copy link

EugeneZ commented Jun 18, 2018

I was having this problem when running yarn flow, but when I tried yarn flow check it crashed with some JSON file it was parsing. So adding it to the [ignore] section fixed the problem. In my case: .*/node_modules/watchify/node_modules/module-deps/test/invalid_pkg/package.json

@joshdeng
Copy link

joshdeng commented Sep 7, 2018

@achepukov solution fixed it for me. Everything starts working now after removing the flow-bin installed globally.

@wmik
Copy link

wmik commented Sep 19, 2018

Here's one more solution!
Working from a 64-bit windows 10 machine, I discovered that another flow server was running by executing npm run flow stop which output the following:

> flow "stop"

Trying to connect to server for `<path_to_project>`
Attempting to meanly kill server for `<path_to_project>`
Successfully killed server for `<path_to_project>

Executing npm run flow after that seemed to work just fine 😄

@cmmash
Copy link

cmmash commented Feb 27, 2019

Try stopping flow (flow stop) first then run it. In my case, an instance of flow server was already running, not sure why, maybe it was a zombie from before or maybe I just forgot about it after running flow once.

Edit: @wmik already beat me to it 😄

@okevino47
Copy link

hey :) sorry to reopen the subject i dunno if there is other topics which were opened since but i had the error me too on mac os (M1 chipset i don t know if that change something), here are the logs of flow:

		husky > pre-commit (node v14.16.0)
		$ flow
		Launching Flow server for /Users/username/...
		Spawned flow server (pid=11399)
		Logs will go to /private/tmp/flow/projectUserName.log
		Monitor logs will go to /private/tmp/flow/projectUserName.monitor_log
		Started a new flow server: -Please wait. Server is starting up
		Please wait. Server is starting up
		Please wait. Server is starting up
		Please wait. Server is starting up
		Lost connection to the flow server (3 retries remaining)

@poocart
Copy link

poocart commented Dec 29, 2021

@okevino47 I'm getting the same as you, can't get around: replaced node, none of flow instances are running (stopped as well), but can't get it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests