You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a weird issue with Flutter (Android app only) for the past few days. I make 3 API calls, which usually takes less than 2 sec to load, but for the past few days it's taking more than 20s to load with WiFi and less than 2 sec with mobile data. I tried with multiple WiFi networks but the result is same. The problem exists with Android app only and works fine with iOS. Wifi connection speeds were more than 100Mbps.
With postman, the same calls can be made in 0.7s.
I use Dio for api calls.
Has anyone faced this issue? I'm not able to understand the reason. Help would be highly appreciated.
Thank you
**UPDATE - The same api calls works normally (loads fast) in android phones running Android 9 or less with WiFi.
This is flutter doctor -v
`[✓] Flutter (Channel stable, 3.3.2, on macOS 12.5.1 21G83 darwin-arm, locale en-IN)
• Flutter version 3.3.2 on channel stable at /Users/davin/Documents/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision e3c29ec00c (9 days ago), 2022-09-14 08:46:55 -0500
• Engine revision a4ff2c53d8
• Dart version 2.18.1
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/davin/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 13F100
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] VS Code (version 1.71.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (4 available)
• SM N975F (mobile) • RF8M749NZ7J • android-arm64 • Android 12 (API 31)
• iPhone 13 Pro Max (mobile) • 6B4691F0-AFA4-44E6-82BD-4E946DC60D45 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.5.1 21G83 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.125
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!`
The text was updated successfully, but these errors were encountered:
I was able to solve this issue, it is related to ipv4 and ipv6 requests.
Somehow flutter android apps with android version greater than 10 is trying to connect to ipv6 address automatically and only after failing, reverting to ipv4, so there is a huge delay in getting response whereas in Android 9 and less, this isn't a problem. In flutter, there should be an option to manually choose ipv4 or ipv6 addresses.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
I have a weird issue with Flutter (Android app only) for the past few days. I make 3 API calls, which usually takes less than 2 sec to load, but for the past few days it's taking more than 20s to load with WiFi and less than 2 sec with mobile data. I tried with multiple WiFi networks but the result is same. The problem exists with Android app only and works fine with iOS. Wifi connection speeds were more than 100Mbps.
With postman, the same calls can be made in 0.7s.
I use Dio for api calls.
Has anyone faced this issue? I'm not able to understand the reason. Help would be highly appreciated.
Thank you
**UPDATE -
The same api calls works normally (loads fast) in android phones running Android 9 or less with WiFi.
This is
flutter doctor -v
The text was updated successfully, but these errors were encountered: