Skip to content

Uncaught TypeError when using upsun tunnel:open #72

@driftingly

Description

@driftingly

I can use upsun ssh without issues but get a fatal error when trying to tunnel.

upsun --version
Upsun CLI 5.10.3
php -v
PHP 8.4.20 (cli) (built: Apr 25 2026 10:44:51) (NTS clang 15.0.0)
Copyright (c) The PHP Group
Built by Laravel Herd
Zend Engine v4.4.20, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.20, Copyright (c), by Zend Technologies
upsun tunnel:open
Enter a number to choose a project:
  [0] Project Name (xxxxxxxxxxxx)
 > 0

Enter a number to choose an environment:
Default: production
  [0] production
  [1] staging
 > 0

Fatal error: Uncaught TypeError: Platformsh\Cli\Tunnel\Tunnel::__construct(): Argument #4 ($remotePort) must be of type int, string given, called in phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/src/Service/TunnelManager.php on line 54 and defined in phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/src/Tunnel/Tunnel.php:12
Stack trace:
#0 phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/src/Service/TunnelManager.php(54): Platformsh\Cli\Tunnel\Tunnel->__construct('wo5kjjwqxurhi--...', 30000, '192.168.0.5', '5432', Array)
#1 phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/src/Command/Tunnel/TunnelOpenCommand.php(129): Platformsh\Cli\Service\TunnelManager->create(Object(Platformsh\Cli\Selector\Selection), Array)
#2 phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/vendor/symfony/console/Command/Command.php(341): Platformsh\Cli\Command\Tunnel\TunnelOpenCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/vendor/symfony/console/Application.php(1117): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/src/Application.php(397): Symfony\Component\Console\Application->doRunCommand(Object(Platformsh\Cli\Command\Tunnel\TunnelOpenCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/vendor/symfony/console/Application.php(356): Platformsh\Cli\Application->doRunCommand(Object(Platformsh\Cli\Command\Tunnel\TunnelOpenCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/bin/platform(32): Symfony\Component\Console\Application->run()
#8 /Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar(4): require('phar:///Users/a...')
#9 {main}
  thrown in phar:///Users/anthony/Library/Caches/upsun-tmp/legacy-5.10.3/upsun.phar/src/Tunnel/Tunnel.php on line 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions