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

断开网络报异常The setter 'followRedirects=' was called on null #189

Closed
zhuzheng1991 opened this issue Feb 25, 2019 · 0 comments
Closed

Comments

@zhuzheng1991
Copy link

Steps to Reproduce

Logs

I/flutter (11560): *** Request ***
I/flutter (11560): uri: http://www.wanandroid.com/article/list/0/json
I/flutter (11560): method: GET
I/flutter (11560): contentType: application/json; charset=utf-8
I/flutter (11560): responseType: ResponseType.json
I/flutter (11560): followRedirects: true
I/flutter (11560): connectTimeout: 5000
I/flutter (11560): receiveTimeout: 5000
I/flutter (11560): extra: {}
I/flutter (11560): header:
I/flutter (11560):
I/flutter (11560): SocketException: Failed host lookup: 'www.wanandroid.com' (OS Error: No address associated with hostname, errno = 7)
I/flutter (11560): *** DioError ***:
I/flutter (11560): DioError [DioErrorType.DEFAULT]: NoSuchMethodError: The setter 'followRedirects=' was called on null.
I/flutter (11560): Receiver: null
I/flutter (11560): Tried calling: followRedirects=true#0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
I/flutter (11560): #1 DefaultHttpClientAdapter.fetch (package:dio/src/adapter.dart:115:13)
I/flutter (11560):
I/flutter (11560): #2 Dio._makeRequest (package:dio/src/dio.dart:712:46)
I/flutter (11560):
I/flutter (11560): #3 Dio._request.. (package:dio/src/dio.dart:691:22)
I/flutter (11560): #4 _rootRunUnary (dart:async/zone.dart:1132:38)
I/flutter (11560): #5 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
I/flutter (11560): #6 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
I/flutter (11560): #7 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
I/flutter (11560): #8 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
I/flutter (11560): #9 Future._complete (dart:async/future_impl.dart:473:7)
I/flutter (11560): #10 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
I/flutter (11560): #11 _AsyncAwaitCompleter.co
I/flutter (11560): 失败,DioError [DioErrorType.DEFAULT]: NoSuchMethodError: The setter 'followRedirects=' was called on null.
I/flutter (11560): Receiver: null
I/flutter (11560): Tried calling: followRedirects=true#0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
I/flutter (11560): #1 DefaultHttpClientAdapter.fetch (package:dio/src/adapter.dart:115:13)
I/flutter (11560):
I/flutter (11560): #2 Dio._makeRequest (package:dio/src/dio.dart:712:46)
I/flutter (11560):
I/flutter (11560): #3 Dio._request.. (package:dio/src/dio.dart:691:22)
I/flutter (11560): #4 _rootRunUnary (dart:async/zone.dart:1132:38)
I/flutter (11560): #5 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
I/flutter (11560): #6 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
I/flutter (11560): #7 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
I/flutter (11560): #8 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
I/flutter (11560): #9 Future._complete (dart:async/future_impl.dart:473:7)
I/flutter (11560): #10 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
I/flutter (11560): #11 _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
I/flutter (11560): #12 _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:294:13)
I/flutter (11560): #13 Dio._executeInterceptors (package:dio/src/dio.dart)
I/flutter (11560):
I/flutter (11560): #14 Dio._request. (package:dio/src/dio.dart:684:20)
I/flutter (11560): #15 Dio._checkIfNeedEnqueue (package:dio/src/dio.dart:912:22)
I/flutter (11560): #16 Dio._request (package:dio/src/dio.dart:683:9)
I/flutter (11560):
I/flutter (11560): #17 Dio.request (package:dio/src/dio.dart:611:12)
I/flutter (11560):
I/flutter (11560): #18 Dio.get (package:dio/src/dio.dart:93:12)
I/flutter (11560): #19 HttpUtil.doGet (package:wanandroid/http/http_util.dart:47:31)
I/flutter (11560):
I/flutter (11560): #20 _ArticleListState._getArticleList (package:wanandroid/page/home_page.dart:245:10)
I/flutter (11560):
I/flutter (11560): #21 _ArticleListState._onRefresh (package:wanandroid/page/home_page.dart:182:11)
I/flutter (11560):
I/flutter (11560): #22 EasyRefreshState._refreshStart (package:flutter_easyrefresh/src/refresher.dart:697:22)
I/flutter (11560):
I/flutter (11560): #23 EasyRefreshState.initState.. (package:flutter_easyrefresh/src/refresher.dart:497:13)
I/flutter (11560): #24 State.setState (package:flutter/src/widgets/framework.dart:1122:30)
I/flutter (11560): #25 EasyRefreshState.initState. (package:flutter_easyrefresh/src/refresher.dart:494:9)
I/flutter (11560): #26 _AnimationController&Animation&AnimationEagerListenerMixin&AnimationLocalListenersMixin&AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:192:19)
I/flutter (11560): #27 AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:736:7)
I/flutter (11560): #28 AnimationController._tick (package:flutter/src/animation/animation_controller.dart:752:5)
I/flutter (11560): #29 Ticker._tick (package:flutter/src/scheduler/ticker.dart:228:5)
I/flutter (11560): #30 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter (11560): #31 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame. (package:flutter/src/scheduler/binding.dart:906:11)
I/flutter (11560): #32 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
I/flutter (11560): #33 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:904:17)
I/flutter (11560): #34 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:834:5)
I/flutter (11560): #35 _rootRunUnary (dart:async/zone.dart:1136:13)
I/flutter (11560): #36 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
I/flutter (11560): #37 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
I/flutter (11560): #38 _invoke1 (dart:ui/hooks.dart:223:10)
I/flutter (11560): #39 _beginFrame (dart:ui/hooks.dart:162:3)
I/flutter (11560):
I/flutter (11560): null
I/flutter (11560): NoSuchMethodError: The setter 'followRedirects=' was called on null.
I/flutter (11560): Receiver: null
I/flutter (11560): Tried calling: followRedirects=true

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