dblock / strava-ruby-cli

Strava command-line client.
MIT License
5 stars 1 forks source link

First-time usage, CLI hanging during authentication (Linux) #1

Closed mattdsteele closed 4 years ago

mattdsteele commented 4 years ago

👋 Hi!

I'm excited to give this a shot, but I'm having trouble getting authentication to work.

I've created an API id and secret in Strava; installed Ruby 2.5.5 and the CLI through rubygems, but any attempt at authentication hangs after entering my credentials:

Here's where it hangs:

matt@penguin:~$ strava run athlete
[2020-05-31 13:00:42] INFO  WEBrick 1.4.2
[2020-05-31 13:00:42] INFO  ruby 2.5.5 (2019-03-15) [aarch64-linux-gnu]
Enter Strava client ID: *****
Enter Strava client secret: ****************************************
[2020-05-31 13:00:52] INFO  WEBrick::HTTPServer#start: pid=12884 port=4242

Hitting ctrl+c results in an ^Cerror: Authorization Error message.

I've tried this on a few Linux workstations (WSL2 Linux container running Debian 10, a "native" Ubuntu 20.04, and a Chromebook crostini container on Debian 10); all with the same result.

Have you seen this error before, maybe I'm missing something in the setup process?

mattdsteele commented 4 years ago

For what it's worth, I can authenticate and pull info successfully with strava-ruby-client directly. Thanks again for putting these together :)

dblock commented 4 years ago

I think this just wasn't properly implemented on linux, the code calls open, but that only works on OSX. There's an SO that recommends launchy to make it work.

Want to try fixing this?