-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Description
The flutter_driver tool's tap command fails with a type cast error when attempting to interact with widgets.
Steps to Reproduce
- Connect to a running Flutter app via DTD
- Execute the
flutter_drivercommand withtapaction
{
"command": "tap",
"finderType": "ByTooltipMessage",
"text": "Settings",
"timeout": 5000
}Or with ByType:
{
"command": "tap",
"finderType": "ByType",
"type": "BottomNavigationBar",
"timeout": 5000
}Error Message
type 'int' is not a subtype of type 'String?' in type cast
#0 DartToolingDaemonSupport._callFlutterDriver.<anonymous closure> (package:dart_mcp_server/src/mixins/dtd.dart:187)
<asynchronous suspension>
#1 DartToolingDaemonSupport._callOnVmService (package:dart_mcp_server/src/mixins/dtd.dart:667)
<asynchronous suspension>
#2 DartMCPServer.registerTool.<anonymous closure> (package:dart_mcp_server/src/server.dart:193)
<asynchronous suspension>
#3 ToolsSupport._callTool (package:dart_mcp/src/server/tools_support.dart:113)
<asynchronous suspension>
#4 Server._handleSingleRequest (package:json_rpc_2/src/server.dart:212)
<asynchronous suspension>
#5 Server._handleRequest (package:json_rpc_2/src/server.dart:187)
<asynchronous suspension>
Environment
- dart_mcp_server: latest (via npx)
- Flutter: 3.38.4
- Dart SDK: 3.9.2
- OS: macOS
Expected Behavior
The tap command should successfully tap on the specified widget.
Actual Behavior
The command fails immediately with a type cast error, suggesting an issue in the response parsing at dtd.dart:187.