facebookarchive / ide-flowtype

Flow support for Atom IDE
Other
178 stars 17 forks source link

Missing information and/or Not Working? #10

Open bradennapier opened 7 years ago

bradennapier commented 7 years ago

Not sure what's up but I can't really tell if this is working. Dont have any instructions other than to install the one package so I would imagine it should be fine.

Anyway, looks like exciting stuff!

The Issue

Outline view is completely empty - no provider provided

image

Not Getting Type Hints

Type hints also do not seem to work. I do not currently see anything at all in terms of hints like shown in the screenshot.

Not Getting Autocomplete

It would appear that autocomplete does not do anything or show up at all?

Go To Definition?

I dont think this works either

wbinnssmith commented 7 years ago

hey @bradennapier,

Happy you're excited about the package :) I know we are too.

Could you provide a bit more context, like your OS and its version, and your Atom version?

Can you confirm running flow from the command line in your project produces valid results?

Thanks!

bradennapier commented 7 years ago

Yes, and nuclide works for the most part minus some really annoying bugs that ive reported recently there.

I am on the latest atom version on osx

Atom: 1.19.2

Flow appears to work fine.

pascalduez commented 7 years ago

Hi,

can't get it working as well, no Flow error showing while present on the flow cli. Nothing in the "outline view".

Atom 1.19.5 Ubuntu 16.04 LTS Flow: 0.52 (in local node_modules)

I disabled all "linter" packages I had (very sad BTW).

pascalduez commented 7 years ago

Also the fact that I have to disable all my linter linter-* packages is leaving me very confused. Hope we could manage to make them work together.

hansonw commented 7 years ago

Anything in the console? @pascalduez

Note that atom-ide-ui is a drop-in replacement for linter, so you can continue to use all the linter-* packages (It's just that also having linter means you'll have 2 linting UIs.)

pascalduez commented 7 years ago

Gave it another try, nothing interesting in the console. Some linter errors (ESLint) shows up in the diagnostic panel though, but no Flow. Also busy-signal seems bypassed.

saadq commented 7 years ago

Edit: I thought I had the same issue with the flow stuff not working, but the issue seemed to be coming from #13 which mentions that it is necessary for the .flowconfig to be in the root project folder.

bradennapier commented 7 years ago

So on the announcement I tried all this again and it all still fails ... nothing works and no error what-so-ever. .flowconfig is in my project directory so that isnt it... ???

bradennapier commented 7 years ago

Oh... welll this whole thing is 100% useless

image

If you it can't support es6 then I don't see any point in this... not sure why nuclide does and this does not?

Update:

Upon adding flowtype-ide back in (just uninstalled EVERYTHING to try to make this work...)

now it says

image

bradennapier commented 7 years ago

image

No errors

Atom version 1.21.0 beta0

saadq commented 7 years ago

@bradennapier Is your .flowconfig in the root project folder that you have open in Atom? That was my issue. Your example works for me:

screen shot 2017-09-12 at 9 26 21 pm screen shot 2017-09-12 at 9 28 52 pm
JustasPolis commented 7 years ago

Same thing as @bradennapier. @saadq, double-checked, but .flowconfig is in root folder.

test repository: https://github.com/JustasPolis/flow-test

Environment:

Can confirm running npm run flow catches type errors, on hover I get type definitions, but no type errors in IDE (disabled previously installed linter as requested in diagnostics).

bradennapier commented 7 years ago

I deleted node_modules, unchecked using flow bin from node_modules and it seems to have fixed some things... some other issues currently remain tha I am trying to figure out... flow is not working in most of my files still

(I also essentially removed every single package I had which is obviously not going to work longer term since many of them are crucial)

image

dralletje commented 7 years ago

@bradennapier I had weird errors like that too, but you can check "Current file only" and they shouldn't show up :-)

bradennapier commented 7 years ago

Yeah but they are there in those files :-P

bradennapier commented 7 years ago

Ugh - broke again when they just updated to 0.31 of atom-ide-ui -- no errors yet again... yay

dralletje commented 7 years ago

You are working in the app/shared/processes/... file?

bradennapier commented 7 years ago

No, but if i open that folder then those files have flow errors as shown so the issue remains. I can not look at the errors and they will be gone, sure but that doesnt do much good :-P

bradennapier commented 7 years ago

image

Now it is semi-working... it shows the types but gives me no errors at all

saadq commented 7 years ago

Do you have a dummy project or something that you could possibly upload to GitHub? Might be easier to see if someone could help debug

bradennapier commented 7 years ago

Something insanely weird def going on... i get it working then it fails then it crashes then it doesnt work -- restarting over and over and over fixes it for a few minutes.

Finally saw errors this time in the console...

Uncaught (in promise) Error: Emitter has been disposed
    at Emitter.module.exports.Emitter.on (/private/var/folders/w9/9j_nzh255d1cd0l17hm_y_c40000gn/T/AppTranslocation/CF40807D-F9DF-4B48-8D8C-6C1569B2BC47/d/Atom Beta.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:77:21)
    at IndieDelegate.onDidDestroy (/Users/bradennapier/.atom/packages/linter/lib/indie-delegate.js:75:25)
    at LinterPushV2Adapter.attach (/Users/bradennapier/.atom/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/adapters/linter-push-v2-adapter.js:35:11)
    at FlowLanguageClient.startExclusiveAdapters (/Users/bradennapier/.atom/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/auto-languageclient.js:236:27)
    at /Users/bradennapier/.atom/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/auto-languageclient.js:192:14
    at Generator.next (<anonymous>)

I will get a repo out after i try a few more things...

JustasPolis commented 7 years ago

@saadq
example: https://github.com/JustasPolis/flow-test

No type errors in IDE, npm run flow shows errors :).

bradennapier commented 7 years ago

Oh wow yeah.. upon running flow from command line, it is finding hundreds and hundreds of things that I am not warned about at all in the IDE.

saadq commented 7 years ago

Hmm, sorry never mind I don't think I can help I don't know why it's working for me and not you :/

screen shot 2017-09-12 at 11 14 25 pm

JustasPolis commented 7 years ago

Your OS is mac/linux ?

saadq commented 7 years ago

Yeah, I'm on macOS Sierra with Atom 1.20.0.

JustasPolis commented 7 years ago

gotcha, probably it's windows related.

bradennapier commented 7 years ago

My issue was on OSX so i think it has something to do with Flow crashing and/or not working right without errors in various situations. I am running into a LOT of problems like this where I have to restart atom to get it working again - it seems like it still works but locks up and returns the same results every change.

pascalduez commented 7 years ago

Let's try to clear a point: is this supposed to work for Atom versions < 1.21 ?

http://blog.atom.io/2017/09/12/announcing-atom-ide.html

We strongly recommended you use Atom Beta 1.21

Mmwell https://github.com/flowtype/ide-flowtype/blob/master/package.json#L14

bradennapier commented 7 years ago

It has been around for awhile. I originally had installed it a few weeks ago, so yes it should work. However, according to the Atom blog post, the full quote is as follows

We strongly recommended you use Atom Beta 1.21 as it includes the necessary file monitoring and process control to ensure the underlying language servers are running properly.

So sounds like some fixes on Atom's side to make it ready for a public announcement were included in 1.21 but it is not dependent on it.

retrixe commented 7 years ago

It's also happening with Atom Beta 1.21-beta0, Ubuntu 17.04. No global installation of Flow, default configuration I am using.

lettertwo commented 7 years ago

I'm also having this problem where flow errors do not show up in diagnostics.

os: macOS Sierra 10.12.5 atom: 1.21.0-beta0 ide-flowtype: 0.17.0

I turned on debug and tailed the flow-language-server.log and got:

flow-language-server.log ``` 2017-09-13 11:38:20.938 DEBUG (pid:91843) index - LSP connection initialized. Connecting to flow... 2017-09-13 11:38:20.945 INFO (pid:91843) flow-versions - Determining the version of flow for your project... 2017-09-13 11:38:20.989 INFO (pid:91843) flow-versions - Found flow version requirement 0.53.0 in your package.json 2017-09-13 11:38:20.992 INFO (pid:91843) flow-versions - Found flow version requirement ^0.53.0 in your .flowconfig 2017-09-13 11:38:20.993 INFO (pid:91843) flow-versions - Looking for a version of flow matching ^0.53.0... 2017-09-13 11:38:21.103 INFO (pid:91843) flow-versions - version info { pathToFlow: '$PROJECT_PATH/node_modules/flow-bin/flow-osx-v0.53.0/flow', flowVersion: '0.53.0' } 2017-09-13 11:38:21.106 INFO (pid:91843) flow-versions - Using the flow bin in node_modules 2017-09-13 11:38:21.109 INFO (pid:91843) nuclide-flow-rpc - [unknown]: Flow server in $PROJECT_PATH/ 2017-09-13 11:38:21.111 INFO (pid:91843) Diagnostics - Beginning to observe diagnostics 2017-09-13 11:38:21.114 INFO (pid:91843) nuclide-flow-rpc - Creating Flow IDE connection stream 2017-09-13 11:38:21.114 INFO (pid:91843) nuclide-flow-rpc - Got a subscriber for the Flow IDE connection stream 2017-09-13 11:38:21.115 INFO (pid:91843) nuclide-flow-rpc - Attempting to start IDE connection... 2017-09-13 11:38:21.119 INFO (pid:91843) index - Flow language server started 2017-09-13 11:38:21.132 DEBUG (pid:91843) TextDocuments - TextDocuments: adding document file://$PROJECT_PATH/app/components/DetailScrollView/DetailScrollView.js 2017-09-13 11:38:21.135 DEBUG (pid:91843) TextDocuments - TextDocuments: adding document file://$PROJECT_PATH/app/components/CollapsibleHeaderScrollView.js 2017-09-13 11:38:21.136 DEBUG (pid:91843) TextDocuments - TextDocuments: adding document file://$PROJECT_PATH/app/App.js 2017-09-13 11:38:21.137 DEBUG (pid:91843) TextDocuments - TextDocuments: adding document file://$PROJECT_PATH/app/events/components/EventsListView.js 2017-09-13 11:38:21.169 INFO (pid:91843) nuclide-flow-rpc - [not running]: Flow server in $PROJECT_PATH/ 2017-09-13 11:38:21.338 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:21] Initializing Server (This might take some time) [2017-09-13 11:38:21] executable=$PROJECT_PATH/node_modules/flow-bin/flow-osx-v0.53.0/flow [2017-09-13 11:38:21] version=0.53.0 Skipping $PROJECT_PATH/flow/: No such file or directory [2017-09-13 11:38:21] Parsing 2017-09-13 11:38:21.592 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:21] File $PROJECT_PATH/node_modules/art/parsers/svg/text.js is malformed 2017-09-13 11:38:23.278 INFO (pid:91843) nuclide-flow-rpc - [init]: Flow server in $PROJECT_PATH/ 2017-09-13 11:38:26.632 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:26] Building package heap 2017-09-13 11:38:26.732 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:26] Loading libraries 2017-09-13 11:38:33.231 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:33] Resolving dependencies 2017-09-13 11:38:34.065 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:34] Calculating dependencies 2017-09-13 11:38:34.117 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:34] Merging 2017-09-13 11:38:42.052 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:42] Done 2017-09-13 11:38:42.057 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:42] Server is READY [2017-09-13 11:38:42] Took 20.720942 seconds to initialize. 2017-09-13 11:38:42.891 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:42] Status: Error 2017-09-13 11:38:42.909 INFO (pid:91843) nuclide-flow-rpc - [ready]: Flow server in $PROJECT_PATH/ 2017-09-13 11:38:42.953 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:42] Adding new persistent connection 2017-09-13 11:38:42.954 INFO (pid:91843) nuclide-flow-rpc - Flow IDE process stderr: received subscribe request 2017-09-13 11:38:42.987 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:38:42] Subscribing client to push diagnostics 2017-09-13 11:38:43.530 INFO (pid:91843) nuclide-flow-rpc - Flow IDE process stderr: sent diagnostics notification 2017-09-13 11:38:43.531 ERROR (pid:91843) nuclide-flow-rpc - { AssertionError: Expected path to not be null or undefined at flowMessageToDiagnosticMessage (~/.atom/packages/ide-flowtype/node_modules/flow-language-server/lib/pkg/nuclide-flow-rpc/lib/diagnosticsParser.js:163:24) at Array.map (native) at flowStatusOutputToDiagnostics (~/.atom/packages/ide-flowtype/node_modules/flow-language-server/lib/pkg/nuclide-flow-rpc/lib/diagnosticsParser.js:34:30) at collateDiagnostics (~/.atom/packages/ide-flowtype/node_modules/flow-language-server/lib/pkg/nuclide-flow-rpc/lib/FlowSingleProjectLanguageService.js:805:76) at ScanSubscriber.updateDiagnostics [as accumulator] (~/.atom/packages/ide-flowtype/node_modules/flow-language-server/lib/pkg/nuclide-flow-rpc/lib/FlowSingleProjectLanguageService.js:661:25) at ScanSubscriber._tryNext (~/.atom/packages/ide-flowtype/node_modules/rxjs/operator/scan.js:109:27) at ScanSubscriber._next (~/.atom/packages/ide-flowtype/node_modules/rxjs/operator/scan.js:102:25) at ScanSubscriber.Subscriber.next (~/.atom/packages/ide-flowtype/node_modules/rxjs/Subscriber.js:89:18) at SwitchMapSubscriber.notifyNext (~/.atom/packages/ide-flowtype/node_modules/rxjs/operator/switchMap.js:124:30) at InnerSubscriber._next (~/.atom/packages/ide-flowtype/node_modules/rxjs/InnerSubscriber.js:23:21) name: 'AssertionError', actual: false, expected: true, operator: '==', message: 'Expected path to not be null or undefined', generatedMessage: false } 2017-09-13 11:38:43.535 INFO (pid:91843) nuclide-flow-rpc - No more IDE connection stream subscribers -- shutting down connection watcher 2017-09-13 11:38:43.536 ERROR (pid:91843) flow-language-server - uncaughtException TypeError: Cannot read property 'error' of undefined at handleNotification (~/.atom/packages/ide-flowtype/node_modules/vscode-jsonrpc/lib/main.js:479:27) at processMessageQueue (~/.atom/packages/ide-flowtype/node_modules/vscode-jsonrpc/lib/main.js:246:17) at Immediate. (~/.atom/packages/ide-flowtype/node_modules/vscode-jsonrpc/lib/main.js:233:13) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5) 2017-09-13 11:38:43.575 INFO (pid:91843) nuclide-flow-rpc - Flow IDE process stderr: Unhandled exception: End_of_file Raised at file "bytes.ml", line 219, characters 25-34 Called from file "string.ml", line 106, characters 2-26 2017-09-13 11:38:43.576 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): Lost connection to client 2017-09-13 11:38:43.577 ERROR (pid:91843) nuclide-flow-rpc - Unknown return code from Flow: 110 2017-09-13 11:38:43.578 INFO (pid:91843) nuclide-flow-rpc - [unknown]: Flow server in $PROJECT_PATH/ 2017-09-13 11:41:47.161 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): Skipping $PROJECT_PATH/flow/: No such file or directory 2017-09-13 11:41:47.198 DEBUG (pid:91843) nuclide-flow-rpc - flow server (91862): [2017-09-13 11:41:47] sending (737 errors) and (warnings from 1040 files) to 0 subscribed clients (of 0 total) ```
Arcanemagus commented 7 years ago

