intellij not launching flutter devtools

739

I had virtually the same error message today in WebStorm (versions 2020.3 and 2020.3.2) when attempting to run a web app (regular web app, not Flutter). I am using Dart 2.10.4 (current production version is 2.10.5) on macOS 10.15.7.

Just prior to this error, I had to force quit WebStorm when it locked up while analyzing one of my dart files. I was thinking that perhaps that problem had corrupted the directory named in the error message, but I have no evidence of that. The ".pub-cache" directory exists on my machine, but it does not contain the "hosted" directory.

We are using different operating systems and different frameworks, so that (theoretically) narrows the problem to either a JetBrains tool problem or a Dart problem.

Update I found another posting about misbehaving JetBrains tools, and the suggested fix for that problem was to eliminate the folder ".idea" in the project folder (this folder is hidden on macOS) as this is where the project info is held. You will then have to reconfigure the project as though it were a new project (including pub get, etc); however, all of your code and support files will be intact. BTW, I also re-booted my computer prior to deleting the .idea folder. and re-starting WebStorm.

It's conceivable that I had two unrelated problems, and this "cure" does not apply to your situation. It might be worth a try, though.

Share:
739
mohamed mostapha
Author by

mohamed mostapha

Updated on November 28, 2022

Comments

  • mohamed mostapha
    mohamed mostapha over 1 year

    since the devtools plugin last update to 0.9.7...i am not able to use flutter devtools nor intellij built-in flutter inspector...i am using this SDK version:

    Flutter 1.20.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision 840c9205b3 (6 months ago) • 2020-08-04 20:55:12 -0700 Engine • revision c8e3b94853 Tools • Dart 2.9.0

    in intellij when i open the "Flutter Performance" tab at the right sidebar and click "Open devtools"... i get this error:

    Unhandled exception: Invalid argument(s): A directory corresponding to fileSystemPath "C:\Users\LENOVO\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\devtools-0.9.7+1\build" could not be found

    what should i do to launch intellij built-in inspector and devtools in browser also?!

  • mohamed mostapha
    mohamed mostapha about 3 years
    .i think i am running through multiple issues because till now i am still using an old Flutter SDK which is: Framework • revision 840c9205b3 (6 months ago) • 2020-08-04 20:55:12 -0700 Engine • revision c8e3b94853 Tools • Dart 2.9.0 after some reading...i realized that every time i try to launch the devtools...it autoupdates itself first...then launches the last verion which is devtools 0.9.7+2 and its not working on my flutter old versoin i guess...so i use "pub global deactivate devtools" then "pub global activate devtools 0.2.5"...which is the working version in my case...
  • mohamed mostapha
    mohamed mostapha about 3 years
    this is also another question i asked when i first faced this issue: stackoverflow.com/questions/65974656/…