Skip to content

Launching app in Chrome failed - NoSuchMethod JS error #1087

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

Closed
goranalkovic opened this issue Aug 19, 2020 · 13 comments
Closed

Launching app in Chrome failed - NoSuchMethod JS error #1087

goranalkovic opened this issue Aug 19, 2020 · 13 comments
Assignees

Comments

@goranalkovic
Copy link

Hello, I got this error when launching my app in the debug mode in browser.

I'm on Channel master, version 1.21.0-10.0.pre.161, on Windows 10 Insider [Version 10.0.20190.1000].

The output is below:
NoSuchMethodError: method not found: 'get$digestsPath' (J.getInterceptor$x(...).get$digestsPath is not a function) TypeError: J.getInterceptor$x(...).get$digestsPath is not a function at Object.get$digestsPath$x (http://localhost:51482/dwds/src/injected/client.js:3507:43) at http://localhost:51482/dwds/src/injected/client.js:22732:60 at _wrapJsFunctionForAsync_closure.$protected (http://localhost:51482/dwds/src/injected/client.js:3802:15) at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:51482/dwds/src/injected/client.js:10996:12) at Object._asyncStartSync (http://localhost:51482/dwds/src/injected/client.js:3766:20) at RequireRestarter._getDigests$0 (http://localhost:51482/dwds/src/injected/client.js:22744:16) at http://localhost:51482/dwds/src/injected/client.js:22759:48 at _wrapJsFunctionForAsync_closure.$protected (http://localhost:51482/dwds/src/injected/client.js:3802:15) at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:51482/dwds/src/injected/client.js:10996:12) at Object._asyncStartSync (http://localhost:51482/dwds/src/injected/client.js:3766:20) at RequireRestarter._initialize$0 (http://localhost:51482/dwds/src/injected/client.js:22767:16) at http://localhost:51482/dwds/src/injected/client.js:8572:45 at _wrapJsFunctionForAsync_closure.$protected (http://localhost:51482/dwds/src/injected/client.js:3802:15) at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:51482/dwds/src/injected/client.js:10996:12) at Object._asyncStartSync (http://localhost:51482/dwds/src/injected/client.js:3766:20) at Object.RequireRestarter_create (http://localhost:51482/dwds/src/injected/client.js:8584:16) at http://localhost:51482/dwds/src/injected/client.js:22319:38 at _wrapJsFunctionForAsync_closure.$protected (http://localhost:51482/dwds/src/injected/client.js:3802:15) at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:51482/dwds/src/injected/client.js:10996:12) at _awaitOnObject_closure.call$1 (http://localhost:51482/dwds/src/injected/client.js:10982:32) at StaticClosure._rootRunUnary [as call$2$5] (http://localhost:51482/dwds/src/injected/client.js:4130:18) at _CustomZone.runUnary$2$2 (http://localhost:51482/dwds/src/injected/client.js:12301:39) at _Future__propagateToListeners_handleValueCallback.call$0 (http://localhost:51482/dwds/src/injected/client.js:11362:51) at Object._Future__propagateToListeners (http://localhost:51482/dwds/src/injected/client.js:3914:93) at _Future._complete$1 (http://localhost:51482/dwds/src/injected/client.js:11186:11) at Object._cancelAndValue (http://localhost:51482/dwds/src/injected/client.js:4069:16) at Stream_first_closure0.call$1 (http://localhost:51482/dwds/src/injected/client.js:11454:9) at _EventStreamSubscription_onData_closure.call$1 (http://localhost:51482/dwds/src/injected/client.js:17309:30) at StaticClosure._rootRunUnary [as call$2$5] (http://localhost:51482/dwds/src/injected/client.js:4136:16) at _CustomZone.runUnary$2$2 (http://localhost:51482/dwds/src/injected/client.js:12301:39) at _CustomZone.runUnaryGuarded$1$2 (http://localhost:51482/dwds/src/injected/client.js:12233:14) at _CustomZone_bindUnaryCallbackGuarded_closure.call$1 (http://localhost:51482/dwds/src/injected/client.js:12436:25) at invokeClosure (http://localhost:51482/dwds/src/injected/client.js:1204:26) at EventSource.<anonymous> (http://localhost:51482/dwds/src/injected/client.js:1223:18)

@mnordine
Copy link

I'm getting this error in WebStorm, and I can't launch and debug my app.

@mnordine
Copy link

The error I get seems really similar to above, but suggests adding the flag --no-injected-client, but that renders WebStorm useless as an IDE.

@mnordine
Copy link

mnordine commented Aug 20, 2020

Not only that, when I manually run webdev serve --no-injected-client, my app throws a bunch of runtime errors, that it normally does not. This seems like a big breakage. I'm dead in the water right now. Any workarounds or suggestions?

@mnordine
Copy link

I've tried deleted .dart_tool, .packages, re-running pub get, or pub upgrade, tried different versions of webdev, no luck.

@mnordine
Copy link

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:

NoSuchMethodError: method not found: 'get$digestsPath' (J.getInterceptor$x(...).get$digestsPath is not a function)
TypeError: J.getInterceptor$x(...).get$digestsPath is not a function
    at Object.get$digestsPath$x (http://127.0.0.1:8080/dwds/src/injected/client.js:3536:43)
    at http://127.0.0.1:8080/dwds/src/injected/client.js:22757:60
    at _wrapJsFunctionForAsync_closure.$protected (http://127.0.0.1:8080/dwds/src/injected/client.js:3834:15)
    at _wrapJsFunctionForAsync_closure.call$2 (http://127.0.0.1:8080/dwds/src/injected/client.js:11028:12)
    at Object._asyncStartSync (http://127.0.0.1:8080/dwds/src/injected/client.js:3798:20)
    at RequireRestarter._getDigests$0 (http://127.0.0.1:8080/dwds/src/injected/client.js:22769:16)
    at http://127.0.0.1:8080/dwds/src/injected/client.js:22784:48
    at _wrapJsFunctionForAsync_closure.$protected (http://127.0.0.1:8080/dwds/src/injected/client.js:3834:15)
    at _wrapJsFunctionForAsync_closure.call$2 (http://127.0.0.1:8080/dwds/src/injected/client.js:11028:12)
    at Object._asyncStartSync (http://127.0.0.1:8080/dwds/src/injected/client.js:3798:20)
    at RequireRestarter._initialize$0 (http://127.0.0.1:8080/dwds/src/injected/client.js:22792:16)
    at http://127.0.0.1:8080/dwds/src/injected/client.js:8601:45
    at _wrapJsFunctionForAsync_closure.$protected (http://127.0.0.1:8080/dwds/src/injected/client.js:3834:15)
    at _wrapJsFunctionForAsync_closure.call$2 (http://127.0.0.1:8080/dwds/src/injected/client.js:11028:12)
    at Object._asyncStartSync (http://127.0.0.1:8080/dwds/src/injected/client.js:3798:20)
    at Object.RequireRestarter_create (http://127.0.0.1:8080/dwds/src/injected/client.js:8613:16)
    at http://127.0.0.1:8080/dwds/src/injected/client.js:22347:38
    at _wrapJsFunctionForAsync_closure.$protected (http://127.0.0.1:8080/dwds/src/injected/client.js:3834:15)
    at _wrapJsFunctionForAsync_closure.call$2 (http://127.0.0.1:8080/dwds/src/injected/client.js:11028:12)
    at _awaitOnObject_closure.call$1 (http://127.0.0.1:8080/dwds/src/injected/client.js:11014:32)
    at StaticClosure._rootRunUnary [as call$2$5] (http://127.0.0.1:8080/dwds/src/injected/client.js:4162:18)
    at _CustomZone.runUnary$2$2 (http://127.0.0.1:8080/dwds/src/injected/client.js:12334:39)
    at _Future__propagateToListeners_handleValueCallback.call$0 (http://127.0.0.1:8080/dwds/src/injected/client.js:11395:51)
    at Object._Future__propagateToListeners (http://127.0.0.1:8080/dwds/src/injected/client.js:3946:93)
    at _Future._complete$1 (http://127.0.0.1:8080/dwds/src/injected/client.js:11218:11)
    at Object._cancelAndValue (http://127.0.0.1:8080/dwds/src/injected/client.js:4101:16)
    at Stream_first_closure0.call$1 (http://127.0.0.1:8080/dwds/src/injected/client.js:11487:9)
    at _EventStreamSubscription_onData_closure.call$1 (http://127.0.0.1:8080/dwds/src/injected/client.js:17346:30)
    at StaticClosure._rootRunUnary [as call$2$5] (http://127.0.0.1:8080/dwds/src/injected/client.js:4168:16)
    at _CustomZone.runUnary$2$2 (http://127.0.0.1:8080/dwds/src/injected/client.js:12334:39)
    at _CustomZone.runUnaryGuarded$1$2 (http://127.0.0.1:8080/dwds/src/injected/client.js:12266:14)
    at _CustomZone_bindUnaryCallbackGuarded_closure.call$1 (http://127.0.0.1:8080/dwds/src/injected/client.js:12469:25)
    at invokeClosure (http://127.0.0.1:8080/dwds/src/injected/client.js:1205:26)
    at EventSource.<anonymous> (http://127.0.0.1:8080/dwds/src/injected/client.js:1224:18)

@bluego-leon
Copy link

Same issue. Also occurs when running a blank flutter project, by following these steps:

  1. flutter create name
  2. flutter run -d chrome
  3. webpage is blank and console errors are as above

@bluego-leon
Copy link

When using flutter run -d web the following error shows up in the Chrome (86.0.4238.2 (Official Build) dev (x86_64)) console:

dart_sdk.js:4334 Uncaught (in promise) Error: NoSuchMethodError: 'returnType'
method not found
Receiver: Instance of 'FunctionType'
Arguments: []
    at Object.throw_ [as throw] (dart_sdk.js:4334)
    at Object.defaultNoSuchMethod (dart_sdk.js:4776)
    at dart.FunctionType.new.noSuchMethod (dart_sdk.js:5827)
    at Object.noSuchMethod (dart_sdk.js:4772)
    at Object.dload (dart_sdk.js:4396)
    at Object._canonicalizeNormalizedTypeObject (dart_sdk.js:5202)
    at Object.wrapType (dart_sdk.js:5189)
    at Function.new (dart_sdk.js:39829)
    at new binding$0._SystemFontsNotifier.new (:54525/packages/flutter/src/painting/binding.dart.js:168)
    at binding$5.WidgetsFlutterBinding.new.binding$0.PaintingBinding.<computed> (:54525/packages/flutter/src/painting/binding.dart.js:116)
    at binding$5.WidgetsFlutterBinding.new.BindingBase_PaintingBinding$36.new (:54525/packages/flutter/src/widgets/widget_span.dart.js:46314)
    at binding$5.WidgetsFlutterBinding.new.BindingBase_SemanticsBinding$36.new (:54525/packages/flutter/src/widgets/widget_span.dart.js:46321)
    at binding$5.WidgetsFlutterBinding.new.BindingBase_RendererBinding$36.new (:54525/packages/flutter/src/widgets/widget_span.dart.js:46327)
    at binding$5.WidgetsFlutterBinding.new.BindingBase_WidgetsBinding$36.new (:54525/packages/flutter/src/widgets/widget_span.dart.js:46333)
    at new binding$5.WidgetsFlutterBinding.new (:54525/packages/flutter/src/widgets/widget_span.dart.js:46343)
    at Function.ensureInitialized (:54525/packages/flutter/src/widgets/widget_span.dart.js:46338)
    at Object.runApp (:54525/packages/flutter/src/widgets/widget_span.dart.js:46351)
    at main$ (:54525/packages/dashboard/main.dart.js:503)
    at main (:54525/web_entrypoint.dart.js:31)
    at main.next (<anonymous>)
    at dart_sdk.js:37603
    at _RootZone.runUnary (dart_sdk.js:37457)
    at _FutureListener.thenAwait.handleValue (dart_sdk.js:32441)
    at handleValueCallback (dart_sdk.js:32988)
    at Function._propagateToListeners (dart_sdk.js:33026)
    at async._AsyncCallbackEntry.new.callback (dart_sdk.js:32752)
    at Object._microtaskLoop (dart_sdk.js:37718)
    at _startMicrotaskLoop (dart_sdk.js:37724)
    at dart_sdk.js:33243

The page is displayed correctly using Firefox (Version 79.0 (64-bit)).

@bluego-leon
Copy link

Issue does not persist using the stable version of Chrome (currently 84.0.4147.135 (Official Build) (64-bit))

@jakemac53
Copy link
Contributor

cc @grouma

@grouma
Copy link
Member

grouma commented Aug 26, 2020

Digging into this now. @bluego-leon, confirming that I am unable to reproduce this in Chrome stable. This issue appears to only impact Chrome Canary (87.0.4245.0).

I'll provide further updates when I find out more.

@Markzipan
Copy link
Contributor

I can confirm that the similar issue linked above was recently fixed in DDC + Dart2JS: dart-lang/sdk#43193 via this change

@goranalkovic or @mnordine can you try again?

@mnordine
Copy link

mnordine commented Sep 1, 2020

Seems to work here.

@grouma
Copy link
Member

grouma commented Sep 1, 2020

This will be fixed when the next SDK lands. See linked issue above.

@grouma grouma closed this as completed Sep 1, 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

6 participants