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

Version 5.8.0+1 Fails to Run on Flutter Web #2374

Closed
Bartozo opened this issue Feb 3, 2025 · 2 comments
Closed

Version 5.8.0+1 Fails to Run on Flutter Web #2374

Bartozo opened this issue Feb 3, 2025 · 2 comments
Labels
i: wontfix This will not be worked on

Comments

@Bartozo
Copy link

Bartozo commented Feb 3, 2025

Package

dio

Version

5.8.0+1

Operating-System

MacOS

Adapter

Default Dio

Output of flutter doctor -v

[✓] Flutter (Channel stable, 3.27.1, on macOS 15.3 24D60 darwin-arm64, locale en-US)
    • Flutter version 3.27.1 on channel stable at /Users/bartoszkrol/fvm/versions/3.27.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (7 weeks ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • 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/macos-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.


[!] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    ✗ CocoaPods not installed.
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      For installation instructions, see https://guides.cocoapods.org/using/getting-started.html#installation

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

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

[✓] IntelliJ IDEA Community Edition (version 2024.2.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 83.0.3
    • Dart plugin version 242.24931

[✓] Connected device (1 available)
    • Chrome (web)

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

! Doctor found issues in 3 categories.

Dart Version

3.6.0

Steps to Reproduce

1. Import the latest version of the dio package in pubspec.yaml.
2. Use dio in your Dart/Flutter project.
3. Run the app on Flutter Web.

Expected Result

The application should compile and run correctly on the web platform.

Actual Result

The console shows an error 👇

../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/dio_impl.dart:18:20: Error: The method 'DioForBrowser.download' has fewer named arguments than those of overridden method 'Object with DioMixin.download'. Future<Response> download( ^ ../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/dio_impl.dart:9:7: Context: This is the overridden method ('download'). class DioForBrowser with DioMixin implements Dio { ^ ../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/dio_impl.dart:18:20: Error: The method 'DioForBrowser.download' doesn't have the named parameter 'fileAccessMode' of overridden method 'Object with DioMixin.download'. Future<Response> download( ^ ../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/dio_impl.dart:9:7: Context: This is the overridden method ('download'). class DioForBrowser with DioMixin implements Dio { ^ ../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/dio_impl.dart:18:20: Error: The method 'DioForBrowser.download' has fewer named arguments than those of overridden method 'Dio.download'. Future<Response> download( ^ ../../.pub-cache/hosted/pub.dev/dio-5.8.0+1/lib/src/dio.dart:241:20: Context: This is the overridden method ('download'). Future<Response> download( ^ ../../.pub-cache/hosted/pub.dev/dio_web_adapter-2.0.0/lib/src/dio_impl.dart:18:20: Error: The method 'DioForBrowser.download' doesn't have the named parameter 'fileAccessMode' of overridden method 'Dio.download'. Future<Response> download( ^ ../../.pub-cache/hosted/pub.dev/dio-5.8.0+1/lib/src/dio.dart:241:20: Context: This is the overridden method ('download'). Future<Response> download( ^

@Bartozo Bartozo added h: need triage This issue needs to be categorized s: bug Something isn't working labels Feb 3, 2025
@AlexV525
Copy link
Member

AlexV525 commented Feb 4, 2025

Please run flutter pub upgrade.

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2025
@AlexV525 AlexV525 added i: wontfix This will not be worked on and removed h: need triage This issue needs to be categorized s: bug Something isn't working labels Feb 4, 2025
@EArminjon
Copy link

To complete the solution : just delete pubspec.lock if you already upgraded and still have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i: wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants