jeffkowalski / geeknote

Console client for Evernote.
GNU General Public License v3.0
393 stars 50 forks source link

can't login #108

Closed kurokirasama closed 5 years ago

kurokirasama commented 6 years ago

Hello,

i succefully installed geeknote in a ubuntu 18.04 machine (work), and now i'm try to do exactly the same in another (home) ubuntu 18.04 machine. The installation gives no error, but when i try to login, it asks for my developer token (just like in work), but when i enter it and then select the service (global) it gives me this output and the login fails:

OAuth token request failed              
If you have an Evernote developer token, enter it here: 
Which service? [1]Evernote Global [2]Yinxiang China:  1
Traceback (most recent call last):
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 1444, in main
    Notes().find(**ARGS)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 1220, in find
    result = self.getEvernote().findNotes(request, count, createFilter)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 546, in getEvernote
    self.connectToEvernote()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 540, in connectToEvernote
    self.evernote = GeekNote()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 100, in __init__
    self.auth()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 225, in auth
    userInfo = self.getUserInfo()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 234, in getUserInfo
    return self.getUserStore().getUser(self.authToken)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/evernote/edam/userstore/UserStore.py", line 1033, in getUser
    return self.recv_getUser()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/evernote/edam/userstore/UserStore.py", line 1056, in recv_getUser
    raise result.userException
EDAMUserException: EDAMUserException(errorCode=2, parameter='authenticationToken')
alanyei commented 6 years ago

@kurokirasama

You can get your token from Developer Token and refer below link to export your token before you login https://github.com/jeffkowalski/geeknote/issues/89#issuecomment-378695383

$ export EVERNOTE_DEV_TOKEN="  *** YOUR TOKEN *** "
$ geeknote login
You have successfully logged in.
kurokirasama commented 5 years ago

Hello,

sorry for the late respond. I tried your suggestion without success:

>> : Connecting to Evernote...Traceback (most recent call last):
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 1416, in main
    User().login(**ARGS)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 40, in wrapper
    return func(*args, **kwargs)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 606, in login
    if self.getEvernote().auth():
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 225, in auth
    userInfo = self.getUserInfo()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 234, in getUserInfo
    return self.getUserStore().getUser(self.authToken)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/evernote/edam/userstore/UserStore.py", line 1033, in getUser
    return self.recv_getUser()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/evernote/edam/userstore/UserStore.py", line 1056, in recv_getUser
    raise result.userException
EDAMUserException: EDAMUserException(errorCode=2, parameter='authenticationToken')
mego22 commented 5 years ago

Howdy folks,

I'm getting the same error. Does this mean the Evernote token is disabled?

alanyei commented 5 years ago

Hello,

sorry for the late respond. I tried your suggestion without success:

>> : Connecting to Evernote...Traceback (most recent call last):
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 1416, in main
    User().login(**ARGS)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 40, in wrapper
    return func(*args, **kwargs)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 606, in login
    if self.getEvernote().auth():
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 225, in auth
    userInfo = self.getUserInfo()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 234, in getUserInfo
    return self.getUserStore().getUser(self.authToken)
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/evernote/edam/userstore/UserStore.py", line 1033, in getUser
    return self.recv_getUser()
  File "/home/kurokirasama/.local/lib/python2.7/site-packages/evernote/edam/userstore/UserStore.py", line 1056, in recv_getUser
    raise result.userException
EDAMUserException: EDAMUserException(errorCode=2, parameter='authenticationToken')

I think you enter the wrong token with "BAD_DATA_FORMAT". I tried to re-login with the wrong token and got similar error like you.

>>  : Connecting to Evernote...Traceback (most recent call last):
  File "/home/alanyeh/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 1416, in main
    User().login(**ARGS)
  File "/home/alanyeh/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 40, in wrapper
    return func(*args, **kwargs)
  File "/home/alanyeh/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 606, in login
    if self.getEvernote().auth():
  File "/home/alanyeh/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 225, in auth
    userInfo = self.getUserInfo()
  File "/home/alanyeh/.local/lib/python2.7/site-packages/geeknote/geeknote.py", line 234, in getUserInfo
    return self.getUserStore().getUser(self.authToken)
  File "/home/alanyeh/.local/lib/python2.7/site-packages/evernote/edam/userstore/UserStore.py", line 1033, in getUser
    return self.recv_getUser()
  File "/home/alanyeh/.local/lib/python2.7/site-packages/evernote/edam/userstore/UserStore.py", line 1056, in recv_getUser
    raise result.userException
EDAMUserException: EDAMUserException(errorCode=9, parameter='authenticationToken')

You can check the error enumerationscode table, And try to revoke your developer token and login again:

Name code
UNKNOWN 1
BAD_DATA_FORMAT 2
PERMISSION_DENIED 3
INTERNAL_ERROR 4
DATA_REQUIRED 5
LIMIT_REACHED 6
QUOTA_REACHED 7
INVALID_AUTH 8
AUTH_EXPIRED 9
DATA_CONFLICT 10
ENML_VALIDATION 11
SHARD_UNAVAILABLE 12
LEN_TOO_SHORT 13
LEN_TOO_LONG 14
TOO_FEW 15
TOO_MANY 16
UNSUPPORTED_OPERATION 17
TAKEN_DOWN 18
RATE_LIMIT_REACHED 19
BUSINESS_SECURITY_LOGIN_REQUIRED 20
DEVICE_LIMIT_REACHED 21
mego22 commented 5 years ago

I reached out to Evernote and they setup my account to generate a new dev token. Once I tried the new token everything worked. Pretty sure this was a pebkac. Thank you for the help.