Change:
Version: 1.78.0-insider (user setup) Commit: Date: 2023-04-04T09:32:52.453Z Electron: 22.4.3 Chromium: 108.0.5359.215 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0. Sandboxed: Yes run from a Windows command prompt The tunnel starts and prints open VS Code, and open the output Note that the output is stuck at Missing are the message and the info that the tunnel is attached The UI thinks the tunnel is still connecting. Sometimes this also works, but when I try it, most of the time it is stuck
Can you please enable trace logging and share the output?
Nothing extra messages shown when the Desktop tunnel attaches:
This issue has been closed automatically because it needs more information and has not had recent activity. See also our guidelines. Happy Coding!
Still a problem in Version: 1.78.0-insider (user setup) Commit: Date: 2023-04-12T05:19:38.288Z Reproduces every time I try it
This issue has been closed automatically because it needs more information and has not had recent activity. See also our guidelines. Happy Coding!
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
I'm still not seeing info in the log in VS Code that the tunnel is attached after from the command line and seeing the "Open this link in your browser". <img width="945" alt="image" src=""
the tunnel will not start unless you "Turn on Remote Tunnel Access"
<img width="730" alt="image" src=""Looks good to me after enabling tunnels in VS Code
Thanks. Enabling Tunnels in VS Code fixed it.

Discussion:
"An existing tunnel is running on this machine, connecting to it..." ); <del> let stdin_handle = rpc.get_caller(msg_tx.clone()); thread::spawn(move || { let mut input = String::new(); loop { input.truncate(0); match std::io::stdin().read_line(&mut input) { Err(_) | Ok(0) => return, // EOF or not a tty _ => {} }; match input.chars().next().map(|c| c.to_ascii_lowercase()) { Some('x') => { stdin_handle.notify(protocol::singleton::METHOD_SHUTDOWN, EmptyObject {}); return; </del> <ins> if *IS_INTERACTIVE_CLI { let stdin_handle = rpc.get_caller(msg_tx.clone()); thread::spawn(move || { let mut input = String::new(); loop { input.truncate(0); println!("reading line"); match std::io::stdin().read_line(&mut input) { Err(_) | Ok(0) => return, // EOF or not a tty _ => {} }; match input.chars().next().map(|c| c.to_ascii_lowercase()) { Some('x') => { stdin_handle.notify(protocol::singleton::METHOD_SHUTDOWN, EmptyObject {}); return; } Some('r') => { stdin_handle.notify(protocol::singleton::METHOD_RESTART, EmptyObject {}); } Some(_) | None => {} </ins> } <del> Some('r') => { stdin_handle.notify(protocol::singleton::METHOD_RESTART, EmptyObject {}); } Some(_) | None => {} </del> } <del> } }); </del> <ins> }); } </ins> let caller = rpc.get_caller(msg_tx); let mut rpc = rpc.methods(SingletonServerContext {

*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <del> import { ChildProcess, ChildProcessWithoutNullStreams, spawn, SpawnOptions } from 'child_process'; </del> <ins> import { ChildProcess, spawn, SpawnOptions, StdioOptions } from 'child_process'; </ins> import { chmodSync, existsSync, readFileSync, statSync, truncateSync, unlinkSync } from 'fs'; import { homedir, release, tmpdir } from 'os'; import type { ProfilingSession, Target } from 'v8-inspect-profiler';

} const tunnelArgs = argv.slice(argv.indexOf('tunnel') + 1); // all arguments behind `tunnel` return new Promise((resolve, reject) => { <del> let tunnelProcess: ChildProcessWithoutNullStreams; </del> <ins> let tunnelProcess: ChildProcess; const stdio: StdioOptions = ['ignore', 'pipe', 'pipe']; </ins> if (process.env['VSCODE_DEV']) { <del> tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...tunnelArgs], { cwd: join(getAppRoot(), 'cli') }); </del> <ins> tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...tunnelArgs], { cwd: join(getAppRoot(), 'cli'), stdio }); </ins> } else { const appPath = process.platform === 'darwin' // ./Contents/MacOS/Electron => ./Contents/Resources/app/bin/code-tunnel-insiders ? join(dirname(dirname(process.execPath)), 'Resources', 'app') : dirname(process.execPath); const tunnelCommand = join(appPath, 'bin', `${product.tunnelApplicationName}${isWindows ? '.exe' : ''}`); <del> tunnelProcess = spawn(tunnelCommand, ['tunnel', ...tunnelArgs], { cwd: cwd() }); </del> <ins> tunnelProcess = spawn(tunnelCommand, ['tunnel', ...tunnelArgs], { cwd: cwd(), stdio }); </ins> } <del> tunnelProcess.stdout.pipe(process.stdout); tunnelProcess.stderr.pipe(process.stderr); </del> <ins> tunnelProcess.stdout!.pipe(process.stdout); tunnelProcess.stderr!.pipe(process.stderr); </ins> tunnelProcess.on('exit', resolve); tunnelProcess.on('error', reject); });

import { Disposable } from 'vs/base/common/lifecycle'; import { ILogger, ILoggerService, LogLevelToString } from 'vs/platform/log/common/log'; import { dirname, join } from 'vs/base/common/path'; <del> import { ChildProcess, spawn } from 'child_process'; </del> <ins> import { ChildProcess, StdioOptions, spawn } from 'child_process'; </ins> import { IProductService } from 'vs/platform/product/common/productService'; import { isMacintosh, isWindows } from 'vs/base/common/platform'; import { CancelablePromise, createCancelablePromise, Delayer } from 'vs/base/common/async';

resolve(-1); } let tunnelProcess: ChildProcess | undefined; <ins> const stdio: StdioOptions = ['ignore', 'pipe', 'pipe']; </ins> token.onCancellationRequested(() => { if (tunnelProcess) { this._logger.info(`${logLabel} terminating(${tunnelProcess.pid})`);

if (!this.environmentService.isBuilt) { onOutput('Building tunnel CLI from sources and run', false); onOutput(`${logLabel} Spawning: cargo run -- tunnel ${commandArgs.join(' ')}`, false); <del> tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...commandArgs], { cwd: join(this.environmentService.appRoot, 'cli') }); </del> <ins> tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...commandArgs], { cwd: join(this.environmentService.appRoot, 'cli'), stdio }); </ins> } else { onOutput('Running tunnel CLI', false); const tunnelCommand = this.getTunnelCommandLocation(); onOutput(`${logLabel} Spawning: ${tunnelCommand} tunnel ${commandArgs.join(' ')}`, false); <del> tunnelProcess = spawn(tunnelCommand, ['tunnel', ...commandArgs], { cwd: homedir() }); </del> <ins> tunnelProcess = spawn(tunnelCommand, ['tunnel', ...commandArgs], { cwd: homedir(), stdio }); </ins> } tunnelProcess.stdout!.on('data', data => {