microsoft / microsoft/work-iq

workiq in GitHub Codespaces not respecting BROWSER environment variable

Open
#43 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

env:linux
Dominant language
PowerShell
Stars
1k
Forks
132
Avg merge
5d 19h
Merged PRs (30d)
6

Description

We use GitHub Codespaces for developer environments.

I wanted to try using workiq in the CLI inside of the codespace and ended up getting an error.

> npx -y @microsoft/workiq accept-eula
EULA has been accepted
> npx -y @microsoft/workiq ask -q 'What meetings do I have for today?' 
Unexpected error during token acquisition: Unable to open a web page using xdg-open, gnome-open, kfmclient or wslview tools. See inner exception for details. Possible causes for this error are: tools are not installed or they cannot open a URL. Make sure you can open a web page by invoking from a terminal: xdg-open https://www.bing.com 
Error: Unexpected error: Unable to open a web page using xdg-open, gnome-open, kfmclient or wslview tools. See inner exception for details. Possible causes for this error are: tools are not installed or they cannot open a URL. Make sure you can open a web page by invoking from a terminal: xdg-open https://www.bing.com 
> echo $BROWSER
/vscode/bin/linux-x64/591199df409fbf59b4b52d5ad4ee0470152a9b31/bin/helpers/browser.sh

Most tools respect the BROWSER environment variable to launch auth flows (or just webpages in general) for remote/containerized environments.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CLI token-acquisition path exercised by the workiq ask command and inspect how browser launching behaves in GitHub Codespaces. Reproduce the failure with the shown $BROWSER value, then verify that the authentication flow uses the configured browser command rather than only xdg-open and related tools.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.