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

New exception occurs in v2.2.0 #145

Open
doppio opened this issue Jun 4, 2021 · 9 comments
Open

New exception occurs in v2.2.0 #145

doppio opened this issue Jun 4, 2021 · 9 comments

Comments

@doppio
Copy link

doppio commented Jun 4, 2021

I'm seeing a new error after upgrading v2.2.0 of this package which was just released:

Asynchronous error
type 'Null' is not a subtype of type 'String' in type cast
package:puppeteer/protocol/page.dart 887   new FrameNavigatedEvent.fromJson
package:puppeteer/protocol/page.dart 44    PageApi.onFrameNavigated.<fn>
dart:async                                 _BroadcastStreamController.add
package:puppeteer/src/connection.dart 231  Session._onMessage
package:puppeteer/src/connection.dart 121  Connection._onMessage

If the cause isn't immediately obvious, let me know and I can try to put together a minimal repro case.

@xvrh
Copy link
Owner

xvrh commented Jun 5, 2021

Hi, thanks for the report.
I would love a minimal reproduction.

The first thing that comes to my mind is that maybe you are not using chromium 92 and you are passing a custom executablePath?

@whoraks
Copy link

whoraks commented Jun 10, 2021

First of all, thank you very much for this project.

I also have the same issue. (windows 10, puppeteer-dart: 2.2.0, using executablePath)
Does 2.2.0 only work with chrome 92 version?
Is there any documentation showing puppeteer-dart and chrome version relationship?
(ex: 2.0.0: chrome 90~91, 2.2.0: chrome 92)
I want to automatically download and run the package according to the client chrome version.
(ex: npm install puppeteer-core@chrome-71)

@xvrh
Copy link
Owner

xvrh commented Jun 10, 2021

Hello @whoraks
There is a small change in the devtool protocol in chromium 92.0. It makes it breaking in this library because of null-safety (when a value is absent in the response it will fail).

If you still want to use chrome 90, you should probably stay on 2.0.0.

Is there any documentation showing puppeteer-dart and chrome version relationship?

Generally the association can be found in the changelog
But there is nothing as precise as in the official puppeteer library (https://github.com/puppeteer/puppeteer/blob/main/versions.js)

@whoraks
Copy link

whoraks commented Jun 10, 2021

thank you so much !!!!!!

@yashwant1999
Copy link

Is there any update on issue.
Or does it something that can only be solved with orginal puppeteer library.

Since my most of automation rely most on media [youtube etc]...Which is not something possible on chromium and require chome.

@xvrh
Copy link
Owner

xvrh commented Jul 12, 2021

Hi @Akaatsukhi , if you need to use chrome < v92, the best way is to use version v2.0.0 of this library.

I think the official puppeteer library has the same problem when there is a breaking change in the protocol. The only difference is that they provide a reference table with the compatibilities.

@yashwant1999
Copy link

Hey @xvrh I still getting error with v2.0.0 with chrome 91

image

@xvrh
Copy link
Owner

xvrh commented Jul 12, 2021

@Akaatsukhi can you double check the version you are using by looking in your pubspec.lock.

I think you should use this pub constraint:

dependencies:
 puppeteer: 2.0.0

Because ^2.0.0 can give you 2.2.0 too.

@yashwant1999
Copy link

@Akaatsukhi can you double check the version you are using by looking in your pubspec.lock.

I think you should use this pub constraint:

dependencies:
 puppeteer: 2.0.0

Because ^2.0.0 can give you 2.2.0 too.

Ahh 😩 !! My bad...my bad @xvrh It's working know thank you.

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

4 participants