-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upg login
on fresh linux vm without xdg-open cause error
#14
Comments
This should actually be fixed in upg latest, at least the failure to open the browser shouldn't throw and exit the process. Try You would have to visit the link manually, but you said you can't use |
If you're on the latest |
Yeah, I had to use the local IP assigned from the bridge(I think). Still happening when xdg-open is not in place. ubuntu@newborn-guinea:~$ upg version
__ ______ ____ _ UPG CLI 0.1.14
/ / / / __ \/ __ `/ Public Beta
/ /_/ / /_/ / /_/ /
\__,_/ .___/\__, / 🇺🇸 Built by GPT Labs
/_/ /____/ The first software to land on the moon!
(c) 2022 GPT Labs License
UPG version: 0.1.14.
ubuntu@newborn-guinea:~$ upg login
__ ______ ____ _ UPG CLI 0.1.14
/ / / / __ \/ __ `/ Public Beta
/ /_/ / /_/ / /_/ /
\__,_/ .___/\__, / 🇺🇸 Built by GPT Labs
/_/ /____/ Used by every NASA engineer!
(c) 2022 GPT Labs License
Attempting to open browser. Please visit this link if it does not open automatically.
https://gptlabs.us.auth0.com/authorize?client_id=I3rJAbl7D09DuYG6dGeYWtBtpuGyeZrI&redirect_uri=http%3A%2F%2Flocalhost%3A23462&audience=https%3A%2F%2Fgptlabs.us.auth0.com%2Fapi%2Fv2%2F&code_challenge=DI9eCg8Lbh3-Wez0jcj3Lzfh6ZFhpB312Okpnm3XpVI&code_challenge_method=S256&response_type=code&scope=openid+profile+email
node:events:491
throw er; // Unhandled 'error' event
^
Error: spawn xdg-open ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn xdg-open',
path: 'xdg-open',
spawnargs: [
'https://gptlabs.us.auth0.com/authorize?client_id=I3rJAbl7D09DuYG6dGeYWtBtpuGyeZrI&redirect_uri=http%3A%2F%2Flocalhost%3A23462&audience=https%3A%2F%2Fgptlabs.us.auth0.com%2Fapi%2Fv2%2F&code_challenge=DI9eCg8Lbh3-Wez0jcj3Lzfh6ZFhpB312Okpnm3XpVI&code_challenge_method=S256&response_type=code&scope=openid+profile+email'
]
}
Node.js v18.12.1
ubuntu@newborn-guinea:~$ |
Does this issue still matter with the new |
@marinacabrera Yes, still happen with $ npm -g list
/usr/lib
├── @gptlabs/gsh@0.0.11
├── @gptlabs/upg@0.1.14
├── corepack@0.17.1
└── npm@9.6.2
$ upg authorize
__ ______ ____ _ UPG CLI 0.1.14
/ / / / __ \/ __ `/ Public Beta
/ /_/ / /_/ / /_/ /
\__,_/ .___/\__, / 🇺🇸 Built by GPT Labs
/_/ /____/ Google HATES us for this ONE WEIRD TRICK!
(c) 2022 GPT Labs License
✔ Do you already have an authorization code, or would you like to generate one? › Generate Code
Attempting to open browser. Please visit this link if it does not open automatically.
https://gptlabs.us.auth0.com/authorize?client_id=I3rJAbl7D09DuYG6dGeYWtBtpuGyeZrI&redirect_uri=http%3A%2F%2Flocalhost%3A23462&audience=https%3A%2F%2Fgptlabs.us.auth0.com%2Fapi%2Fv2%2F&code_challenge=Wf5z1Rw1F_VlD_J3h3oEjn9B6tGvWlc4rWaZL6TKc3fAl&code_challenge_method=S256&response_type=code&scope=openid+profile+email
node:events:491
throw er; // Unhandled 'error' event
^
Error: spawn xdg-open ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn xdg-open',
path: 'xdg-open',
Not certain which component in upg is requiring xdg-open; sudo sh -c 'echo "/usr/bin/true" > /usr/bin/xdg-open; chmod +x /usr/bin/xdg-open' |
Trying out gsh and bumping into this inside a fresh vm; While there is no xdg-open installed.
Can be easily fix by install the package but figure might be good to put a note here.
Also, a very niche need, the callback url is using localhost, which qemu VM is not listening to the localhost, might be better UX if using outbound IP of the VM(?)
The text was updated successfully, but these errors were encountered: