Skip to content
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

Credential propagation was unsuccessful #4343

Open
Cenismo opened this issue Jan 31, 2024 · 15 comments
Open

Credential propagation was unsuccessful #4343

Cenismo opened this issue Jan 31, 2024 · 15 comments

Comments

@Cenismo
Copy link

Cenismo commented Jan 31, 2024

I am experiencing an issue with credential propagation in Google Colab since January 31, 2024. The problem occurs during the execution of a script for Google Drive API authentication. This script worked correctly on January 25, 2024, but started showing errors the next week. When I execute the script, it prompts the "Sign in to Colaboratory Runtimes" window. After I click "Continue" in this window, the script stops executing instead of waiting for further authorizations in subsequent windows, namely "Verify it's you" and "Colaboratory Runtimes wants additional access to your Google Account". This premature termination leads to a "MessageError: Error: credential propagation was unsuccessful". Here is the relevant code snippet:

# Import necessary libraries and APIs

!pip install gspread_formatting
import time
from gspread_formatting import *
from google.colab import auth
import gspread
from google.auth import default

auth.authenticate_user()
creds, _ = default()

gc = gspread.authorize(creds)
from googleapiclient.discovery import build
drive_service = build('drive', 'v3')
import datetime as dt
import pandas as pd
import numpy as np
from datetime import datetime
import gspread_dataframe as gd
import re
import smtplib
import ssl
import gspread
from dateutil.relativedelta import relativedelta

# API GSHEETS, EMAIL

MessageError                              Traceback (most recent call last)
<ipython-input-12-1f07d83f7bd2> in <cell line: 13>()
     11 from google.colab import auth
---> 12 auth.authenticate_user()
     13
     14 import gspread

2 frames
/usr/local/lib/python3.10/dist-packages/google/colab/_message.py in read_reply_from_input(message_id, timeout_sec)
    101     ):
    102       if 'error' in reply:
--> 103         raise MessageError(reply['error'])
    104       return reply.get('data', None)
    105 

MessageError: Error: credential propagation was unsuccessful

The expected behavior is for the script to pause and wait for all permission windows to be authorized, thereby enabling successful authentication for Google Drive API access.

I am using Chrome.

@Cenismo Cenismo added the bug label Jan 31, 2024
@cperry-goog
Copy link

I am unable to reproduce this. Keeping it open in the event we find other reports.

@jasonsschin
Copy link

jasonsschin commented Feb 7, 2024

I am also experiencing this issue.

To reproduce:

  1. Create new Collab notebook
  2. Add code block with the following code
from google.colab import drive
drive.mount('/content/drive')
  1. Run code.
  2. Go through Google Authorisation work flow and permit Collab to access Google Drive.
  3. Result
---------------------------------------------------------------------------
MessageError                              Traceback (most recent call last)
[<ipython-input-3-d5df0069828e>](https://localhost:8080/#) in <cell line: 2>()
      1 from google.colab import drive
----> 2 drive.mount('/content/drive')

3 frames
[/usr/local/lib/python3.10/dist-packages/google/colab/_message.py](https://localhost:8080/#) in read_reply_from_input(message_id, timeout_sec)
    101     ):
    102       if 'error' in reply:
--> 103         raise MessageError(reply['error'])
    104       return reply.get('data', None)
    105 

MessageError: Error: credential propagation was unsuccessful

@alessandriniluca
Copy link

I am experiencing the very same problem right now

@cperry-goog
Copy link

Are you attempting this on a workspace account or are these gmail accounts? Can you file feedback in product when you encounter this and reference this issue so we can investigate?

@whe-gh
Copy link

whe-gh commented Feb 22, 2024

I am also getting the same error, when tried to run this tutorial code snippet.

from google.colab import drive
drive.mount('/gdrive')
cd /gdrive

@jasonsschin
Copy link

Are you attempting this on a workspace account or are these gmail accounts? Can you file feedback in product when you encounter this and reference this issue so we can investigate?

@cperry-goog Both workspace and gmail accounts.

@gadmin7
Copy link

gadmin7 commented Mar 3, 2024

  1. Go through the Google Authorisation workflow and permit Collab to access Google Drive. (The drive is getting Mounted when we permit all 8 services if one only chooses read-write files to drive then it throws : MessageError: Error: credential propagation was unsuccessful)

@Aainan
Copy link

Aainan commented Apr 27, 2024

so, does anyone know how to actually fix this error?

@douglowe
Copy link

douglowe commented May 1, 2024

I had this same problem when I tried to only allow the permissions I thought that might be needed. Once I clicked the enable all option then it worked.

@jselis
Copy link

jselis commented May 4, 2024

@douglowe thanks for your comment. I had the same problem. Indeed this "solves" the problem. But @cperry-goog (I'm assuming you are the google person looking at this) we do have a security issue here: why allow to choose fine-grained options if that doesn't work?

@pritisolanki
Copy link

I have the same problem and @douglowe solution does resolve it. As of now I can't choose fine-grained options.

@saleha-fatima
Copy link

so, does anyone know how to actually fix this error?

I encountered this issue as well, and what I did was accept all the checkboxes that appear for access permissions, and the issue was resolved!

@kiananasiri
Copy link

I accepte all checkbox but still I get that error message , did anyone know how to solve this situation?

@GraphiteSprite
Copy link

@douglowe thanks for your comment. I had the same problem. Indeed this "solves" the problem. But @cperry-goog (I'm assuming you are the google person looking at this) we do have a security issue here: why allow to choose fine-grained options if that doesn't work?

Any update on this?

@AbdoulNasserHamidou
Copy link

AbdoulNasserHamidou commented Dec 20, 2024

Clear the browser's cache and cookies will solve the problem.

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

No branches or pull requests