Skip to content

[Bug]: Fix cross-platform compatibility issue with open command in testsprite_bootstrap_tests tools #14

Description

@gauravb2503

Description:
The testsprite_bootstrap_tests tools currently use the open command to launch applications/files, which works correctly on macOS but fails on Linux systems where this command is not available by default.
Issue:

Tool functions properly on macOS using the open command
Linux users encounter errors when the tool attempts to execute open
This creates a platform-specific compatibility issue

Proposed Solution:
Implement cross-platform detection to use the appropriate command:

macOS: open
Linux: xdg-open
Windows: start (if applicable)

Impact:
Affects Linux users who cannot successfully run the testsprite_bootstrap_tests tools
Limits the tool's usability across different development environments

2025-09-23 15:35:07.210 [warning] [server stderr] TestSprite MCP Server running on stdio 2025-09-23 15:35:07.218 [info] Discovered 6 tools 2025-09-23 15:45:59.126 [warning] [server stderr] file:///home/gaurav/.npm/_npx/8ddf6bea01b2519d/node_modules/@testsprite/testsprite-mcp/dist/index.js:114860 2025-09-23 15:45:59.126 [warning] [server stderr] throw new Error(Failed to open browser:${error}); 2025-09-23 15:45:59.127 [warning] [server stderr] ^ 2025-09-23 15:45:59.127 [warning] [server stderr] 2025-09-23 15:45:59.127 [warning] [server stderr] Error: Failed to open browser:Error: Command failed: open "http://localhost:40809/init?project_path=%2Fhome%2Fgaurav%2FDocuments%2FProjects%2Ffrontend_vuejs&default_type=frontend" 2025-09-23 15:45:59.127 [warning] [server stderr] /bin/sh: 1: open: not found 2025-09-23 15:45:59.127 [warning] [server stderr] 2025-09-23 15:45:59.128 [warning] [server stderr] at file:///home/gaurav/.npm/_npx/8ddf6bea01b2519d/node_modules/@testsprite/testsprite-mcp/dist/index.js:114860:19 2025-09-23 15:45:59.128 [warning] [server stderr] at ChildProcess.exithandler (node:child_process:430:5) 2025-09-23 15:45:59.128 [warning] [server stderr] at ChildProcess.emit (node:events:517:28) 2025-09-23 15:45:59.128 [warning] [server stderr] at maybeClose (node:internal/child_process:1098:16) 2025-09-23 15:45:59.128 [warning] [server stderr] at Socket.<anonymous> (node:internal/child_process:450:11) 2025-09-23 15:45:59.128 [warning] [server stderr] at Socket.emit (node:events:517:28) 2025-09-23 15:45:59.128 [warning] [server stderr] at Pipe.<anonymous> (node:net:350:12) 2025-09-23 15:45:59.129 [warning] [server stderr] 2025-09-23 15:45:59.129 [warning] [server stderr] Node.js v18.20.8 2025-09-23 15:45:59.133 [info] Connection state: Error Process exited with code 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions