jhomlala/alice

Not supporting FormUrlEncoded request Params with Chopper

Closed this issue · 1 comments

It's having an issue when using form URL encoded parameters, it do not launch the notification or inspector UI and throws the below exception:

E/flutter (31333): #1      Request.toBaseRequest (package:chopper/src/request.dart:116:12)
E/flutter (31333): #2      AliceChopperInterceptor.onRequest (package:alice/core/alice_chopper_response_interceptor.dart:47:39)
E/flutter (31333): #3      ChopperClient._interceptRequest (package:chopper/src/base.dart:178:23)
E/flutter (31333): #4      ChopperClient.send (package:chopper/src/base.dart:288:17)
E/flutter (31333): <asynchronous suspension>
E/flutter (31333): #5      _$LoginService.token (package:shop_app/api/services/LoginService.chopper.dart:36:19)
E/flutter (31333): #6      _BodyState.build.<anonymous closure> (package:shop_app/screens/splash/components/body.dart:80:56)
E/flutter (31333): #7      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:993:19)
E/flutter (31333): #8      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1111:38)
E/flutter (31333): #9      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:183:24)
E/flutter (31333): #10     TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:598:11)
E/flutter (31333): #11     BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:287:5)
E/flutter (31333): #12     BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:222:7)
E/flutter (31333): #13     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:476:9)
E/flutter (31333): #14     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:77:12)
E/flutter (31333): #15     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:122:9)
E/flutter (31333): #16     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter (31333): #17     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:120:18)
E/flutter (31333): #18     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:106:7)
E/flutter (31333): #19     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:358:19)
E/flutter (31333): #20     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:338:22)
E/flutter (31333): #21     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:267:11)
E/flutter (31333): #22     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:295:7)
E/flutter (31333): #23     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:240:7)
E/flutter (31333): #24     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:213:7)
E/flutter (31333): #25     _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (31333): #26     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (31333): #27     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (31333): #28     _invoke1 (dart:ui/hooks.dart:265:10)
E/flutter (31333): #29     _dispatchPointerDataPacket (dart:ui/hooks.dart:174:5)

This seems to be chopper issue rather than Alice issue. Anyway I'll add additional error handling.