Closed timsearle closed 4 months ago
Hi @timsearle
In https://github.com/cloudentity/oauth2c/pull/86 I switched from https://github.com/pkg/browser to https://github.com/cli/browser
The pkg/browsers seems dead.
From https://github.com/cli/browser/blob/main/.github/workflows/push.yml it looks like the cli/browsers works fine on ubuntu-latest, macos-latest and windows-latest.
Could you give it a try?
Thanks for the fast response.
Looking at the workflow runs of the workflow you shared:
https://github.com/cli/browser/actions/runs/6420384478/job/17432344727
Doesn't actually look like it's executing any tests that would verify OpenURL
works.
I was still getting the same issue as before, despite using the new version you've released, but by adding:
sudo apt-get install -y links
I'm able to get xdg-open
to work on the CI, which is good news. Unclear why it's not working with Firefox when that's the default browser the CI seems to have when querying with xdg-mime query default x-scheme-handler/http
.
However - the callback for the request never makes it back to oauth2c. I'm unclear whether something is going wrong in the browser, or if the HTTP server listening on 9876 is not running.
I've verified the command I'm performing works locally on my machine with no interaction with the browser required and it calls back to oauth2c.
Any thoughts on next steps to try?
@timsearle have you tried setting the BROWSER env var to firefox? sth like BROWSER=/usr/bin/firefox
I'll give that a go soon - I ended up writing my own script for now to perform the auth flows I needed, but I will see if I can figure out why i couldn't get oauth2c working on the Ubuntu runner.
When trying to use oauth2c on a GitHub Actions Ubuntu runner, having installed via:
The command times out due to:
The runner images already come with Chrome and other browsers installed - https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
When using the
macos-latest
runner and installing via Homebrew, oauth2c works correctly. Given the 10x multiplier for macOS Github Action runners it would be ideal for oauth2c to work correctly on an Ubuntu runner. I attempt to install lynx and elinks on the runner, but still had issues with timeouts.