dart-lang / webdev

A CLI for Dart web development.
https://pub.dev/packages/webdev
212 stars 71 forks source link

Unhandled error detected in the injected client.js script. After upgrading to flutter 3.19.5 on windows #2459

Open amitsahni opened 1 week ago

amitsahni commented 1 week ago

(index):70 Uncaught ReferenceError: pdfjsLib is not defined at (index):70:5 client.js:8989 Unhandled error detected in the injected client.js script.

You can disable this script in webdev by passing --no-injected-client if it is preventing your app from loading, but note that this will also prevent all debugging and hot reload/restart functionality from working.

The original error is below, please file an issue at https://github.com/dart-lang/webdev/issues/new and attach this output:

Assertion failed: "boolean expression must not be null"

at Object.wrapException (http://localhost:4000/dwds/src/injected/client.js:1027:17)
at Object.assertThrow (http://localhost:4000/dwds/src/injected/client.js:1473:15)
at Object.boolConversionCheck (http://localhost:4000/dwds/src/injected/client.js:1469:11)
at http://localhost:4000/dwds/src/injected/client.js:24630:21
at _wrapJsFunctionForAsync_closure.$protected (http://localhost:4000/dwds/src/injected/client.js:3575:15)
at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:4000/dwds/src/injected/client.js:11675:12)
at _awaitOnObject_closure.call$1 (http://localhost:4000/dwds/src/injected/client.js:11663:32)
at StaticClosure._rootRunUnary (http://localhost:4000/dwds/src/injected/client.js:3939:18)
at _CustomZone.runUnary$2$2 (http://localhost:4000/dwds/src/injected/client.js:13074:39)
at _Future__propagateToListeners_handleValueCallback.call$0 (http://localhost:4000/dwds/src/injected/client.js:12102:51)
at Object._Future__propagateToListeners (http://localhost:4000/dwds/src/injected/client.js:3722:93)
at _Future._completeWithValue$1 (http://localhost:4000/dwds/src/injected/client.js:11933:9)
at _AsyncAwaitCompleter.complete$1 (http://localhost:4000/dwds/src/injected/client.js:11649:14)
at Object._asyncReturn (http://localhost:4000/dwds/src/injected/client.js:3547:17)
at http://localhost:4000/dwds/src/injected/client.js:8919:24
at _wrapJsFunctionForAsync_closure.$protected (http://localhost:4000/dwds/src/injected/client.js:3575:15)
at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:4000/dwds/src/injected/client.js:11675:12)
at _awaitOnObject_closure.call$1 (http://localhost:4000/dwds/src/injected/client.js:11663:32)
at StaticClosure._rootRunUnary (http://localhost:4000/dwds/src/injected/client.js:3939:18)
at _CustomZone.runUnary$2$2 (http://localhost:4000/dwds/src/injected/client.js:13074:39)
at _Future__propagateToListeners_handleValueCallback.call$0 (http://localhost:4000/dwds/src/injected/client.js:12102:51)
at Object._Future__propagateToListeners (http://localhost:4000/dwds/src/injected/client.js:3722:93)
at _Future._completeWithValue$1 (http://localhost:4000/dwds/src/injected/client.js:11933:9)
at _AsyncAwaitCompleter.complete$1 (http://localhost:4000/dwds/src/injected/client.js:11649:14)
at Object._asyncReturn (http://localhost:4000/dwds/src/injected/client.js:3547:17)
at http://localhost:4000/dwds/src/injected/client.js:25215:24
at _wrapJsFunctionForAsync_closure.$protected (http://localhost:4000/dwds/src/injected/client.js:3575:15)
at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:4000/dwds/src/injected/client.js:11675:12)
at _awaitOnObject_closure.call$1 (http://localhost:4000/dwds/src/injected/client.js:11663:32)
at StaticClosure._rootRunUnary (http://localhost:4000/dwds/src/injected/client.js:3939:18)
at _CustomZone.runUnary$2$2 (http://localhost:4000/dwds/src/injected/client.js:13074:39)
at _Future__propagateToListeners_handleValueCallback.call$0 (http://localhost:4000/dwds/src/injected/client.js:12102:51)
at Object._Future__propagateToListeners (http://localhost:4000/dwds/src/injected/client.js:3722:93)
at _Future._completeWithValue$1 (http://localhost:4000/dwds/src/injected/client.js:11933:9)
at _AsyncAwaitCompleter.complete$1 (http://localhost:4000/dwds/src/injected/client.js:11649:14)
at Object._asyncReturn (http://localhost:4000/dwds/src/injected/client.js:3547:17)
at http://localhost:4000/dwds/src/injected/client.js:25192:24
at _wrapJsFunctionForAsync_closure.$protected (http://localhost:4000/dwds/src/injected/client.js:3575:15)
at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:4000/dwds/src/injected/client.js:11675:12)
at _awaitOnObject_closure.call$1 (http://localhost:4000/dwds/src/injected/client.js:11663:32)
at StaticClosure._rootRunUnary (http://localhost:4000/dwds/src/injected/client.js:3939:18)
at _CustomZone.runUnary$2$2 (http://localhost:4000/dwds/src/injected/client.js:13074:39)
at _Future__propagateToListeners_handleValueCallback.call$0 (http://localhost:4000/dwds/src/injected/client.js:12102:51)
at Object._Future__propagateToListeners (http://localhost:4000/dwds/src/injected/client.js:3722:93)
at _Future._completeWithValue$1 (http://localhost:4000/dwds/src/injected/client.js:11933:9)
at _Future__asyncCompleteWithValue_closure.call$0 (http://localhost:4000/dwds/src/injected/client.js:12036:18)
at StaticClosure._rootRun (http://localhost:4000/dwds/src/injected/client.js:3924:16)
at _CustomZone.run$1$1 (http://localhost:4000/dwds/src/injected/client.js:13066:39)
at _CustomZone.runGuarded$1 (http://localhost:4000/dwds/src/injected/client.js:13009:14)
at _CustomZone_bindCallbackGuarded_closure.call$0 (http://localhost:4000/dwds/src/injected/client.js:13204:25)
at Object._microtaskLoop (http://localhost:4000/dwds/src/injected/client.js:3783:24)
at StaticClosure._startMicrotaskLoop (http://localhost:4000/dwds/src/injected/client.js:3789:11)
at _AsyncRun__initializeScheduleImmediate_internalCallback.call$1 (http://localhost:4000/dwds/src/injected/client.js:11552:9)
at invokeClosure (http://localhost:4000/dwds/src/injected/client.js:1229:26)
at MutationObserver.<anonymous> (http://localhost:4000/dwds/src/injected/client.js:1248:18)
bkonyi commented 1 week ago

Hi @amitsahni, can you try the steps outlined here and let me know if that resolves your issue?