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

DevTools produces an error when opening in external tab on latest (master) SDK #3852

Closed
DanTup opened this issue Mar 1, 2022 · 0 comments
Closed
Labels
in commands Relates to commands (usually invoked from the command Palette) is bug
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Mar 1, 2022

When launching in an external window this error occurs:

[5:03:05 PM] [VmService] [Error] [Flutter (iPhone 13)] Error handling 'callService' custom request: 500 Failed to launch browser: type 'Null' is not a subtype of type 'String'
#0      DevToolsServer.launchDevTools (package:dds/devtools_server.dart:507:11)
#1      MachineModeCommandHandler.registerLaunchDevToolsService.<anonymous closure> (package:dds/src/devtools/machine_mode_command_handler.dart:378:26)
#2      MachineModeCommandHandler.registerLaunchDevToolsService.<anonymous closure> (package:dds/src/devtools/machine_mode_command_handler.dart:376:9)
#3      VmService._routeRequest (package:vm_service/src/vm_service.dart:2376:27)
#4      VmService._processRequest (package:vm_service/src/vm_service.dart:2346:25)
#5      VmService._processMessageStr (package:vm_service/src/vm_service.dart:2313:9)
#6      VmService._processMessage (package:vm_service/src/vm_service.dart:2271:7)
#7      _RootZone.runUnaryGuarded (dart:async/zone.dart:1618:10)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:34…
[5:03:05 PM] [General] [Error] DevTools failed to launch Chrome, will launch default browser locally instead: Failed to launch browser: type 'Null' is not a subtype of type 'String'
#0      DevToolsServer.launchDevTools (package:dds/devtools_server.dart:507:11)
#1      MachineModeCommandHandler.registerLaunchDevToolsService.<anonymous closure> (package:dds/src/devtools/machine_mode_command_handler.dart:378:26)
#2      MachineModeCommandHandler.registerLaunchDevToolsService.<anonymous closure> (package:dds/src/devtools/machine_mode_command_handler.dart:376:9)
#3      VmService._routeRequest (package:vm_service/src/vm_service.dart:2376:27)
#4      VmService._processRequest (package:vm_service/src/vm_service.dart:2346:25)
#5      VmService._processMessageStr (package:vm_service/src/vm_service.dart:2313:9)
#6      VmService._processMessage (package:vm_service/src/vm_service.dart:2271:7)
#7      _RootZone.runUnaryGuarded (dart:async/zone.dart:1618:10)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl…

The issue appears to be that we're not passing page and this code is now null-safe and assumes a page. It's not clear from the docs before that null was really intended to be a valid value, so we should fix VS Code to always provide a page ID.

@DanTup DanTup added is bug in commands Relates to commands (usually invoked from the command Palette) labels Mar 1, 2022
@DanTup DanTup added this to the v3.36.0 milestone Mar 1, 2022
@DanTup DanTup closed this as completed in cc51ec4 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in commands Relates to commands (usually invoked from the command Palette) is bug
Projects
None yet
Development

No branches or pull requests

1 participant