flutter-chopper-tutorial-course icon indicating copy to clipboard operation
flutter-chopper-tutorial-course copied to clipboard

NoSuchMethodError: The getter 'body' was called on null. Receiver

Open pishguy opened this issue 5 years ago • 4 comments

when i have this code into interceptor array i get this error:

[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The getter 'body' was called on null. Receiver:

null Tried calling: body Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5) ChopperClient._interceptResponse (package:chopper/src/base.dart:151:19)

code:

(Response response) async {
  if (response.statusCode == 404) {
    chopperLogger.severe('404 NOT FOUND');
  }
}

pishguy avatar Aug 27 '19 12:08 pishguy

I was trying to post data to my API as your tutorials suggested but i endup getting this error [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'types' was called on null.

elirehema avatar Mar 27 '20 17:03 elirehema

I'm getting the exact same error as @elirehema over here. Any thoughts on how to solve this?

higorernandes avatar Mar 27 '20 22:03 higorernandes

I'm getting the exact same error as @elirehema over here. Any thoughts on how to solve this?

Se lasquemo.

iurynogueira avatar Apr 15 '20 00:04 iurynogueira

i have same issue if you find any solution then provide us solution here

nitinsun avatar Jun 17 '20 14:06 nitinsun