Francessco121 / msal-js-dart

A Dart wrapper for the "Microsoft Authentication Library for JavaScript (MSAL.js)".
https://pub.dev/packages/msal_js
MIT License
14 stars 9 forks source link

Flutter - loginRedirect is failing after returning back to the app #16

Closed ManishKiranagi closed 4 years ago

ManishKiranagi commented 4 years ago

Describe the bug On using the example provided with loginRedirect, after logging in b2c tenant and returning back to the app - I am getting below error - Please can you look into it

client.js:22488 Error from backend:

Error: NoSuchMethodError: The method 'shutDown' was called on null. Receiver: null Tried calling: shutDown()

Stack Trace:

0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)

1 DevHandler._handleConnectRequest (package:dwds/src/handlers/dev_handler.dart:383:28)

2 DevHandler._handleConnection. (package:dwds/src/handlers/dev_handler.dart:257:21)

3 _rootRunUnary (dart:async/zone.dart:1198:47)

4 _CustomZone.runUnary (dart:async/zone.dart:1100:19)

5 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)

6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)

7 _DelayedData.perform (dart:async/stream_impl.dart:611:14)

8 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:730:11)

9 _PendingEvents.schedule. (dart:async/stream_impl.dart:687:7)

10 _rootRun (dart:async/zone.dart:1182:47)

11 _CustomZone.run (dart:async/zone.dart:1093:19)

12 _CustomZone.runGuarded (dart:async/zone.dart:997:7)

13 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1037:23)

14 _rootRun (dart:async/zone.dart:1190:13)

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 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)

19 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

20 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)

21 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

(anonymous) @ client.js:22488 (anonymous) @ client.js:3824 call$2 @ client.js:11021 _asyncStartSync @ client.js:3788 $call$body$main__closure @ client.js:22496 call$1 @ client.js:22423 _rootRunUnary @ client.js:4158 runUnary$2$2 @ client.js:12326 runUnaryGuarded$1$2 @ client.js:12258 _sendData$1 @ client.js:11809 perform$1 @ client.js:11961 call$0 @ client.js:12010 _microtaskLoop @ client.js:3991 _startMicrotaskLoop @ client.js:3997 call$1 @ client.js:10890 invokeClosure @ client.js:1205 (anonymous) @ client.js:1224 childList (async) call$1 @ client.js:10900 _scheduleAsyncCallback @ client.js:4011 _rootScheduleMicrotask @ client.js:4205 scheduleMicrotask @ client.js:4040 schedule$1 @ client.js:11992 _addPending$1 @ client.js:11800 _sendData$1 @ client.js:11632 add$1 @ client.js:11532 _onIncomingMessage$1 @ client.js:22036 eval @ VM231:3 invokeClosure @ client.js:1205 (anonymous) @ client.js:1224

Environment (please complete the following information):

ManishKiranagi commented 4 years ago

Looks like an issue in my Flutter environment. I got it working finally after upgrading Flutter. Please ignore.