0

I have a python script that logs into airbnb using selenium (chrome). It used to work perfectly fine but since Chrome updated, sometimes the driver just does not respond at all. The detailed situation is: the script can successfully log in but after clicking a few buttons it just stopped responding. The browser says:

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

and as a result the site either does not respond or takes a very long time to respond.

Specifically, in the code I first log in to the account (which works perfectly) and then jumps to the hosting page (works), but after that the page just stops responding.

login(driver)
driver.get(SOME_URL)

bnt = driver.find_element(By.XPATH, XPATH_btn)
bnt.click() # here the page stops responding

Anyone has ever encountered such weird situation?

I tried to set the user-agent thru chrome_options but did not work.

webdriver config:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--blink-settings=imagesEnabled=false') 
yeelim
  • 1
  • 1

1 Answers1

0

This console log...

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

...is related to the proposed update on User-Agent String Reduction in .


Console Message

User-Agent String Reduction in Chrome

The console message conveys that the Chromium team had planned to gradually reduce the granularity of available information in the User-Agent header field, as well as the navigator.userAgent, navigator.appVersion, and navigator.platform JS APIs.


Proposed Rollout Plan

Phase 1: Since Chrome 92 (July 20, 2021)

Call to Action (CTA): Audit your site usage to understand where migration may be necessary.

Warn about accessing navigator.userAgent, navigator.appVersion, and navigator.platform in DevTools, beginning in M92.

Phase 2: Chrome 95 to Chrome 100

CTA: Enroll in the origin trial for your site, and provide feedback until Chrome 101 is released.

Launch an origin trial for sites to opt into the final reduced UA string for testing and feedback, for at least 6 months.

We will evaluate feedback from origin trial partners and the community, and based on this feedback proceed to Phases 3 through 7 of our plan, giving the ecosystem adequate time to adapt in between them. Otherwise, depending on feedback we will reconsider the best course of action.

Reduction Rollout Phase 3: Chrome 100

CTA: Enroll in the deprecation trial or Enterprise policy for your site, when needed.

Launch deprecation trial and Enterprise policy, for instances where a site may need more time for migration.

Phase 4: Chrome 101

CTA: Ensure your site is compatible with the reduced Chrome version number, and migrate to UA Client Hints if not.

Ship reduced Chrome MINOR.BUILD.PATCH version numbers (“0.0.0”). Once rolled-out, the reduced UA string would apply to all page loads on desktop and mobile operating systems for sites that do not opt into the deprecation trial.

Phase 5: Chrome 107

CTA: Ensure your site is compatible with the reduced Desktop UA string and related JS APIs, and migrate to UA Client Hints if not.

Begin roll-out of reduced Desktop UA string and related JS APIs (navigator.userAgent, navigator.appVersion, navigator.platform). Once rolled-out, the reduced UA string would apply to all page loads on desktop operating systems for sites that do not opt into the deprecation trial.

Phase 6: Chrome 110

CTA: Ensure your site is compatible with the reduced Mobile UA string and related JS APIs, and migrate to UA Client Hints if not.

Begin roll-out of reduced Android Mobile (and Tablet) UA string and related JS APIs. Once rolled-out, the reduced UA string would apply to all page loads on Android that do not opt into the deprecation trial.

Reduction Completion Phase 7: Chrome 113

Deprecation trial ends and all page loads receive the reduced UA string and related JS APIs.

See the companion Reduced User Agent string updates page for more details and example User Agent strings at each of these phases. We will note any significant delays or changes on this page as well.


Conclusion

This console message doesn't indicates any error and unrelated to Selenium. The reason behind page stops responding needs further research about your usecase and framework settings/configurations.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Uright, I don't think it's selenium's prob. I did found a way to solve it tho but still unstable. The problem was after clicking buttons which redirect to some other urls or triggers some js functions, it stops responding. However, once we clicked the button that jumps to another url and tried to refresh the page, it might work after a few mins. So weird idk why.... – yeelim Jun 14 '23 at 03:04
  • @yeelim Let's discuss the issue in [Selenium](https://chat.stackoverflow.com/rooms/223360/selenium) room. – undetected Selenium Jun 14 '23 at 21:59