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.
I got the following html code using my flutter web app as an iframe. All the other tickets I found on here reference web sockets.
Here is my html code:
here is my flutter web/index.html:
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:
SecurityError: Failed to read a named property 'document' from 'Window': Blocked a frame with origin "http://localhost:58585" from accessing a cross-origin frame. Error: Failed to read a named property 'document' from 'Window': Blocked a frame with origin "http://localhost:58585" from accessing a cross-origin frame. at Object._launchCommunicationWithDebugExtension (http://localhost:58585/dwds/src/injected/client.js:9694:23) at http://localhost:58585/dwds/src/injected/client.js:25899:17 at _wrapJsFunctionForAsync_closure.$protected (http://localhost:58585/dwds/src/injected/client.js:4049:15) at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:58585/dwds/src/injected/client.js:12422:12) at _awaitOnObject_closure.call$1 (http://localhost:58585/dwds/src/injected/client.js:12410:32) at StaticClosure._rootRunUnary (http://localhost:58585/dwds/src/injected/client.js:4431:18) at _CustomZone.runUnary$2$2 (http://localhost:58585/dwds/src/injected/client.js:13817:39) at _FuturepropagateToListeners_handleValueCallback.call$0 (http://localhost:58585/dwds/src/injected/client.js:12848:51) at Object._FuturepropagateToListeners (http://localhost:58585/dwds/src/injected/client.js:4214:93) at _Future._completeWithValue$1 (http://localhost:58585/dwds/src/injected/client.js:12684:9) at _AsyncAwaitCompleter.complete$1 (http://localhost:58585/dwds/src/injected/client.js:12396:14) at Object._asyncReturn (http://localhost:58585/dwds/src/injected/client.js:4021:17) at http://localhost:58585/dwds/src/injected/client.js:9849:24 at _wrapJsFunctionForAsync_closure.$protected (http://localhost:58585/dwds/src/injected/client.js:4049:15) at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:58585/dwds/src/injected/client.js:12422:12) at _awaitOnObject_closure.call$1 (http://localhost:58585/dwds/src/injected/client.js:12410:32) at StaticClosure._rootRunUnary (http://localhost:58585/dwds/src/injected/client.js:4431:18) at _CustomZone.runUnary$2$2 (http://localhost:58585/dwds/src/injected/client.js:13817:39) at _FuturepropagateToListeners_handleValueCallback.call$0 (http://localhost:58585/dwds/src/injected/client.js:12848:51) at Object._FuturepropagateToListeners (http://localhost:58585/dwds/src/injected/client.js:4214:93) at _Future._completeWithValue$1 (http://localhost:58585/dwds/src/injected/client.js:12684:9) at _AsyncAwaitCompleter.complete$1 (http://localhost:58585/dwds/src/injected/client.js:12396:14) at Object._asyncReturn (http://localhost:58585/dwds/src/injected/client.js:4021:17) at http://localhost:58585/dwds/src/injected/client.js:26515:24 at _wrapJsFunctionForAsync_closure.$protected (http://localhost:58585/dwds/src/injected/client.js:4049:15) at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:58585/dwds/src/injected/client.js:12422:12) at _awaitOnObject_closure.call$1 (http://localhost:58585/dwds/src/injected/client.js:12410:32) at StaticClosure._rootRunUnary (http://localhost:58585/dwds/src/injected/client.js:4431:18) at _CustomZone.runUnary$2$2 (http://localhost:58585/dwds/src/injected/client.js:13817:39) at _FuturepropagateToListeners_handleValueCallback.call$0 (http://localhost:58585/dwds/src/injected/client.js:12848:51) at Object._FuturepropagateToListeners (http://localhost:58585/dwds/src/injected/client.js:4214:93) at _Future._completeWithValue$1 (http://localhost:58585/dwds/src/injected/client.js:12684:9) at _AsyncAwaitCompleter.complete$1 (http://localhost:58585/dwds/src/injected/client.js:12396:14) at Object._asyncReturn (http://localhost:58585/dwds/src/injected/client.js:4021:17) at http://localhost:58585/dwds/src/injected/client.js:26492:24 at _wrapJsFunctionForAsync_closure.$protected (http://localhost:58585/dwds/src/injected/client.js:4049:15) at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:58585/dwds/src/injected/client.js:12422:12) at _awaitOnObject_closure.call$1 (http://localhost:58585/dwds/src/injected/client.js:12410:32) at StaticClosure._rootRunUnary (http://localhost:58585/dwds/src/injected/client.js:4431:18) at _CustomZone.runUnary$2$2 (http://localhost:58585/dwds/src/injected/client.js:13817:39) at _FuturepropagateToListeners_handleValueCallback.call$0 (http://localhost:58585/dwds/src/injected/client.js:12848:51) at Object._FuturepropagateToListeners (http://localhost:58585/dwds/src/injected/client.js:4214:93) at _Future._completeWithValue$1 (http://localhost:58585/dwds/src/injected/client.js:12684:9) at _FutureasyncCompleteWithValue_closure.call$0 (http://localhost:58585/dwds/src/injected/client.js:12788:18) at StaticClosure._rootRun (http://localhost:58585/dwds/src/injected/client.js:4416:16) at _CustomZone.run$1$1 (http://localhost:58585/dwds/src/injected/client.js:13809:39) at _CustomZone.runGuarded$1 (http://localhost:58585/dwds/src/injected/client.js:13752:14) at _CustomZone_bindCallbackGuarded_closure.call$0 (http://localhost:58585/dwds/src/injected/client.js:13947:25) at Object._microtaskLoop (http://localhost:58585/dwds/src/injected/client.js:4275:24) at StaticClosure._startMicrotaskLoop (http://localhost:58585/dwds/src/injected/client.js:4281:11) at _AsyncRuninitializeScheduleImmediate_internalCallback.call$1 (http://localhost:58585/dwds/src/injected/client.js:12299:9)