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

Does it support run on Chrome 107? #226

Open
nguyenthaituananh9x opened this issue Mar 17, 2023 · 8 comments
Open

Does it support run on Chrome 107? #226

nguyenthaituananh9x opened this issue Mar 17, 2023 · 8 comments

Comments

@nguyenthaituananh9x
Copy link

Does it support run on Chrome 107?

@xvrh
Copy link
Owner

xvrh commented Mar 17, 2023

Yes it should.
To prevent incompatibility issue, you probably want to use the version 2.16.0 of this library.

Post here if you have any specific error.

@tbm98
Copy link

tbm98 commented Mar 18, 2023

Yes it should.
To prevent incompatibility issue, you probably want to use the version 2.16.0 of this library.

Post here if you have any specific error.

I will try

@ninhngadev
Copy link

Hi @xvrh.
Is there any way I can use the library in the latest version of the code (bug fixed) but compatible with lower chrome versions, for example chrome 107?

@xvrh
Copy link
Owner

xvrh commented Mar 24, 2023

@ninhngadev it's possible that the latest version of this library works with chrome 107. But it's also possible that there is a breaking change in the protocol between v107 and v112.
Since Dart has a sound type system any small change can easily trigger a null assertion error.

But I recommend that you try and show us any error you run into.

@ninhngadev
Copy link

I got a crash when run on chrome 107

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'String' in type cast
#0      new ExecutionContextDestroyedEvent.fromJson (package:puppeteer/protocol/runtime.dart:546:66)
#1      RuntimeApi.onExecutionContextDestroyed.<anonymous closure> (package:puppeteer/protocol/runtime.dart:46:46)
#2      _MapStream._handleData (dart:async/stream_pipe.dart:213:31)
#3      _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#5      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#6      _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
#7      _WhereStream._handleData (dart:async/stream_pipe.dart:195:12)
#8      _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#9      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#10     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#11     _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:385:20)
#12     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:322:15)
#13     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:384:5)
#14     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244:5)
#15     Session._onMessage (package:puppeteer/src/connection.dart:259:24)
#16     Connection._onMessage (package:puppeteer/src/connection.dart:144:17)
#17     _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#18     CastStreamSubscription._onData (dart:_internal/async_cast.dart:85:11)
#19     _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#20     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#21     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#22     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#23     _StreamController._add (dart:async/stream_controller.dart:648:7)
#24     _StreamController.add (dart:async/stream_controller.dart:596:5)
#25     new _WebSocketImpl._fromSocket.<anonymous closure> (dart:_http/websocket_impl.dart:1144:21)
#26     _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#27     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#28     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#29     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#30     _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#31     _WebSocketProtocolTransformer._messageFrameEnd (dart:_http/websocket_impl.dart:332:23)
#32     _WebSocketProtocolTransformer.add (dart:_http/websocket_impl.dart:226:46)
#33     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#34     _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#35     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#36     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#37     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#38     _StreamController._add (dart:async/stream_controller.dart:648:7)
#39     _StreamController.add (dart:async/stream_controller.dart:596:5)
#40     _Socket._onData (dart:io-patch/socket_patch.dart:2355:41)
#41     _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#42     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#43     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#44     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#45     _StreamController._add (dart:async/stream_controller.dart:648:7)
#46     _StreamController.add (dart:async/stream_controller.dart:596:5)
#47     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1877:33)
#48     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1334:14)
#49     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#50     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#51     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
#52     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)

@ninhngadev
Copy link

@xvrh.
I just workaround by
image
but I don't know what the potential dangers would be in doing so.

@xvrh
Copy link
Owner

xvrh commented Mar 25, 2023

@ninhngadev yes this is exactly the kind of error I was expecting. Dart has sound null-safety now, so this is very easy to run into this kind of cast error when there is a version mismatch (between the version of the protocol and the chrome instance).

I think you can easily maintain your own fork of this library with your fixes applies to workaround the bug (until you can upgrade Chrome to a newer version).

@ninhngadev
Copy link

Thanks @xvrh.
I think it's safe to close this issue.

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