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

Converting object to an encodable object failed: Instance of '_CompactLinkedHashSet<String>' #842

Closed
1 task done
john916zhang opened this issue Jun 29, 2020 · 1 comment

Comments

@john916zhang
Copy link

john916zhang commented Jun 29, 2020

New Issue Checklist

  • I have searched for a similar issue in the project and found none

Issue Info

Platform Name: Flutter, Android
Platform Version: 1.20
Dio Version: 3.0.9

Issue Description and Steps

dio .post('$url/auth/local/register', data: {username, email, password}) .then((response) => print(response.data)) .catchError((error) => print(error));

`
DioError [DioErrorType.DEFAULT]: Converting object to an encodable object failed: Instance of '_CompactLinkedHashSet'
#0 _JsonStringifier.writeObject (dart:convert/json.dart:687:7)
#1 _JsonStringStringifier.printOn (dart:convert/json.dart:876:17)
#2 _JsonStringStringifier.stringify (dart:convert/json.dart:861:5)
#3 JsonEncoder.convert (dart:convert/json.dart:261:30)
#4 JsonCodec.encode (dart:convert/json.dart:171:45)
#5 DefaultTransformer.transformRequest (package:dio/src/transformer.dart:62:21)
#6 DioMixin._transformData (package:dio/src/dio.dart:1011:39)
#7 DioMixin._dispatchRequest (package:dio/src/dio.dart:918:26)
#8 DioMixin._request._interceptorWrapper... (package:dio/src/dio.dart:849:37)
#9 DioMixin.checkIfNeedEnqueue (package:dio/src/dio.dart:1117:22)
#10 DioMixin._request._interceptorWrapper.. (package:dio/src/dio.dart:846:22)
#11 new Future. (dart:async/future.dart:174:37)
#12 StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#13 StackZoneSpecification._registerCallback. (package:stack_trace/src/stack_zone_specification.dart:119:48)
#14 _rootRun (dart:async/zone.dart:1182:47)
#15 _CustomZone.run (dart:async/zone.dart:1093:19)
#16 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#17 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1037:23)
#18 StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#19 StackZoneSpecification._registerCallback. (package:stack_trace/src/stack_zone_specification.dart:119:48)
#20 _rootRun (dart:async/zone.dart:1190:13)
#21 _CustomZone.run (dart:async/zone.dart:1093:19)
#22 _CustomZone.bindCallback. (dart:async/zone.dart:1021:23)
#23 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15)
#24 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:397:19)
#25 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:428:5)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

`

@stale
Copy link

stale bot commented Jul 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.

@stale stale bot added the stale label Jul 29, 2020
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