Skip to content

Credential propagation was unsuccessful #4343

Description

@Cenismo

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions