A recent upgrade to some software (perhaps Edge) meant that my python Selenium code stopped working. When I looked at the error message, the first one I saw was the CBCM one from above:
[31104:44608:0418/104503.739:ERROR:chrome_browser_cloud_management_controller.cc(162)] Cloud management controller initialization aborted as CBCM is not enabled.
DevTools listening on ws://127.0.0.1:9222/devtools/browser/53a05bfa-3381-4f3c-9de2-d10cf03d943e
[31104:44608:0418/104504.194:ERROR:devtools_http_handler.cc(767)] Rejected an incoming WebSocket connection from the http://localhost:9222 origin. Use the command line flag --remote-allow-origins=http://localhost:9222 to allow connections from this origin or --remote-allow-origins=* to allow all origins.
[31104:44608:0418/104504.215:ERROR:devtools_http_handler.cc(767)] Rejected an incoming WebSocket connection from the http://localhost:9222 origin. Use the command line flag --remote-allow-origins=http://localhost:9222 to allow connections from this origin or --remote-allow-origins=* to allow all origins.
Traceback (most recent call last):
I started searching for this CBCM error and found this page.
But after some investigation, it turns out that this CBCM error was not preventing my system from working - it was one of the subsequent errors that was the real problem. The solution in this case was to add a new argument to my startup options:
edge_options = Options()
edge_options.add_argument("--remote-allow-origins=*")
driver = webdriver.Edge(options=edge_options)