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

Unhandled error detected in the injected client.js script. #1133

Closed
emmanuelcohenlaroque opened this issue Oct 7, 2020 · 22 comments
Closed

Comments

@emmanuelcohenlaroque
Copy link

emmanuelcohenlaroque commented Oct 7, 2020

Since upgrading, I run into the following issue when debugging on Chrome device:

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://0.0.0.0:8080/dwds/src/injected/client.js:3507:43)
    at http://0.0.0.0:8080/dwds/src/injected/client.js:22732:60
    at _wrapJsFunctionForAsync_closure.$protected (http://0.0.0.0:8080/dwds/src/injected/client.js:3802:15)
    at _wrapJsFunctionForAsync_closure.call$2 (http://0.0.0.0:8080/dwds/src/injected/client.js:10996:12)
    at Object._asyncStartSync (http://0.0.0.0:8080/dwds/src/injected/client.js:3766:20)
    at RequireRestarter._getDigests$0 (http://0.0.0.0:8080/dwds/src/injected/client.js:22744:16)
    at http://0.0.0.0:8080/dwds/src/injected/client.js:22759:48
    at _wrapJsFunctionForAsync_closure.$protected (http://0.0.0.0:8080/dwds/src/injected/client.js:3802:15)
    at _wrapJsFunctionForAsync_closure.call$2 (http://0.0.0.0:8080/dwds/src/injected/client.js:10996:12)
    at Object._asyncStartSync (http://0.0.0.0:8080/dwds/src/injected/client.js:3766:20)
    at RequireRestarter._initialize$0 (http://0.0.0.0:8080/dwds/src/injected/client.js:22767:16)
    at http://0.0.0.0:8080/dwds/src/injected/client.js:8572:45
    at _wrapJsFunctionForAsync_closure.$protected (http://0.0.0.0:8080/dwds/src/injected/client.js:3802:15)
    at _wrapJsFunctionForAsync_closure.call$2 (http://0.0.0.0:8080/dwds/src/injected/client.js:10996:12)
    at Object._asyncStartSync (http://0.0.0.0:8080/dwds/src/injected/client.js:3766:20)
    at Object.RequireRestarter_create (http://0.0.0.0:8080/dwds/src/injected/client.js:8584:16)
    at http://0.0.0.0:8080/dwds/src/injected/client.js:22319:38
    at _wrapJsFunctionForAsync_closure.$protected (http://0.0.0.0:8080/dwds/src/injected/client.js:3802:15)
    at _wrapJsFunctionForAsync_closure.call$2 (http://0.0.0.0:8080/dwds/src/injected/client.js:10996:12)
    at _awaitOnObject_closure.call$1 (http://0.0.0.0:8080/dwds/src/injected/client.js:10982:32)
    at StaticClosure._rootRunUnary [as call$2$5] (http://0.0.0.0:8080/dwds/src/injected/client.js:4130:18)
    at _CustomZone.runUnary$2$2 (http://0.0.0.0:8080/dwds/src/injected/client.js:12301:39)
    at _Future__propagateToListeners_handleValueCallback.call$0 (http://0.0.0.0:8080/dwds/src/injected/client.js:11362:51)
    at Object._Future__propagateToListeners (http://0.0.0.0:8080/dwds/src/injected/client.js:3914:93)
    at _Future._complete$1 (http://0.0.0.0:8080/dwds/src/injected/client.js:11186:11)
    at Object._cancelAndValue (http://0.0.0.0:8080/dwds/src/injected/client.js:4069:16)
    at Stream_first_closure0.call$1 (http://0.0.0.0:8080/dwds/src/injected/client.js:11454:9)
    at _EventStreamSubscription_onData_closure.call$1 (http://0.0.0.0:8080/dwds/src/injected/client.js:17309:30)
    at StaticClosure._rootRunUnary [as call$2$5] (http://0.0.0.0:8080/dwds/src/injected/client.js:4136:16)
    at _CustomZone.runUnary$2$2 (http://0.0.0.0:8080/dwds/src/injected/client.js:12301:39)
    at _CustomZone.runUnaryGuarded$1$2 (http://0.0.0.0:8080/dwds/src/injected/client.js:12233:14)
    at _CustomZone_bindUnaryCallbackGuarded_closure.call$1 (http://0.0.0.0:8080/dwds/src/injected/client.js:12436:25)
    at invokeClosure (http://0.0.0.0:8080/dwds/src/injected/client.js:1204:26)
    at EventSource.<anonymous> (http://0.0.0.0:8080/dwds/src/injected/client.js:1223:18)
 • Flutter version 1.22.0 at /home/ecl/localdevs/flutter
    • Framework revision 7c6f9dd239 (8 weeks ago), 2020-08-09 10:31:03 -0400
    • Engine revision 6d86e67f04
    • Dart version 2.10.0 (build 2.10.0-4.0.dev 0341576448)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/ecl/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.3)
    • VS Code at /usr/share/code
    • Flutter extension version 3.15.0

[✓] Connected device (2 available)
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 86.0.4240.75

• No issues found!
@grouma
Copy link
Member

grouma commented Oct 7, 2020

@ecl66 since upgrading what exactly?

cc @jonahwilliams

@grouma
Copy link
Member

grouma commented Oct 9, 2020

@Markzipan I believe you resolved this issue in the SDK. Does the user simply need to upgrade?

@Markzipan
Copy link
Contributor

The previous fix should've been cherry-picked into Dart 2.9.3. It's possible that a recent Chrome update changed some of our API expectations, as this kind of error implicates just a handful of special JS classes. @ecl66 and @Tobi696, do you both have an app or simple repro you can provide?

@Tobi696
Copy link

Tobi696 commented Oct 10, 2020

It seems to be a problem with Chrome's API as it works in Microsoft Edge.

@Tobi696
Copy link

Tobi696 commented Oct 10, 2020

@Markzipan I cannot give you access to my real project, but I just created a new project with flutter create and tested debugging on chrome and I get the same error. You can view the generated code here: Tobi696/chrome_api_test

@grouma
Copy link
Member

grouma commented Oct 11, 2020

@sigmundch is this related to dart-lang/sdk#43193

@marcckku
Copy link

It seems to be a problem with Chrome's API as it works in Microsoft Edge.
Tobi696 It is true!! it works both with Microsoft Edge and with Opera .. but with Chrome nothing !!

@sigmundch
Copy link
Member

Yes, I do think this is highly related to the other issue.

MemoryInfo caused trouble early on (during load time) and when we tested things out back then in Chrome 87 canary, we didn't see other issues. It's likely missed other similar scenarios. It's possible that they come up later when code in the app start running, which would explain why we missed it.

We also recently saw an issue with navigator.getGamepads which involves a similar underlying change from the browser: dart-lang/sdk#43750

@Markzipan is working on fixing this.

@Markzipan
Copy link
Contributor

Markzipan commented Oct 12, 2020

I can repro this issue on revision 7c6f9dd239 but not at head of master. I can confirm that this issue is due to the aforementioned MemoryInfo problem, so can you try upgrading flutter and rerunning @ecl66? This is odd - I thought that bug was patched earlier, but the compiled SDK doesn't appear to have the patch.

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Oct 13, 2020
…bject's prototype chain.

See bugs:
* dart-lang/webdev#1133
* #43750

Change-Id: I0daa13ab56be5a2967241a5fcea63a32c0a5cde4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
@grouma
Copy link
Member

grouma commented Oct 15, 2020

Closing for now. Please reopen if upgrading your SDK does not resolve the issue.

@grouma grouma closed this as completed Oct 15, 2020
@fardump
Copy link

fardump commented Oct 16, 2020

i had upgrade my dart sdk but it seems stuck tho with those error. what should i do next?

@sigmundch
Copy link
Member

Sorry to hear you are still stuck.

Can you please share with us more details about your configuration and how you encountered the error? It would be very useful to see versions of your configuration (details from flutter doctor if you are using flutter). We are especially interested in seeing what version of the Dart SDK you are using and if the error happens on any code or only on some specific code in your app.

@ciriousjoker
Copy link

Same error here, I literally didn't do anything.

Flutter 1.20.2 • channel unknown • unknown source
Framework • revision bbfbf1770c (10 weeks ago) • 2020-08-13 08:33:09 -0700
Engine • revision 9d5b21729f
Tools • Dart 2.9.1

@grouma
Copy link
Member

grouma commented Oct 21, 2020

It looks like you are using an older version of the SDK. You'll need to upgrade. You were broken due to an automatic update of Chrome.

@ciriousjoker
Copy link

Do I just need to upgrade dart or Flutter as well?

@tasibalint
Copy link

Upgraded Flutter, Upgraded Chrome worked for me!

@marcckku
Copy link

Hi everyone, for a couple of days I had been having trouble running Web Flutter on Chrome so I was using another browser like Edge. Now that I have updated Windows, Flutter web beta no longer starts in Chrome or Edge ... What can I do ??? ..

I leave here the version I am using ...

[√] Flutter (Channel beta, 1.21.0-9.1.pre, on Microsoft Windows [Versione 10.0.18363.1139]
• Flutter version 1.21.0-9.1
• Framework revision be9bc8cb39 (9 weeks ago), 2020-08-18 09:46:08 -0700
• Engine revision 267070c17a
• Dart version 2.10.0 (build 2.10.0-7.2.beta)

HELP PLEASE!!!!

@marcckku
Copy link

marcckku commented Oct 22, 2020

Resolved for Chrome but non for Edge from Android Studio !!

So I ran the folder level update of my flutter web project:

$ flutter channel beta
$ flutter update --force

OUTPUT:
Flutter 1.23.0-18.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 198df796aa (7 days ago) • 2020-10-15 12:04:33 -0700
Engine • revision 1d12d82d9c
Tools • Dart 2.11.0 (build 2.11.0-213.1.beta)

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, 1.23.0-18.1.pre, on Microsoft Windows)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 4.0)
[√] VS Code (version 1.50.1)
[√] Connected device (3 available)

I updated Chrome I restarted my computer and now Chrome works !!

In theory even after updating the Edge browser it must work but Edge does not work. I am using Android Studio and it works with Chrome but it does NOT work with Edge !!!

In my case for my Edge browser:
Microsoft Edge is up to date.
Version 86.0.622.51 (Official Build) (64-bit)


@ciriousjoker
Copy link

Latest Flutter 1.23.0-pre... beta seems to work perfectly.

@AkshayNG
Copy link

AkshayNG commented Oct 26, 2020

I'm facing the same issue when run the app from Android Studio on macOS. But it worked when I run the project from terminal with command flutter run -d chrome. Could Android studio be the problem ?

I've on latest beta channel and chrome is also up to date. Below is the output of flutter doctor:

flutter doctor -v
[✓] Flutter (Channel beta, 1.23.0-18.1.pre, on Mac OS X 10.15.6 19G2021 x86_64, locale en-IN)
    • Flutter version 1.23.0-18.1.pre at /Users/manishkungwani/flutter
    • Framework revision 198df796aa (11 days ago), 2020-10-15 12:04:33 -0700
    • Engine revision 1d12d82d9c
    • Dart version 2.11.0 (build 2.11.0-213.1.beta)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/manishkungwani/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (2 available)
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 86.0.4240.111

• No issues found!

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Oct 27, 2020
…bject's prototype chain.

See bugs:
* dart-lang/webdev#1133
* #43750

Change-Id: I0daa13ab56be5a2967241a5fcea63a32c0a5cde4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
@grouma
Copy link
Member

grouma commented Oct 27, 2020

@AkshayNG is your Android Studio referencing a stale Dart / Flutter version?

@AkshayNG
Copy link

@AkshayNG is your Android Studio referencing a stale Dart / Flutter version?

Oh sorry, its pointing to one of the old beta versions installed via FVM on my system. Just changed it to latest one worked. Thanks @grouma for pointing this out.

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Oct 29, 2020
…bject's prototype chain.

See bugs:
* dart-lang/webdev#1133
* #43750

Change-Id: I0daa13ab56be5a2967241a5fcea63a32c0a5cde4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
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

10 participants