"Athom login" Need to be fixed ;)


#1

Not again !:roll_eyes:!

With the new (athom-cli) version (v2.1.41) you can’t login in anymore. (See below). At the end I get the error message in the browser: Something went wrong!

With the version (v2.1.40) everything works fine…
Terminal:

/app # athom --version

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Hey developer, we’re hiring! View our open β”‚
β”‚ positions at https://go.athom.com/jobs β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
2.1.41

/app # athom login
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Hey developer, we’re hiring! View our open β”‚
β”‚ positions at https://go.athom.com/jobs β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
βœ“ Logging in…
To log in with your Athom Account, please visit https://cli.athom.com?port=35499&clientId=****
Timeout getting authorization code!


#2

On what OS are you running?

Try updating athom CLI:
$ npm install -g athom-cli
$ athom login

It will open your favorite browser to log on.

I had a issue first time yesterday as user on Windows 10:
Solution for me: Try to do that as Administrator at least once (if you are not admin on your work profile)
It worked for me after that also as user yesterday.
Also seen reports of Mac that it worked…


#3

I can’t !! I have the problem with the current Version 2.1.41 !!

About the OS:
Im using an Alpine-Docker Image (I’m working on a "Homey docker development environment" right now. It’s still alpha.)


#4

What OS are you on?
Did it open a browser? and could you log on?
Did your Ahthom-cli start a Webserver on port 35499?
Your link explains Athom should send the authorization token there…

http://127.0.0.1:35499/auth?code=c*********7

As Athom isn’t reading here along all the time please submit an Issue with details (OS, Browser etc.) on Github or using email to support. Or try if Emile is online on Slack in #Developers ! That would be the fastest way by far.


#5

Guess u missed the browser popping up to log in.


#6

So you Putty into a Docker environment?
Guess it can’t start a Browser?
and node.js isn’t running on 127.0.0.1 …


#7

Sorry, !!

Please have a look at my first topic, there I posted the terminal output.

Dev-OS: Docker Alpine/Node Image

OS: macOS Mojave
Borwser: Chrome (v70.0.3538.67)


#8

When you use athom login it starts for the authentication a webserver to handle / receive the Authentication token.
Your login is started in the browser, did that open?
Have you looked in the Inspect window after logging in and authorizing your Homey’s access?

Guess you are best off with asking Ahtom direct (Slack, or email) for support.


#9

If it works with v2.1.40, and it doesn’t with v2.1.41, I would guess it’s an issue with the CLI tool.

The diff contains a commit β€œchanged login” which sounds awfully suspicious.

@cgHome: you can post an issue here.


#10

This is once again a typical example of what happens when a discussion goes in the wrong direction:

I just wanted to ask if anyone else has login problems with the new athom-cli version (v2.1.41), or if I need to look for the bug in my docker configuration. I will look into the issue after the alpha release of my Homey Docker development environment and create an issue on github if necessary.

Sorry and a nice weekend…


#11

I think everything is already mentioned but perhaps I can summarize.

In CLI v2.1.40 the login authentication would forward you to a website (which you need to open yourself), where you need to login and copy-paste the access token (into the terminal window)

In CLI v2.1.41 the login authentication has been changed. When calling Athom login the CLI will open a website (in the default browser) where you need to log in and through a temporary web server the access token is automatically forwarded to the terminal (no copy paste needed anymore)…

This will make it more easy for developers working on a Mac, Windows of Linux system…

@cgHome I guess in your case, the browser window cannot be called for (not available in your docker image), so therefore you are not able to login on 2.1.41.

I would create the issue, because there might be more people that in their setup are running into this issue… and to at least secure that the 2.1.40 access token site will not be removed (soon)…


#12

THX (for the information) Chris


#13

@cgHome

Guess this fixes your Issue:

weejewel [5:47 PM] #developers
FYI I’ve added a fallback for athom-cli users who do not share their browser and CLI on the same machine

image

image


Https://go.athom.com/cli-login goes to www.npmjs.com!?
#14

Hello

Thank you it works, but I noticed that the message " Paste the code: " comes twice ?:grinning:?

βœ“ Logging in...
? Paste the code: To log in with your Athom Account, please visit https://cli.athom.com?port=39869&clientId=xxxxxx
? Paste the code: xxxxxx
βœ“ You are now logged in as xxx xxx

Chris


#15

I am struggling to get CLI working again.

I use a Mac and normally use a terminal to login and side load Apps. After the command β€˜athom login’ I get a message than a NPM update is available. Filling in my e-mail and password returns β€˜Client credentials are invalid’.

This must be the new login procedure. How do I proceed?

Thanks!


#16

Well after a long time i wanted to use the CLI tool, but can’t. Using the latest version and running the CLI in a SSH session on a Linux server (headless).

Please add a possibility to login to homey without the need of a browser. My complete workflow is down the drain right now and i do most things remotely.