Flow: Flow server gets stuck in startup loop

Created on 19 Oct 2017  Â·  4Comments  Â·  Source: facebook/flow

I'm not sure even how to begin debugging this. I hadn't had issues till earlier today when I ran flow (flow-bin) but now when I run it I start seeing an infinite output of. I'm seeing this now on 0.56 and 0.57.3

yarn run v1.2.1
$ flow
Launching Flow server for /Users/wellingtoncordeiro/Documents/projects/aqueduct
Spawned flow server (pid=69559)
Logs will go to /private/tmp/flow/zSUserszSwellingtoncordeirozSDocumentszSprojectszSaqueduct.log
Launching Flow server for /Users/wellingtoncordeiro/Documents/projects/aqueduct
Spawned flow server (pid=70732)
Logs will go to /private/tmp/flow/zSUserszSwellingtoncordeirozSDocumentszSprojectszSaqueduct.log
Launching Flow server for /Users/wellingtoncordeiro/Documents/projects/aqueduct
Spawned flow server (pid=71589)
Logs will go to /private/tmp/flow/zSUserszSwellingtoncordeirozSDocumentszSprojectszSaqueduct.log
Launching Flow server for /Users/wellingtoncordeiro/Documents/projects/aqueduct
Spawned flow server (pid=72904)
Logs will go to /private/tmp/flow/zSUserszSwellingtoncordeirozSDocumentszSprojectszSaqueduct.log
Launching Flow server for /Users/wellingtoncordeiro/Documents/projects/aqueduct
Spawned flow server (pid=73869)
Logs will go to /private/tmp/flow/zSUserszSwellingtoncordeirozSDocumentszSprojectszSaqueduct.log
Launching Flow server for /Users/wellingtoncordeiro/Documents/projects/aqueduct
Spawned flow server (pid=75075)
Logs will go to /private/tmp/flow/zSUserszSwellingtoncordeirozSDocumentszSprojectszSaqueduct.log
Started a new flow server: \^C
nontermination / perf

Most helpful comment

So this turns out to be a problem that I found because my coworker had named a branch package.json and Flow had walked the .git directory. I think a good solution would be to automatically ignore .git/.hg directories.

All 4 comments

Looked into the log

[I] ➜ cat /private/tmp/flow/zSUserszSwellingtoncordeirozSDocumentszSprojectszSaqueduct.log
[2017-10-19 14:10:00] argv=/Users/wellingtoncordeiro/Documents/projects/aqueduct/node_modules/flow-bin/flow-osx-v0.57.3/flow start --temp-dir /tmp/flow /Users/wellingtoncordeiro/Documents/projects/aqueduct
[2017-10-19 14:10:00] Initializing Server (This might take some time)
[2017-10-19 14:10:00] executable=/Users/wellingtoncordeiro/Documents/projects/aqueduct/node_modules/flow-bin/flow-osx-v0.57.3/flow
[2017-10-19 14:10:00] version=0.57.3
[2017-10-19 14:10:00] Parsing
[2017-10-19 14:10:05] Building package heap
<<<<<<<<
/Users/wellingtoncordeiro/Documents/projects/aqueduct/.git/logs/refs/remotes/upstream/package.json: Expected an object literal:
Called from file "set.ml", line 320, characters 38-41
Called from file "set.ml", line 320, characters 28-36
Called from file "set.ml", line 320, characters 28-36
Called from file "set.ml", line 320, characters 28-36
Called from file "set.ml", line 320, characters 28-36
Called from file "set.ml", line 320, characters 28-36
Called from file "set.ml", line 320, characters 28-36
>>>>>>>>
Failure("/Users/wellingtoncordeiro/Documents/projects/aqueduct/.git/logs/refs/remotes/upstream/package.json: Expected an object literal")

I ended up having to add .*\.git/.* to my [ignore] to fix this.

So this turns out to be a problem that I found because my coworker had named a branch package.json and Flow had walked the .git directory. I think a good solution would be to automatically ignore .git/.hg directories.

Ha, we actually just hit this exact same problem with the same root cause.

Amusing bug! We just hit this too with a branch name that ends in .json. Our workaround is to add:

[ignore]
<PROJECT_ROOT>/.git/.*

to .flowconfig.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cubika picture cubika  Â·  3Comments

mmollaverdi picture mmollaverdi  Â·  3Comments

pelotom picture pelotom  Â·  3Comments

john-gold picture john-gold  Â·  3Comments

ghost picture ghost  Â·  3Comments