googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.18k stars 708 forks source link

Failed Authentication while Mounting Drive #1867

Closed eyildiz-ugoe closed 2 years ago

eyildiz-ugoe commented 3 years ago

Enter your authorization code:
4/1AY0e-g5BW3w-kMKf2lmiV1SusE-wbq2E4VmJ_uHWsx_PfaMldzdpP3kNRDA
---------------------------------------------------------------------------
TIMEOUT                                   Traceback (most recent call last)
<ipython-input-1-4996ee3d8d09> in <module>()
      1 from google.colab import drive
----> 2 drive.mount('/content/gdrive')

4 frames
/usr/local/lib/python3.6/dist-packages/pexpect/expect.py in timeout(self, err)
    142             exc = TIMEOUT(msg)
    143             exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
--> 144             raise exc
    145 
    146     def errored(self):

TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7f052cd2fc18>
searcher: searcher_re:
    0: re.compile('google.colab.drive MOUNTED')
    1: re.compile('root@3e4e8d4c9ca5-8792019b004e46b7bec90de0ba833cf7: ')
    2: re.compile('(Go to this URL in a browser: https://.*)$')
    3: re.compile('Drive File Stream encountered a problem and has stopped')
    4: re.compile('drive EXITED')
    5: re.compile('Authorization failed')
    6: re.compile('The domain policy has disabled Drive File Stream')
<pexpect.popen_spawn.PopenSpawn object at 0x7f052cd2fc18>
searcher: searcher_re:
    0: re.compile('google.colab.drive MOUNTED')
    1: re.compile('root@3e4e8d4c9ca5-8792019b004e46b7bec90de0ba833cf7: ')
    2: re.compile('(Go to this URL in a browser: https://.*)$')
    3: re.compile('Drive File Stream encountered a problem and has stopped')
    4: re.compile('drive EXITED')
    5: re.compile('Authorization failed')
    6: re.compile('The domain policy has disabled Drive File Stream')
craigcitro commented 3 years ago

Two questions:

  1. Can you repro this failure?
  2. Did you hit enter after pasting in the code?
eyildiz-ugoe commented 3 years ago
  1. Yes, and it occurs in multiple files not only in one. I noticed the string generated is always the same. Could be a bug?
  2. Yes.
craigcitro commented 3 years ago

We don't control anything about the oauth side of things; that said, there was once a bug where the "copy" button on the oauth2 page wasn't working.

eyildiz-ugoe commented 3 years ago
  1. It's definitely not about the way it is copied, I tried every possible way.
  2. Now I tried it, it generated 4/1AY0e-g6W8avxf-vWk8ufTvCnCNVHF0OXLaZ5S-JEW9sienbP7seUT4dg2Nc, different from what I had above. So the code changes, however, it just doesn't mount my drive.
  3. I suspect a drive fault, rather than colab at this point.
craigcitro commented 3 years ago

Two more questions:

eyildiz-ugoe commented 3 years ago

Two more questions:

  • can you repro in an incognito window?
  • relatedly, do you have multiple profiles in play, and maybe have a mismatch between the colab window and the auth window?

I was able to mount with an incognito. Is this because of cookies?

craigcitro commented 3 years ago

Two more questions:

  • can you repro in an incognito window?
  • relatedly, do you have multiple profiles in play, and maybe have a mismatch between the colab window and the auth window?

I was able to mount with an incognito. Is this because of cookies?

I don't think it's anything to do with cookies; if incognito fixes, it's almost always either (1) a chrome extension causing trouble, or (2) a mixup due to multiple logged in users.

Can you try disabling extensions to see if one or more extensions are causing the problem?

eyildiz-ugoe commented 3 years ago

Two more questions:

  • can you repro in an incognito window?
  • relatedly, do you have multiple profiles in play, and maybe have a mismatch between the colab window and the auth window?

I was able to mount with an incognito. Is this because of cookies?

I don't think it's anything to do with cookies; if incognito fixes, it's almost always either (1) a chrome extension causing trouble, or (2) a mixup due to multiple logged in users.

Can you try disabling extensions to see if one or more extensions are causing the problem?

I am using Microsoft Edge, not chrome. I do have Adblocker and Grammarly, I'll try turning them off and report again.

Akila-Ayanthi commented 3 years ago

Hi, I have the same issue. I tried with different browsers and even in an incognito window. But still I cant mount the drive. The weird thing I observed is that it works with my personal account but not for my university account. Could someone help me please?

abhi1gautam commented 3 years ago

Hi I am having same issue as @Akila-Ayanthi .. This works with my personal Id, but not with my Uni's account.

Any help would be greatly appreciated.

Akila-Ayanthi commented 3 years ago

Hi, @abhi1gautam I got my one solved. I had accidentally unzipped a folder in the root folder and there were like 100K files. Once they were removed it worked as usual. Maybe something of that sort has happened.

abhi1gautam commented 3 years ago

Hi @Akila-Ayanthi Thank you so much.

Apparently I also had done the same- extracted 56k files in my root directory.

by the way- how were you able to delete those files?

Akila-Ayanthi commented 3 years ago

I used rclone

abhi1gautam commented 3 years ago

Cool. Thank you so much! Deletion in Progress. :)