gled-rs / mastodon-autofollow

Autofollow bot for mastodon
29 stars 9 forks source link

Invalid user name, password or scopes: 'access_token' #11

Closed kimar closed 7 years ago

kimar commented 7 years ago

I'm seeing this issue with a Mastodon instance running the latest master (b1881).

Traceback (most recent call last):
  File "/home/mastodon/mastodon-autofollow/.venv/local/lib/python2.7/site-packages/mastodon/Mastodon.py", line 146, in log_in
    self.access_token = response['access_token']
KeyError: 'access_token'
Traceback (most recent call last):
  File "Autofollow.py", line 30, in <module>
    to_file = '.pytooter_usercred.txt'
  File "/home/mastodon/mastodon-autofollow/.venv/local/lib/python2.7/site-packages/mastodon/Mastodon.py", line 150, in log_in
    raise MastodonIllegalArgumentError('Invalid user name, password or scopes: %s' % e)
mastodon.Mastodon.MastodonIllegalArgumentError: Invalid user name, password or scopes: 'access_token'
Fastidious commented 7 years ago

I am encountering this too. @gled-rs, could you describe what is expected on:

What is the username ?
What is the password ?
What is your instance ?
What is your botname ?

Is it (for example):

username@email.com
password1
https://mastodon.com
name

Also, do the Autofollow.py needs to be edited in any way? Thanks!

gled-rs commented 7 years ago

The error is a wrong authentication, you need to answer the questions with the credentials for the bot account. Closing the comment as its not an issue in the code :)

PS: We should rather start extending the mastodon project to overcome the shortcoming of small instances and bootstrap or consider join an instance that already has a followbot rather than putting one more out there right now. cf my comment on #9

Fastidious commented 7 years ago

@gled-rs I entered the right credentials though. Still the same error. Is there a “taboo” character on password (one that should not be used)? Are the expected answers like the ones I wrote above? Thanks!

kimar commented 7 years ago

Same here, definitely used the correct credentials. also there was a redirect issue on Mastodon with v1.1 which was resolved so I'm running my instance against master again.

xvilo commented 7 years ago

Still having this issue, also when updating from master.

Edit: It seems my credentials are fine, but something else is wrong. When I type the wrong credentials in the field I get HTML output of wrong user/pass...

Fastidious commented 7 years ago

@xvilo I told you that "@gled-rs is discouraging people from using this bot, as an active conversation is happening somewhere to try to solve the federation problems for single user instances.”

That means, do not use it. If you can make it work, 👍🏻, if you can’t, @gled-rs isn’t providing support for it. You are on your own.

gled-rs commented 7 years ago

Thanks @Fastidious for explaining and understanding :) Stay tuned guys, working on something better ( if I get the feedback I asked for 2 days ago :/ )