Invalid argument: Instance of 'ResponseBody' when downloading a file
Opened this issue · 0 comments
AliAbdelfattah commented
Package is throwing an exception when I plug it into my dio:
flutter: The following ArgumentError was thrown:
flutter: Invalid argument: Instance of 'ResponseBody'
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:404:7)
flutter: #1 StandardMessageCodec.writeValue.<anonymous closure> (package:flutter/src/services/message_codecs.dart:401:9)
flutter: #2 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
flutter: #3 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:399:13)
flutter: #4 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:394:9)
flutter: #5 StandardMethodCodec.encodeMethodCall (package:flutter/src/services/message_codecs.dart:536:18)
flutter: #6 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:151:13)
flutter: #7 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
flutter: #8 NetworkLogger.networkLog (package:instabug_flutter/NetworkLogger.dart:17:27)
Edit: nevermind this happens when I'm downloading a file, which returns an 'instance of ResponseBody' so it doesn't have to do with the interceptor, but with the mapping of the NetworkData not handling a ResponseBody object
Originally posted by @JoseGeorges8 in #4 (comment)