dio icon indicating copy to clipboard operation
dio copied to clipboard

Http2 Adapter : http client ko after airplane mode use

Open Tiska opened this issue 2 years ago • 4 comments

New Issue Checklist

  • [x] I have searched for a similar issue in the project and found none

Issue Info

Info Value
Platform Name ios
Platform Version flutter 2.8.0
Dio Version 4.0.4
Android Studio / Xcode Version e.g. Android Studio 3.3.2 / Xcode 10.2.1
Repro rate e.g. all the time (100%) / sometimes x% / only once
Repro with our demo prj e.g. does it happen with our demo project?
Demo project link e.g. link to a demo project that highlights the issue

Issue Description and Steps

When I switch phone to airplane mode on an Ios device with http2 Dio Adapter, http client is broken and can never send a new request :

Unhandled Exception: SocketException: Failed host lookup: 'www.google.fr' (OS Error: nodename nor servname provided, or not known, errno = 8) #0 _NativeSocket.startConnect (dart:io-patch/socket_patch.dart:677:35) #1 _NativeSocket.connect (dart:io-patch/socket_patch.dart:914:12) #2 _RawSocket.connect (dart:io-patch/socket_patch.dart:1668:26) #3 RawSocket.connect (dart:io-patch/socket_patch.dart:21:23) #4 RawSecureSocket.connect (dart:io/secure_socket.dart:222:22) #5 SecureSocket.connect (dart:io/secure_socket.dart:45:28) #6 _ConnectionManager._connect (package:dio_http2_adapter/src/connection_manager_imp.dart:71:35) #7 _ConnectionManager.getConnection (package:dio_http2_adapter/src/connection_manager_imp.dart:41:49)

Tiska avatar Dec 09 '21 10:12 Tiska

Does it work without the HTTP2 adapter?

kuhnroyal avatar Dec 17 '21 16:12 kuhnroyal

Hello :) yes without http2 it works

Tiska avatar Dec 23 '21 08:12 Tiska

and https works great on android

Tiska avatar Jan 03 '22 09:01 Tiska

I have the same problem

CyJaySong avatar Apr 22 '22 14:04 CyJaySong

This is still there, checked with version dio: 5.0.1, dio_http2_adapter: 2.1.0.

sysint64 avatar Mar 07 '23 13:03 sysint64