5

I'm running a web scraping project using Selenium with ChromeDriver in headless mode, and I'm constantly seeing the following logs in my terminal:

[20376:708:0708/170807.138:ERROR:google_apis\gcm\engine\registration_request.cc:291] Registration response error message: DEPRECATED_ENDPOINT [20376:708:0708/170937.002:ERROR:google_apis\gcm\engine\registration_request.cc:291] Registration response error message: DEPRECATED_ENDPOINT WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:00:1751975655.975515 12352 voice_transcription.cc:58] Registering VoiceTranscriptionCapability [17524:5748:0708/172416.659:ERROR:google_apis\gcm\engine\registration_request.cc:291] Registration response error message: DEPRECATED_ENDPOINT [17524:5748:0708/172417.593:ERROR:google_apis\gcm\engine\registration_request.cc:291] Registration response error message: PHONE_REGISTRATION_ERROR

Created TensorFlow Lite XNNPACK delegate for CPU. Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors (tensor#-1 is a dynamic-sized tensor).

These logs are not related to my scraping logic, but they spam the output and are extremely annoying.

From what I understand, this seems to be related to Chrome’s deprecated GCM (Google Cloud Messaging) system.

MY SETUP --

# Headless Chrome mode
options.add_argument('--headless=new')  # Use the new headless mode (Chrome 109+)

# System and performance flags
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--disable-gpu')
options.add_argument('--mute-audio')
options.add_argument('--metrics-recording-only')

# Disable unnecessary features
options.add_argument('--disable-extensions')
options.add_argument('--disable-infobars')
options.add_argument('--disable-notifications')
options.add_argument('--disable-cloud-import')
options.add_argument('--disable-sync')
options.add_argument('--disable-client-side-phishing-detection')
options.add_argument('--disable-background-networking')
options.add_argument('--disable-background-timer-throttling')
options.add_argument('--disable-backgrounding-occluded-windows')
options.add_argument('--disable-component-update')
options.add_argument('--disable-default-apps')

# Privacy and identity
options.add_argument('--no-first-run')
options.add_argument('--no-default-browser-check')
options.add_argument('--ignore-certificate-errors')
options.add_argument('--guest')

# Custom User-Agent
options.add_argument(
    'user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
    'AppleWebKit/537.36 (KHTML, like Gecko) '
    'Chrome/98.0.4758.102 Safari/537.36'
)

# Suppress Selenium logs
options.add_experimental_option('excludeSwitches', ['enable-logging'])

# Optional: Use a persistent user profile
if user_data_dir:
    options.add_argument(f'--user-data-dir={user_data_dir}')

Despite using these, the errors still show up?

4
  • There's not enough code here for us to see what you're doing Commented Jul 8 at 12:13
  • Please provide enough code so others can better understand or reproduce the problem. Commented Jul 8 at 12:25
  • can you confirm that you are not setting any profile or user-data-dir options here? Does same happen when leaving out all options? Commented Jul 8 at 16:27
  • This question was closed so I can't provide an answer, but: This log happens in a standard build of Google Chrome (on Linux) with nothing other than Chrome running. It is a bug that Google needs to fix as chrome itself is hitting the deprecated endpoint. Commented Oct 23 at 18:43

1 Answer 1

3

I was also seeing it in my python selenium code.

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR

I0000 00:00:1751976232.317041   18644 voice_transcription.cc:58\] Registering VoiceTranscriptionCapability

\[6160:13064:0708/130352.513:ERROR:google_apis\\gcm\\engine\\registration_request.cc:291\] Registration response error message: PHONE_REGISTRATION_ERROR

\[6160:13064:0708/130352.513:ERROR:google_apis\\gcm\\engine\\registration_request.cc:291\] Registration response error message: PHONE_REGISTRATION_ERROR

\[6160:13064:0708/130352.525:ERROR:google_apis\\gcm\\engine\\mcs_client.cc:700\]   Error code: 401  Error message: Authentication Failed: wrong_secret

\[6160:13064:0708/130352.525:ERROR:google_apis\\gcm\\engine\\mcs_client.cc:702\] Failed to log in to GCM, resetting connection.

I managed to suppress this error and several others by tweaking the chrome options tag like this.

chrome_options = Options()
chrome_options.add_argument("--log-level=3")
driver = webdriver.Chrome(options=chrome_options)
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.