flutterplugin/dio_log

新版本2.0.4调用download会报错

LaoHuan opened this issue · 3 comments

新版本2.0.4调用download会报错

我也是, 可以先关闭日志输出解决:DioLogInterceptor.enablePrintLog = false

我也是, 可以先关闭日志输出解决:DioLogInterceptor.enablePrintLog = false

可以发一下报错日志吗?

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Converting object to an encodable object failed: Instance of 'ResponseBody'
#0 _JsonStringifier.writeObject (dart:convert/json.dart:794:7)
#1 _JsonStringStringifier.printOn (dart:convert/json.dart:983:17)
#2 _JsonStringStringifier.stringify (dart:convert/json.dart:968:5)
#3 JsonEncoder.convert (dart:convert/json.dart:345:30)
#4 toJson (package:dio_log/utils/json_utils.dart:6:17)
#5 DioLogInterceptor.saveResponse (package:dio_log/interceptor/dio_log_interceptor.dart:72:35)
#6 DioLogInterceptor.onResponse (package:dio_log/interceptor/dio_log_interceptor.dart:52:5)
#7 DioMixin.fetch._responseInterceptorWrapper... (package:dio/src/dio_mixin.dart:542:28)