WSL2: can't open jira issue in the browser
maksimf opened this issue ยท 8 comments
Describe the bug
Whenever I press Enter while viewing a list of issues I get:
user-open error: dial unix /run/user/1000/bus: connect: no such file or directory
Please provide following details
- JiraCLI Version:
1.4.0
- Are you using Jira cloud or on-premise jira server?
cloud
- What operating system are you using? Also mention version.
WSL2 running Ubuntu-22.04
- What terminal are you using? Also mention version.
Windows Terminal -> zsh + tmux
To Reproduce
Steps to reproduce the behavior:
jira-cli issue list
- Press Enter
- See error
Expected behavior
Browser page opens, showing jira issue web page
Additional context
90% sure this has to do with the fact that I'm using WSL2
Get wslu
from https://github.com/wslutilities/wslu for your WSL2 setup and include export BROWSER=wslview
in your bashrc/zshrc. The wslview tool opens links in your Windows default browser.
Unfortunately, this yields the same result
What happens when you enter wslview https://google.com
in WSL?
It works, i.e. google.com is opened with my default browser
My bad, I've forgot to set env variable. The behaviour has changed: I do not see the error anymore, but nothing happens
The above steps worked for me on Arch Linux. I can reproduce your issue on a new install of Ubuntu 22.04.2 on WSL 2, where wslview works, but hitting enter on an issue causes no error and no action.
I believe the issue is related to the snap running in WSL2, since it works correctly when running the binary directly.
- I cleared the
BROWSER
andJIRA_BROWSER
variables which meansxdg-open
is used first as default (sudo apt install xdg-utils
if it is missing) - Confirm that
xdg-open https://google.com
opens the URL in the default windows browser - Download the relevant .tar.gz from releases, and run the binary
./jira
- On hitting Enter on an issue, the URL opens in the Windows browser
I would try removing the snap and using an alternative installation method, since there seems to be an issue with the Snap on WSL2.
I can confirm this is working. Thank you very much for the assistance