8000 PyAmazonCloudDriveError: Not logined · Issue #24 · handyman5/acd_fuse · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PyAmazonCloudDriveError: Not logined #24

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

Open
dv-anomaly opened this issue Jun 18, 2015 · 35 comments
Open

PyAmazonCloudDriveError: Not logined #24

dv-anomaly opened this issue Jun 18, 2015 · 35 comments

Comments

@dv-anomaly
Copy link

This was working just fine yesterday, now all of a sudden I cannot login / mount successfully. Tried on both my Arch and Ubuntu boxes. I removed my email, but I did check that it was correct. My password is also correct. Whats odd, is it seems to login just fine: Login successful; starting filesystem

Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Cached session failed; trying auth login
Login successful; starting filesystem
Traceback (most recent call last):
  File "./acd", line 471, in <module>
    fs.main()
  File "./acd", line 90, in main
    self.download = self.api.can_device_download()
  File "/home/dh4/acd_fuse/pyacd/pyacd/api.py", line 134, in can_device_download
    raise pyacd.PyAmazonCloudDriveError("Not logined %s"%session)
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Not logined <Session: username: [MY EMAIL], customer_id: None, agreed_with_terms: True>
@dv-anomaly
Copy link
Author

Now I'm getting a plain login failed. When attempting to login on the amazon website, I am prompted with a captcha. Maybe this is whats causing the issue? Is the pyacd library not using the official API?
https://developer.amazon.com/public/apis/experience/cloud-drive/

Cached session failed; trying auth login
Traceback (most recent call last):
  File "./acd", line 470, in <module>
    fs.main()
  File "./acd", line 85, in main
    self.session = pyacd.login(self.email, self.password)
  File "/home/dh4/dev/acd_fuse/pyacd/pyacd/auth.py", line 73, in login
    raise pyacd.PyAmazonCloudDriveError("Login failed.")
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Login failed.

@hazcod
Copy link
hazcod commented Jun 22, 2015

Same. I'm getting the same output after clearing cache. EOFError when trying with cache.

Traceback (most recent call last):
  File "acd", line 470, in <module>
    fs.main()
  File "acd", line 85, in main
    self.session = pyacd.login(self.email, self.password)
  File "/home/xxx/Downloads/acd_fuse-master/pyacd/auth.py", line 73, in login
    raise pyacd.PyAmazonCloudDriveError("Login failed.")
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Login failed.

  File "./acd", line 470, in <module>
    fs.main()
  File "./acd", line 73, in main
    session.__dict__ = pickle.load(sessfile)
  File "/usr/lib/python2.7/pickle.py", line 1378, in load
    return Unpickler(file).load()
  File "/usr/lib/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/lib/python2.7/pickle.py", line 880, in load_eof
    raise EOFError
EOFError

@cpare
Copy link
cpare commented Jun 30, 2015

Did this self-resolve, or is this an ongoing issue?

@hazcod
Copy link
hazcod commented Jun 30, 2015

Ongoing issue while the dev is not around :)

@mfoti
Copy link
mfoti commented Jul 24, 2015

same error for me..

Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Cached session failed; trying auth login
Traceback (most recent call last):
  File "./acd", line 470, in <module>
    fs.main()
  File "./acd", line 85, in main
    self.session = pyacd.login(self.email, self.password)
  File "/home/skler/acd_fuse/pyacd/pyacd/auth.py", line 73, in login
    raise pyacd.PyAmazonCloudDriveError("Login failed.")
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Login failed.

@mfoti
Copy link
mfoti commented Jul 24, 2015

I fixed creating a new account on one of the supported regions:

https://github.com/handyman5/pyamazonclouddrive-clone/blob/master/pyacd/__init__.py#L131

  ubidlist = {
    "www.amazon.com": "ubid-main",
    "www.amazon.co.jp": "ubid-acbjp",
    "www.amazon.de": "ubid-acbde"
  }

@merald
Copy link
merald commented Aug 30, 2015

I am registred on amazon.com, but still have above issue. See traceback:

Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Cached session failed; trying auth login
Login successful; starting filesystem
Traceback (most recent call last):
File "acd", line 470, in
fs.main()
File "acd", line 90, in main
self.download = self.api.can_device_download()
File "/home/bananapi/acd_fuse/pyacd/pyacd/api.py", line 134, in can_device_download
raise pyacd.PyAmazonCloudDriveError("Not logined %s"%session)
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Not logined <Session: username: xxxxxx@xxxxxxx.xx, customer_id: None, agreed_with_terms: True>

@dgsharpe
Copy link
dgsharpe commented Sep 1, 2015

I get this same error both on servers both in Germany and the US. My primary account is associated with the US. I tried adding the line of code @skler mentions to support amazon.de, but that didn't fix anything. Happy to provide any additional information that might be useful.

@adojaan
Copy link
adojaan commented Sep 1, 2015

The same here
Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Cached session failed; trying auth login
Login successful; starting filesystem
Traceback (most recent call last):
File "/usr/bin/acd", line 470, in
fs.main()
File "/usr/bin/acd", line 90, in main
self.download = self.api.can_device_download()
File "/home/kristjan/bin/acd_fuse/pyacd/pyacd/api.py", line 134, in can_device_download
raise pyacd.PyAmazonCloudDriveError("Not logined %s"%session)
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Not logined <Session: username: ******@gmail.com, customer_id: None, agreed_with_terms: True>

@fling-
Copy link
fling- commented Sep 8, 2015
< 8000 td class="d-block comment-body markdown-body js-comment-body">

Same here, might be dupe to #12

Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Cached session failed; trying auth login
Traceback (most recent call last):
File "./acd", line 470, in
fs.main()
File "./acd", line 85, in main
self.session = pyacd.login(self.email, self.password)
File "/usr/local/src/acd_fuse/pyacd/pyacd/auth.py", line 73, in login
raise pyacd.PyAmazonCloudDriveError("Login failed.")
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Login failed.

@fling-
Copy link
fling- commented Sep 8, 2015

Should we report to pyacd?

@dv-anomaly
Copy link
Author

I thought I had already posted the comment. But the issue with the PyAmazonCloudDriveError("Not logined %s"%session) error seemed to have been related to Amazon serving up a captcha because of failed login's / too many locations attempting to access my account. I decided to stop playing with acd_fuse for a while in the mean time, and I currently do not have any of my servers setup to test, however I have a feeling it will work now that i'm not prompted by captchas when I login directly to Amazon.

Note that these failed logins where do to me having special characters in my password, to which I think i ether encapsulated my password in single quotes or just changed my password, I cannot remember as I use lastpass for password management.

Those of you receiving the PyAmazonCloudDriveError("Login failed.") probably have special characters in your password, or using an unsupported region. Try either of the steps I mentioned above.

I'll try to get around to testing this again in the next day or two, and report back.

@dv-anomaly
Copy link
Author

I did notice the captchas are very basic and could be defeated with simple ocr software. I was able to use Tesseract, and it did return the correct captcha code with the samples I pulled from Amazon's login page. So if this becomes an issue, we can use it, or a python library to bypass it fairly easily.

@dgsharpe
Copy link
dgsharpe commented Sep 8, 2015

@wayne-hartmann I do not believe that it is due to "too many locations". This error occurred to me the very first time I logged into my ACD account after setting it up initially. I also verified that my password has no special characters and encountered the same issue.

@dv-anomaly
Copy link
Author

@davidgsharpe7 are you receiving the session error, or login failed error?

@dv-anomaly
Copy link
Author

@davidgsharpe7 Also, can you confirm either way if you are prompted to enter a captcha when you login to ACD directly on Amazon?

@shushry
Copy link
shushry commented Sep 8, 2015

To add a "me too" - I just set this package up, and I don't get a captcha when logging into cloud drive from a variety of locations (source IP's). But I am receiving the same error message described here.

@dv-anomaly
Copy link
Author

Well taking a quick look at the code and the error message, the error does seem to be coming from pyacd, and not acd_fuse. Nothing stands out to me that there is a problem with the acd_fuse code. I'll take a quick look at the login function from pyacd and see if anything stands out.

@dv-anomaly
Copy link
Author

You know what, try adding the following line to pyacd/connection.py after the other add_header line (line 71), and let me know if that fixes the login problem. I bet Amazon is doing a user agent check for urllib.

Make sure you use the correct tabs / spaces when editing the file (this is python)... ;-)

req.add_header("User-Agent","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1")

@dv-anomaly
Copy link
Author

Unless of course i missed a user agent string being added elsewhere in the program...

@shushry
Copy link
shushry commented Sep 8, 2015

Just added that suggestion (fixing the : with "," of course in the function) -- same result unfortunately

@shushry
Copy link
shushry commented Sep 8, 2015

My specific output:

Login successful; starting filesystem
Traceback (most recent call last):
File "./acd", line 470, in
fs.main()
File "./acd", line 90, in main
self.download = self.api.can_device_download()
File "acd_fuse/pyacd/pyacd/api.py", line 134, in can_device_download
raise pyacd.PyAmazonCloudDriveError("Not logined %s"%session)
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Not logined <Session: username: ********, customer_id: None, agreed_with_terms: True>

@dv-anomaly
Copy link
Author

@shushry yeah, just noticed the mistake myself, and updated it... I don't have any more time to spend on this atm, but unless someone else comes up with a solution. I'll take another look later in the week.

@dgsharpe
Copy link
dgsharpe commented Sep 8, 2015

@wayne-hartmann I am getting the error message that started this thread (not logined), and I do not get prompted for a captcha when logging in with a web browser to ACD. Adding the line you mentioned for the user-agent didn't fix my problem.

@RobertBerger
Copy link

It used to work, but stopped a couple of days ago - from the web interface it works, no captcha being asked:

./mount.sh 
++ rm -f /tmp/acd_fuse/sessionfile
++ ./acd /home/xxx/CloudDrive/ -o email=xxx@xxx -o password=xxx
Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Cached session failed; trying auth login
Login successful; starting filesystem
Traceback (most recent call last):
  File "./acd", line 470, in <module>
    fs.main()
  File "./acd", line 90, in main
    self.download = self.api.can_device_download()
  File "/home/xxx/projects/various/amazon/acd_fuse/pyacd/pyacd/api.py", line 134, in can_device_download
    raise pyacd.PyAmazonCloudDriveError("Not logined %s"%session)
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Not logined <Session: username: xxx@xxx, customer_id: None, agreed_with_terms: True>
++ set +x

If you have some patch to try please let me know.

@mburgess00
Copy link

I am also getting the "not logined" error:

Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Cached session failed; trying auth login
Login successful; starting filesystem
Traceback (most recent call last):
File "./acd", line 470, in
fs.main()
File "./acd", line 90, in main
self.download = self.api.can_device_download()
File "/home/mburgess/acd_fuse/pyacd/api.py", line 134, in can_device_download
raise pyacd.PyAmazonCloudDriveError("Not logined %s"%session)
pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Not logined <Session: username: <user_redacted>@<domain_redacted>, customer_id: None, agreed_with_terms: True>

@anton-veretenenko
Copy link

I've made a patch for pyacd and it resolves error from the first post. You can try to replace pyacd taking it from my repository fork: https://github.com/anton-veretenenko/pyamazonclouddrive-clone
Or just replace auth.py

@RobertBerger
Copy link

@anton-veretenenko: I can confirm that it works now. I just replaced the pyacd with your pyamazonclouddrive-clone and that's it.

mv pyacd/ pyacd.ori
git clone https://github.com/anton-veretenenko/pyamazonclouddrive-clone.git pyacd

@marceloudi
Copy link

@anton-veretenenko: Auth confirmed. It works.

@pmknutsen
Copy link

I can also confirm the patch by @anton-veretenenko fixed this issued.

@Saren-Arterius
Copy link

Using the patch by @anton-veretenenko, still showing pyacd.exception.PyAmazonCloudDriveError: PyAmazonCloudDriveError: Not logined <Session: username: my@email.com, customer_id: None, agreed_with_terms: True>. Any ideas?

@Jbonnett
Copy link

i am also still seeing this error, with and without the patch. Pw is right, can loginto the main site.

@anton-veretenenko
Copy link

I've made another update. Should work again. Take a look anton-veretenenko/pyamazonclouddrive-clone@b4ad889
How to install an update: either replace pyacd taking it from my repository fork: https://github.com/anton-veretenenko/pyamazonclouddrive-clone or just replace auth.py

@Jbonnett
Copy link

The patch is not working for me, but I figured out why. Everybody needs to make sure they don't have 2 factor on....
screenshot from 2016-03-16 14-22-35

@Jbonnett
Copy link

(i got that with pdb, and dumped it to a file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0