@bradennapier @pascalduez This should only work for Atom v1.21.0-beta0 and up, atom-ide-ui was recently changed to take advantage of several features that are only available in that version of Atom that allowed several bugs to be fixed related to watching files.

bradennapier commented 7 years ago

@Arcanemagus yes, as stated a couple comments up... adn it actually DID work before this it just had lots of issues and crashes

hansonw commented 7 years ago

@Arcanemagus ide-flowtype is supported in earlier versions of Atom. Flow has its own file watcher that doesn't rely on LSP's file watching service. I think there's an issue with null diagnostics that we're going to fix.

Arcanemagus commented 7 years ago

@bradennapier You said it should work in earlier versions, but as far as I know it was just recently changed to require Atom v1.21.0-beta0.

@hansonw Ah, good to know.

As an additional point of data, this plugin is only working for Outline views for me, all other services are completely failing to work so hopefully this "null diagnostics" issue fixes that 😉.

wbinnssmith commented 7 years ago

I just merged @hansonw's changes and published a corresponding version of ide-flowtype. Let us know if this addresses your issues!

bradennapier commented 7 years ago

Cool with let you know! No issues thus far!

Arcanemagus commented 7 years ago

How would I enable debug mode to get more information? It's still not working for me unfortunately.

os: Windows 10 x64 atom-ide-ui: 0.3.1 ide-flowtype: 0.17.4

