Skip to content

Error enabling a new platform type #5180

Closed

Description

@DanTup

I couldn't capture the full output here, but possible it was an analytics consent or first-run banner or something in the output of flutter config --machine (related: flutter/flutter#94406).

image

[12:15:45 PM] [FlutterDaemon] [Info] ==> [{"id":"4","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Dev\\Test Projects\\flutter_counter"}}]
[12:15:45 PM] [FlutterDaemon] [Info] <== [{"id":"4","result":{"platforms":["web"],"platformTypes":{"web":{"isSupported":true},"android":{"isSupported":false,"reasons":[{"reasonText":"the Android platform is not enabled for this project","fixText":"Run \"flutter create --platforms=android .\" in your application directory","fixCode":"create"}]},"ios":{"isSupported":false,"reasons":[{"reasonText":"the iOS platform is not enabled for this project","fixText":"Run \"flutter create --platforms=ios .\" in your application directory","fixCode":"create"}]},"linux":{"isSupported":false,"reasons":[{"reasonText":"the Linux platform is not enabled for this project","fixText":"Run \"flutter create --platforms=linux .\" in your application directory","fixCode":"create"}]},"macos":{"isSupported":false,"reasons":[{"reasonText":"the macOS platform is not enabled for this project","fixText":"Run \"flutter create --platforms=macos .\" in your application directory","fixCode":"create"}]},"windows":{"isSupported":false,"reasons":[{"reasonText":"the Windows platform is not enabled for this project","fixText":"Run \"flutter create --platforms=windows .\" in your application directory","fixCode":"create"}]},"fuchsia":{"isSupported":false,"reasons":[{"reasonText":"the Fuchsia feature is not enabled","fixText":"Run \"flutter config --enable-fuchsia\"","fixCode":"config"},{"reasonText":"the Fuchsia platform is not enabled for this project","fixText":"Run \"flutter create --platforms=fuchsia .\" in your application directory","fixCode":"create"}]},"custom":{"isSupported":false,"reasons":[{"reasonText":"the custom devices feature is not enabled","fixText":"Run \"flutter config --enable-custom-devices\"","fixCode":"config"}]},"windowsPreview":{"isSupported":false,"reasons":[{"reasonText":"the Preview Device feature is not enabled","fixText":"Run \"flutter config --enable-flutter-preview","fixCode":"config"},{"reasonText":"the Windows platform is not enabled for this project","fixText":"Run \"flutter create --platforms=windows .\" in your application directory","fixCode":"create"}]}}}}]
[12:16:00 PM] [FlutterDaemon] [Info] Spawning C:\Dev\Google\Flutter\Flutter main\bin\flutter.bat with args ["config","--machine"] in C:\Dev\Google\Flutter\Flutter main with env undefined
[12:16:00 PM] [FlutterDaemon] [Error] Unexpected token '╔', "
  ╔═════════"... is not valid JSON
SyntaxError: Unexpected token '╔', "
  ╔═════════"... is not valid JSON
	at JSON.parse (<anonymous>)
	at getFlutterConfigValue (c:\Dev\Dart-Code\Dart-Code\out\dist\extension.js:24242:31)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async FlutterDaemon.checkIfPlatformGloballyDisabled (c:\Dev\Dart-Code\Dart-Code\out\dist\extension.js:14638:23)
	at async FlutterDeviceManager.enablePlatformType (c:\Dev\Dart-Code\Dart-Code\out\dist\extension.js:30649:47)
	at async c:\Dev\Dart-Code\Dart-Code\out\dist\extension.js:12322:21
	at async VsCodeDartToolingDaemon.handleData (c:\Dev\Dart-Code\Dart-Code\out\dist\extension.js:27116:32)

Activity

  1. added this to the v3.94.0 milestone on Jul 11, 2024
  2. DanTup commented on Jul 11, 2024

    @DanTup
    MemberAuthor
     ╔════════════════════════════════════════════════════════════════════════════╗
      ║                 Welcome to Flutter! - https://flutter.dev                  ║
      ║                                                                            ║
      ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
      ║ statistics and basic crash reports. This data is used to help improve      ║
      ║ Flutter tools over time.                                                   ║
      ║                                                                            ║
      ║ Flutter tool analytics are not sent on the very first run. To disable      ║
      ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
      ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
      ║ event will be sent, and then no further information will be sent by the    ║
      ║ Flutter tool.                                                              ║
      ║                                                                            ║
      ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
      ║ The Google Privacy Policy describes how data is handled in this service.   ║
      ║                                                                            ║
      ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
      ║ crash reports to Google.                                                   ║
      ║                                                                            ║
      ║ Read about data we send with crash reports:                                ║
      ║ https://flutter.dev/to/crash-reporting                                     ║
      ║                                                                            ║
      ║ See Google's privacy policy:                                               ║
      ║ https://policies.google.com/privacy                                        ║
      ║                                                                            ║
      ║ To disable animations in this tool, use                                    ║
      ║ 'flutter config --no-cli-animations'.                                      ║
      ╚════════════════════════════════════════════════════════════════════════════╝
    
    {
      "android-studio-dir": "C:\\\\Program Files\\\\Android\\\\Android Studio",
      "android-sdk": "C:\\\\Users\\\\danny\\\\AppData\\\\Local\\\\Android\\\\sdk",
      "jdk-dir": "C:\\\\Program Files\\\\Android\\\\Android Studio\\\\jbr"
    }
    

    For reasons I haven't figured out, I can reproduce this by reloading the window, but when I manually run flutter config --machine there is no such output.

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions