How chrome browser(v87) to disable cors check - google-chrome

i have tried below methods:
methods 1
google-chrome --disable-web-security --user-data-dir="/temp/chrome_dev"
result
can not solve this problem.
methods 2
add --disable-site-isolation-trials arguement
google-chrome --disable-web-security --user-data-dir="/temp/chrome_dev"
result
chrome will infinite reqeust for same page.
my platform
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
chrome version info
Google Chrome 87.0.4280.88 (Official Build) (64-bit)
Revision 89e2380a3e36c3464b5dd1302349b1382549290d-refs/branch-heads/4280#{#1761}
OS Linux
JavaScript V8 8.7.220.29
Flash 32.0.0.465 /home/sheng/.config/google-chrome/PepperFlash/32.0.0.465/libpepflashplayer.so
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Command Line /usr/bin/google-chrome-stable --flag-switches-begin --flag-switches-end
Executable Path /opt/google/chrome/google-chrome

Related

Passthrough is not supported, GL is disabled while running protractor automation scripts

I'm a newbie here .
My protractor automation scripts are failing Passthrough is not supported, GL is disabled
Below is the error
"DevTools listening on ws://127.0.0.1:60154/devtools/browser/784192ee-bb6e-40c7-8722-a752e25d1636
Started
[15180:23164:0525/154437.543:ERROR:device_event_log_impl.cc(214)] [15:44:37.543] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[15180:23164:0525/154437.546:ERROR:device_event_log_impl.cc(214)] [15:44:37.547] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[15180:23164:0525/154437.547:ERROR:device_event_log_impl.cc(214)] [15:44:37.548] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[12120:18212:0525/154512.227:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is disabled
This is my Graphic feature status
Canvas: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Out-of-process Rasterization: Hardware accelerated
OpenGL: Enabled
Rasterization: Hardware accelerated
Skia Renderer: Enabled
Video Decode: Hardware accelerated
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
I tried to find solution from many days but no luck . Can anyone please help me explain me in detail how to fix this issue
This is my details of chrome
Google Chrome 90.0.4430.212 (Official Build) (64-bit) (cohort: Stable)
Revision e3cd97fc771b893b7fd1879196d1215b622c2bed-refs/branch-heads/4430#{#1429}
OS Windows 10 OS Version 1903 (Build 18362.1256)
JavaScript V8 9.0.257.29
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Command Line "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --flag-switches-begin --enable-webgl-draft-extensions --ignore-gpu-blocklist --flag-switches-end --origin-trial-disabled-features=SecurePaymentConfirmation
Any help is highly appreciated

Testing with watir chromedriver failed with Sec-Fetch-User in Request Headers

I am using watir for testing an internal application. The testing recently stops working.
These are the simplified steps of the test:
require 'watir'
Selenium::WebDriver::Chrome.path = 'PATH_TO_CHROME_EXE'
browser = Watir::Browser.new :chrome, :options => {:options => {'useAutomationExtension' => false}}
URL = "TEST_URL"
browser.goto URL
After the goto line executed, the browser failed to navigate to the page. When inspecting the network activity, The request status showing as canceled. I also noticed the "Sec-Fetch-User" field populate in the header:
Sec-Fetch-Mode: navigate
**Sec-Fetch-User: ?1**
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
If I directly enter the test URL into the browser, the field is not populated and the login pop-up.
This is my setting:
jruby 9.2.5.0 (2.5.0) 2018-12-06 6d5a228 Java HotSpot(TM) 64-Bit Server VM 25.102-b14 on 1.8.0_102-b14 +jit [mswin32-x86_64]
Version 77.0.3865.90 (Official Build) (64-bit)
Watir 6.16.5
ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865#{#442})
Did anyone run into similar issue? Would it be possible to suppress the header?
Steve
I run into exactly the same problem of Sec-Fetch-User: ?1.
The only way I could get to load the webpage I wanted was to ditch the chromedriver and use the firefox driver instead. Firefox did not send those headers.
I think that, if you really need to use chromedriver, and if you need to change the headers is to use a proxy like https://github.com/lightbody/browsermob-proxy

How do I force Chrome DevTools Audits to use desktop (fullscreen) emulation?

I want to run a performance audit of my website for: desktop, without throttling network, without throttling CPU.
I'm using Google Chrome's DevTools's Audits tab and selecting the following options:
Device: Desktop
Audits: Performance
Throttling: No throttling
Clear storage (checked)
My chrome version:
Google Chrome is up to date
Version 71.0.3578.98 (Official Build) (64-bit)
According to the "Audits" tab, my Lighthouse version in Chrome is 3.2.0
After clicking Run audits button, the report is generated, and contains the following Runtime settings:
URL: https://example.com/
Fetch time: Dec 15, 2018, 11:18 PM PST
Device: Emulated Nexus 5X
Network throttling: 150 ms TCP RTT, 1,638.4 Kbps throughput (Simulated)
CPU throttling: 4x slowdown (Simulated)
User agent (host): Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
User agent (network): Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36(KHTML, like Gecko) Chrome/71.0.3559.0 Mobile Safari/537.36
CPU/Memory Power: 998
So how do I force my settings to be used so I can correctly audit for desktop?
EDIT: Verified upstream as Chrome bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=914387
It appears this is a Google Chrome bug, see below for quotes and reference:
We've found the culprit, but it'll require a Chrome-side fix.
Note that it's not just Mobile/Desktop, but the throttling settings and clear storage options are also being ignored at the moment which would explain all of the performance score differences.
-- patrickhulce, paulirish
Ref: https://github.com/GoogleChrome/lighthouse/issues/6772#issuecomment-446626154
Upstream bug: https://bugs.chromium.org/p/chromium/issues/detail?id=914387
Verified the fix on Mac 10.12.6, Windows-10 & Ubuntu 17.10 on Chrome version #73.0.3640.0 as per the comment#0
Approved for Chrome M72 branch, 3626

wget 'https://www.amazon.cn/dp/0132269937' gave me the incorrect page comparing to chrome

When I using Chrome to open the link https://www.amazon.cn/dp/0132269937, Chrome gave me the correct web page. But when I use wget or curl ,it gave me the 503 error.What's the difference between them ? I guess the root cause is COOKIE,how to figure out it?
Try setting chrome's user agent in the curl/wget request.
For example for curl:
curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2403.89 Safari/537.36" https://www.amazon.cn/dp/0132269937

how to get mapbox-gl-js webgl/opengl to work on ubuntu chrome?

We are trying mapbox-gl page here: https://www.mapbox.com/blog/data-driven-styling/
We see
This is the Chrome Version:
Google Chrome 50.0.2661.94 (Official Build) (64-bit)
Revision 0c319c380220abe3daf0277e40a2d0b22a7c4550-refs/branch-heads/2661#{#645}
OS Linux
Blink 537.36 (#0c319c380220abe3daf0277e40a2d0b22a7c4550)
JavaScript V8 5.0.71.39
Flash 21.0.0.216
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36
Command Line /usr/bin/google-chrome-stable --window-depth=24 --flag-switches-begin --flag-switches-end
Executable Path /opt/google/chrome/google-chrome
This is the linux ubuntu version:
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily
Is this a web-gl issue? our code issue? mapbox-gl-js library issue?
It works in Firefox :)
It appears that for Chrome on Ubuntu, hardware acceleration should be on.
See settings -> advanced in Chrome
Your console has an error message that says:
Failed to initialize WebGL
This means that your browser + hardware combination does not support some of the features that are needed to run Mapbox GL JS.
You may be able to resolve this issue with an update to your browser or graphics card drivers.