hansonw commented 7 years ago

@Arcanemagus run atom.config.set('core.debugLSP', true). Also check the contents of the flow-language-server.log (found in os.tmpdir(), not sure where that is on Windows)

Arcanemagus commented 7 years ago

It looks like it's unable to communicate with any of the flow versions except possibly the built in one (there is a local one in this project and I have a global version installed): image

Interestingly the textDocument/documentSymbol seems to be working just fine.

flow-language-server.log ``` 2017-09-12 14:59:10.381 ERROR (pid:70200) flow-versions - There was a problem obtaining the appropriate version of flow for your project. Please check the extension logs. 2017-09-12 14:59:10.390 ERROR (pid:70200) flow-language-server - unhandledRejection { Error: Unhandled method window/showMessageRequest at new ResponseError (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\messages.js:46:28) at handleResponse (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:421:48) at processMessageQueue (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:249:17) at Immediate. (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:233:13) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5) code: -32601 } 2017-09-12 16:24:51.653 ERROR (pid:73488) flow-versions - There was a problem obtaining the appropriate version of flow for your project. Please check the extension logs. 2017-09-12 16:24:54.398 ERROR (pid:73488) flow-language-server - unhandledRejection { Error: Unhandled method window/showMessageRequest at new ResponseError (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\messages.js:46:28) at handleResponse (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:421:48) at processMessageQueue (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:249:17) at Immediate. (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:233:13) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5) code: -32601 } 2017-09-13 09:32:46.202 ERROR (pid:42188) flow-versions - There was a problem obtaining the appropriate version of flow for your project. Please check the extension logs. 2017-09-13 09:32:46.320 ERROR (pid:42188) flow-language-server - unhandledRejection { Error: Unhandled method window/showMessageRequest at new ResponseError (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\messages.js:46:28) at handleResponse (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:421:48) at processMessageQueue (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:249:17) at Immediate. (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:233:13) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5) code: -32601 } 2017-09-13 09:40:26.439 ERROR (pid:63384) flow-versions - There was a problem obtaining the appropriate version of flow for your project. Please check the extension logs. 2017-09-13 09:40:27.555 ERROR (pid:63384) flow-language-server - unhandledRejection { Error: Unhandled method window/showMessageRequest at new ResponseError (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\messages.js:46:28) at handleResponse (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:421:48) at processMessageQueue (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:249:17) at Immediate. (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:233:13) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5) code: -32601 } 2017-09-13 09:49:15.043 ERROR (pid:95804) flow-versions - There was a problem obtaining the appropriate version of flow for your project. Please check the extension logs. 2017-09-13 09:49:15.280 ERROR (pid:95804) flow-language-server - unhandledRejection { Error: Unhandled method window/showMessageRequest at new ResponseError (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\messages.js:46:28) at handleResponse (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:421:48) at processMessageQueue (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:249:17) at Immediate. (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:233:13) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5) code: -32601 } 2017-09-13 10:27:30.972 ERROR (pid:6164) flow-versions - There was a problem obtaining the appropriate version of flow for your project. Please check the extension logs. 2017-09-13 10:27:31.040 ERROR (pid:6164) flow-language-server - unhandledRejection { Error: Unhandled method window/showMessageRequest at new ResponseError (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\messages.js:46:28) at handleResponse (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:421:48) at processMessageQueue (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:249:17) at Immediate. (C:\Users\Landon Abney\.atom\packages\ide-flowtype\node_modules\vscode-jsonrpc\lib\main.js:233:13) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5) code: -32601 } 2017-09-13 13:42:53.794 WARN (pid:63020) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 13:45:30.479 WARN (pid:63020) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:02:37.644 WARN (pid:63020) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:12:34.253 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.271 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.281 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.292 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.311 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.323 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.336 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.347 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.372 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.395 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.403 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.404 WARN (pid:82240) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:12:34.406 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.406 WARN (pid:82240) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:12:34.420 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.435 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.467 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.468 WARN (pid:82240) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:12:34.480 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:12:34.481 WARN (pid:82240) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:12:34.521 ERROR (pid:82240) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:17:51.156 WARN (pid:82528) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:18:55.211 ERROR (pid:82528) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:18:55.219 ERROR (pid:82528) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:19:03.651 ERROR (pid:44140) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:19:42.857 ERROR (pid:80196) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:19:42.867 ERROR (pid:80196) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:20:03.014 ERROR (pid:72808) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:20:03.022 ERROR (pid:72808) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:20:03.030 ERROR (pid:72808) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:21:02.507 ERROR (pid:58840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:21:02.518 ERROR (pid:58840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:21:02.552 ERROR (pid:58840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:23:07.347 ERROR (pid:87840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:23:07.361 ERROR (pid:87840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:23:07.395 ERROR (pid:87840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:23:07.403 ERROR (pid:87840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:23:07.433 ERROR (pid:87840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:23:07.444 ERROR (pid:87840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:23:07.445 WARN (pid:87840) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:23:07.466 ERROR (pid:87840) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:23:07.467 WARN (pid:87840) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:26:57.910 ERROR (pid:59224) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:26:57.924 ERROR (pid:59224) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:26:57.959 ERROR (pid:59224) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:26:57.960 WARN (pid:59224) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:26:57.967 ERROR (pid:59224) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:26:58.005 ERROR (pid:59224) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:26:58.037 ERROR (pid:59224) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:26:58.072 ERROR (pid:59224) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:26:58.074 ERROR (pid:59224) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:26:58.075 WARN (pid:59224) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:30:58.064 ERROR (pid:55116) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:30:58.094 ERROR (pid:55116) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:30:58.133 ERROR (pid:55116) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:30:58.134 WARN (pid:55116) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:34:26.934 ERROR (pid:43644) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:34:26.974 ERROR (pid:43644) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:34:26.976 WARN (pid:43644) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:34:27.081 ERROR (pid:43644) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:39:43.505 WARN (pid:66132) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:39:45.497 ERROR (pid:66132) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:39:45.497 WARN (pid:66132) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:39:45.685 ERROR (pid:66132) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:40:53.504 ERROR (pid:42040) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:40:53.539 ERROR (pid:42040) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:40:53.569 ERROR (pid:42040) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:40:53.604 ERROR (pid:42040) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:40:53.638 ERROR (pid:42040) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:40:53.638 WARN (pid:42040) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:43:24.127 ERROR (pid:99908) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:43:24.170 ERROR (pid:99908) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:43:24.205 ERROR (pid:99908) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:43:24.242 ERROR (pid:99908) nuclide-flow-rpc - Attempted to update server status after disposal 2017-09-13 14:43:24.242 WARN (pid:99908) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter-jshint\lib\main.js. JSON: ''. 2017-09-13 14:53:21.027 WARN (pid:20492) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter\lib\main.js. JSON: ''. 2017-09-13 16:04:05.589 WARN (pid:92604) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter\lib\main.js. JSON: ''. 2017-09-13 16:10:35.121 WARN (pid:92864) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter\lib\main.js. JSON: ''. 2017-09-13 16:27:06.310 WARN (pid:87424) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter\lib\main.js. JSON: ''. ```

Seems to basically be saying the same thing as the Atom log: It's receiving empty responses from flow:

2017-09-13 16:27:06.310 WARN (pid:87424) nuclide-flow-rpc - Invalid JSON result from flow status --json c:\Users\Landon Abney\Documents\GitHub\linter\lib\main.js. JSON:
''.

Note that the local flow works just fine in the CLI:

PS C:\Users\Landon Abney\Documents\GitHub\linter> npx flow check
C:\Users\Landon Abney\Documents\GitHub\linter\node_modules\flow-bin\cli.js
Error: lib/main.js:28
 28:     Math.pow(2, 'foo')
                     ^^^^^ string. This type is incompatible with the expected param type of
185:     pow(x: number, y: number): number;
                           ^^^^^^ number. See lib: C:\Users\LANDON~1\AppData\Local\Temp\flow\flowlib_2a8adef7\core.js:185

Found 1 error
lettertwo commented 7 years ago

The latest version has resolved this issue for me. Flow errors are now showing in diagnostics! 👍

retrixe commented 7 years ago

Yeah, same here! Everything working fine! :D

jackfranklin commented 7 years ago

In apparently the opposite to everyone else, the latest version seems to have broken this for me :( I am on the latest versions of atom-ide and ide-flowtype. I have type hinting working (hovering over a typed variable tells me its type), and the outline view works correctly, but errors are not being shown in diagnostics. Here you can see errors from flow-check but the diagnostics is empty:

screen shot 2017-09-14 at 17 07 22

The developer console does not show me any errors.

Arcanemagus commented 7 years ago

@jackfranklin You can try enabling diagnostics as outlined by @hansonw here.

jackfranklin commented 7 years ago

@Arcanemagus so I'm not sure what happened, but I disabled "Use local flow-bin from node_modules" and it started working after a restart.

I then restarted, enabled "Use local flow-bin", restarted and it's still working. I'm not sure what is going on there, however it's all good for me now. Having read that ide-flowtype will automatically download versions of Flow for me I'll be unticking that option going forward.

If it happens again I will enable debug mode and try to provide more information.

bradennapier commented 7 years ago

@jackfranklin i saw similar results. Nothing worked for me until I unchecked the local bin one (which has the latest flow)

image

bradennapier commented 7 years ago

I would also point out that there is nothing in the folder it says they will be stored at ... so I believe that whole concept does not work right now and its just using my globally installed flow that i installed recently

madjam002 commented 7 years ago

Has anyone got this working under Windows? I'm seeing exactly the same issue as @Arcanemagus mentioned above

Arcanemagus commented 7 years ago

Unchecking "Use flow-bin from node_modules when available" causes most of the logged errors to go away... but that's only because nothing ever actually comes back from the server other than this rarely:

JavaScript (Flow) rpc.onNotification window/logMessage

{
  "message": "[2017-09-15 08:49:45.619] [WARN] nuclide-flow-rpc - Invalid JSON result from flow status --json c:\\Users\\Landon Abney\\Documents\\GitHub\\linter-jshint\\lib\\main.js. JSON:
''.",
  "type": 4
}

Which seems to indicate it's still getting back blank responses.