Skip to content

I can build the app, but I get the following error: Invalid argument(s): A directory corresponding to fileSystemPath "/Users/develien/.pub-cache/hosted/pub.dartlang.org/devtools-2.9.2/build" could not be found #3549

Closed

Description

@kyudongDev

Invalid argument(s): A directory corresponding to fileSystemPath "/Users/develien/.pub-cache/hosted/pub.dartlang.org/devtools-2.9.2/build" could not be found

There seems to be a problem with the 2.9.2 commit as there were no problems until yesterday.

Activity

  1. sangwonnf commented on Dec 21, 2021

    @sangwonnf

    So am I. Did you find a solution?

  2. xxqwf commented on Dec 21, 2021

    @xxqwf

    So am I. Did you find a solution?

  3. nabeel001 commented on Dec 21, 2021

    @nabeel001

    I'm facing a similar issue too, Any solutions yet..?

  4. yangweiyi commented on Dec 21, 2021

    @yangweiyi

    I have a similar problem. Have you solved it?

  5. liaozhiqun commented on Dec 21, 2021

    @liaozhiqun

    I have the same problem today,I fixed it with running "dart pub global activate devtools -v 2.8.0"

  6. thanhchelsea commented on Dec 21, 2021

    @thanhchelsea

    wwoahhh ... thank liaozhiqun. i fix with running "dart pub global activate devtools -v 2.8.0"

  7. xxqwf commented on Dec 21, 2021

    @xxqwf

    I have the same problem today,I fixed it with running "dart pub global active devtools -v 2.8.0"

    thanks!!

  8. liaozhiqun commented on Dec 21, 2021

    @liaozhiqun
  9. Vaytrex commented on Dec 21, 2021

    @Vaytrex

    You can fix that by adding that directory "$FLUTTER_PATH\flutter\.pub-cache\bin" to your system's "Path" environment variable.

  10. navaronbracke commented on Dec 21, 2021

    @navaronbracke

    The 2.9.2 release apparently doesn't have the required build folder as started in the error log. 2.8.0 is fine however.

  11. ayushxx7 commented on Dec 21, 2021

    @ayushxx7

    For android stuido

    • close android studio
    • run dart pub global activate devtools -v 2.8.0 to downgrade (as suggested above)
    • open android studio
    • run your build

    It should work now.

  12. ayush-mandowara-bst commented on Dec 21, 2021

    @ayush-mandowara-bst

    problem

    use activate instead of active to avoid subcommand error.

  13. bkonyi commented on Dec 21, 2021

    @bkonyi
    Contributor

    2.9.2 has been retracted, please run dart pub global activate devtools -v 2.8.0 to resolve this issue.

  14. tylergasperlin commented on Dec 22, 2021

    @tylergasperlin

    dart pub global active devtools -v 2.8.0

    this worked but use "activate" instead of active
    dart pub global activate devtools -v 2.8.0

  15. 12 remaining items

  16. sureshbb commented on Dec 30, 2021

    @sureshbb

    I have solved the issue running these commands from terminal,

    flutter upgrade
    flutter pub global activate devtools -v 2.9.2
    
  17. ayush-mandowara-bst commented on Dec 30, 2021

    @ayush-mandowara-bst

    @yakupbilgen if you're able to upgrade to the latest stable Dart/Flutter SDK, that should prevent the issue as those versions will stick with v2.8.0.

    I can't upgrade, my organization is sticking with flutter 2.2.1 and I can't do much about that. Can we please just release a version of devtools that has the appropriate files so that the auto-upgrade of the latest devtools doesn't hamper our work?

  18. chornbe commented on Dec 30, 2021

    @chornbe
  19. DanTup commented on Dec 30, 2021

    @DanTup
    Contributor

    I suspect those with the ability to publish DevTools are out on vacation right now.

    I'm going to add a setting to the VS Code extension to allow disabling the auto-update of DevTools (Dart-Code/Dart-Code#3750) which will be available in the pre-release channel soon which may help in the meantime.

  20. DanTup commented on Dec 30, 2021

    @DanTup
    Contributor

    The next release of the Dart extension for VS Code contains a setting that will let you opt-out of automatic updating of DevTools:

    Screenshot 2021-12-30 at 13 17 14

    This only applies to older SDKs, as the latest SDKs ship with DevTools and VS Code will just use the one from there.

    If you'd like to be able to use this setting before the stable extension release, you can switch to the pre-release channel of the Dart/Flutter extensions in VS Code here:

    Screenshot 2021-12-30 at 13 08 04

    You'll need to run pub global activate devtools 2.8.0 after unticking this, then restart VS Code. You can switch between the release/pre-release channels of the extensions at any time.

  21. Ldev007 commented on Jan 1, 2022

    @Ldev007

    @DanTup Hi Dan, are you sure we should use the devtools version 0.8.0 and not 2.8.0. Is the reason behind it to handle this auto updation internally specifically in 0.8.0 version or is it just a typo ?

    Thanks for this fix though.

  22. DanTup commented on Jan 1, 2022

    @DanTup
    Contributor

    @Ldev007 oops, well spotted - that was indeed a typo and 2.8.0 is the correct version. I've edited the command in my comment above. Thanks!

  23. jonasfj commented on Jan 3, 2022

    @jonasfj
    Member

    Perhaps handling retracted packages is only done in the client, and therefore it's ignored by this version that doesn't know about it

    FYI, retraction only works for Dart >= 2.15, see dart.dev/go/package-retraction.

  24. sandwichstealer commented on Jan 3, 2022

    @sandwichstealer

    I've installed v3.29.0 as stated, however the blue box "Switch to Pre-Release Version" isn't there. A search of "update dev" results in "No Settings Found".

    The root cause is Flutter updates to beta versions by default instead of stable.

  25. Ldev007 commented on Jan 3, 2022

    @Ldev007

    @sandwichstealer I guess 3.32 is already available being the reason pre-release option isn't showing up but I can't confirm about the beta and stable versions involvement. Secondly, search for update dev won't work unless you restart the VS Code I guess that might be the case here as it was in my case too at first attempt.

  26. DanTup commented on Jan 4, 2022

    @DanTup
    Contributor

    @sandwichstealer version 3.29.0 is the older version (it was the stable version at the time of my screenshot above, and not the pre-release version). Version 3.32.0 has now been published so you don't need the pre-release version to get this fix. Please update to v3.32.0 and then the setting should appear (if you don't see v3.32.0 you may need to update VS Code).

  27. DanTup commented on Jan 4, 2022

    @DanTup
    Contributor

    @jonasfj in VS Code we're using the API to get the latest version number to decide if we should try to update. This means even on the latest version of the SDK, we read the latest version from https://pub.dev/api/packages/devtools and conclude there's an update even though it's retracted (the update does nothing, but it seems wasteful).

    What's the correct/best way from that API data to pick the "latest stable that is not retracted" version? Are the items in versions guaranteed to be sorted by version, or publish dates? (I couldn't find anything specific about this in these docs).

  28. kenzieschmoll commented on Jan 4, 2022

    @kenzieschmoll
    Member

    Published 2.9.3 on pub to resolve this issue.

  29. jonasfj commented on Jan 5, 2022

    @jonasfj
    Member

    What's the correct/best way from that API data to pick the "latest stable that is not retracted" version? Are the items in versions guaranteed to be sorted by version, or publish dates? (I couldn't find anything specific about this in these docs).

    No guarantees is given on the ordering. You could probably use something like Version.prioritize.

    But the logic we use in dart pub is actually somewhat complicated.

    • If the current version is a stable release, we only consider newer stable releases (stable release is one that doesn't have a -dev... component in the version number -- also called a prerelease component).
    • If the current version is a pre-release then we prefer any newer stable releases if one exist, otherwise, we check if a newer pre-release is available.

    This might be too complicated for your use-case. So I would suggest just using latest from the API, and ensuring that the latest version on pub.dev is not retracted. In general, the latest version of a package should not be retracted -- I guess we would even tweak latest in the API to not be a retracted version.

  30. DanTup commented on Jan 5, 2022

    @DanTup
    Contributor

    @jonasfj

    I guess we would even tweak latest in the API to not be a retracted version.

    I think that would be nice, but I don't know if it's breaking. I think probably I'll leave things as-is for now - like you say, chances are the latest version won't be retracted and it won't matter, and for the latest SDKs we're not pulling DevTools from Pub anyway so it's probably only webdev left being activated by us (stagehand was another, but that's also been migrated to the SDK).

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions