Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Install flutterpi_tool on Ubuntu WSL2 #464

Open
hendawyjr opened this issue Dec 14, 2024 · 1 comment
Open

Unable to Install flutterpi_tool on Ubuntu WSL2 #464

hendawyjr opened this issue Dec 14, 2024 · 1 comment

Comments

@hendawyjr
Copy link

Problem Stament/ Issue Description;

I am trying to build a Flutter Linux bundle for release using flutter_pi on a Raspberry Pi 3B and flutterpi_tool on my development machine (Ubuntu WSL2). However, I am encountering dependency version solving errors when attempting to install flutterpi_tool. Below are the details from my console log.

To troubleshoot, I removed and reinstalled Flutter to ensure it's not a setup problem, but the issue persists.

Steps to Reproduce:

  1. Set up flutter_pi on Raspberry Pi 3B (using Snapp_installer).
  2. Use Ubuntu WSL2 as the development environment.
  3. Attempt to install flutterpi_tool using the command:

bash
dart pub global activate flutterpi_tool

Expected Behavior: flutterpi_tool should install without any dependency issues.
Actual Behavior: The installation fails due to dependency version conflicts.

Console Log Snippets:

FLutter Doctor (DevMachine-ubuntu WSL2):

flutter doctor -v
[✓] Flutter (Channel stable, 3.27.0, on Ubuntu 24.04.1 LTS 5.15.167.4-microsoft-standard-WSL2, locale C.UTF-8)
    • Flutter version 3.27.0 on channel stable at /home/thli/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 8495dee1fd (4 days ago), 2024-12-10 14:23:39 -0800
    • Engine revision 83bacfc525
    • Dart version 3.6.0
    • DevTools version 2.40.2

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/linux-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 18.1.3 (1ubuntu1)
    • cmake version 3.28.3
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/linux-android-setup for detailed instructions).

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Ubuntu 24.04.1 LTS 5.15.167.4-microsoft-standard-WSL2

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 3 categories.
The Flutter CLI developer tool uses Google Analytics to report usage and diagnostic
data along with package dependencies, and crash reporting to send basic crash
reports. This data is used to help improve the Dart platform, Flutter framework,
and related tools.

Telemetry is not sent on the very first run. To disable reporting of telemetry,
run this terminal command:

    flutter --disable-analytics

If you opt out of telemetry, an opt-out event will be sent, and then no further
information will be sent. This data is collected in accordance with the Google
Privacy Policy (https://policies.google.com/privacy).

DART Comand to Activate flutterpi_too:

dart pub global activate flutterpi_tool
The Dart CLI developer tool uses Google Analytics to report usage and diagnostic
data along with package dependencies, and crash reporting to send basic crash
reports. This data is used to help improve the Dart platform, Flutter framework,
and related tools.

Telemetry is not sent on the very first run. To disable reporting of telemetry,
run this terminal command:

    dart --disable-analytics

If you opt out of telemetry, an opt-out event will be sent, and then no further
information will be sent. This data is collected in accordance with the Google
Privacy Policy (https://policies.google.com/privacy).

Note: file is pinned to version 7.0.0 by flutter_tools from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

Note: http is pinned to version 1.2.2 by flutter_tools from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because flutterpi_tool <0.2.0 depends on file ^6.1.4 and every version of flutter_tools from sdk depends on file 7.0.0, flutterpi_tool <0.2.0 is
  incompatible with flutter_tools from sdk.
And because every version of flutterpi_tool depends on flutter_tools from sdk and flutterpi_tool >=0.2.0 depends on http ^0.13.6, every version of
  flutterpi_tool requires http ^0.13.6.
Because every version of flutterpi_tool depends on flutter_tools from sdk which depends on http 1.2.2, every version of flutterpi_tool requires http
  1.2.2.
Thus, flutterpi_tool is forbidden.
So, because pub global activate depends on flutterpi_tool any, version solving failed.

Additional Information:

  • Flutter version: 3.27.0
  • Dart version: 3.6.0
  • Ubuntu version: 24.04.1 LTS (WSL2)
@hendawyjr
Copy link
Author

I have identified and addressed the dependency version conflict issue when installing flutterpi_tool on Ubuntu WSL2. The pubspec.yaml file has been updated to accept higher versions of the http package, which resolves the error message encountered during installation.

Previously, this issue was only present in the beta and pre-release channels of Flutter. However, with the latest stable version, some dependencies have been pinned to higher versions, causing the same problem to occur.

To solve this problem, I cloned and forked the flutterpi_tool repository and used the local activation method to apply the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant