Tag Archives: chrome

Open chrome under selenium and solve the error

Open chrome under selenium and solve the error



The error is as follows:

[22516:20196:0704/024642.979:ERROR:install_util.cc(597)] Unable to read registry value HKLM\SOFTWARE\Policies\Google\Chrome\MachineLevelUserCloudPolicyEnrollmentToken for writing result=2



The solution is as follows:

Just add a value named machinelevelusercloudpolicyenrollmenttoken (the data is empty) to the registry



Transferred from: https://blog.csdn.net/hoddy355/article/details/80906596


You can also run the following commands through the administrator command:

Run “reg add HKLM \ software \ policies \ Google \ Chrome/V machinelevelusercloudpolicyenrollmenttoken/T reg” from the command line_SZ “, add the registry value prompted in the error message – confirmed, valid



Solve the problem that Chrome browser cannot automatically call Aliwangwang client chat software

Front end developers must read! Starting from scratch, teach you to build a low code website platform in stages>>>

Solve the problem that Chrome browser cannot automatically call Aliwangwang client chat software

Copy and paste the following code, you can go directly to the settings page



Open Chrome browser — settings — display advanced settings — privacy management [content management] – drop down to find “plug in” [manage out of column situations…] — add [*] alipay.com permission — finish — restart Chrome browser

[Chrome Error] Cross origin requests are only supported for protocol schemes: http, data,chrome-extension

Using Ajax to request local files, chrome will report cross domain error: XMLHttpRequest cannot LoadFile:///C/users/Li/desktop/images/alist.json.cross origin requests are only supported for protocol schemes: http, data, Chrome extension, HTTPS, Chrome extension resource


Add a startup parameter to chrome: — allow file access from files

specific method:

Right-click the browser shortcut – properties – Shortcut – target, as shown in the figure below:

Solve the problem of invalid package during chrome plug-in installation: “CRX”_ HEADER_ INVALID”

Explain the function of static keyword and final keyword in Java in detail>>>

Open the expansion program of chorme (settings — > More tools – > (extender) chrome://extensions

Choose developer mode

Drag. CRX to the extension list of chrome

Installation failed

The error is: invalid package: “CRX”_ HEADER_ INVALID”

Choose to load the unzipped extender

The operation of successful installation is as follows:

Successfully installed

In short, it is to change the suffix of the downloaded CRX file to rar, then unzip it, and then select to load the unzipped expansion program on the browser, select this folder, and install it successfully

Chrome browser error: err_ UNSAFE_ PORT

Today, I opened a page with Chrome browser and found an error: err_ UNSAFE_ PORT

So, after a search, it is found that Chrome browser defaults to some non secure ports

In case of this problem, it is recommended to change the port number or change the browser to open

The following is a record of some port numbers restricted by Chrome browser:

1:    // tcpmux
7:    // echo
9:    // discard
11:   // systat
13:   // daytime
15:   // netstat
17:   // qotd
19:   // chargen
20:   // ftp data
21:   // ftp access
22:   // ssh
23:   // telnet
25:   // smtp
37:   // time
42:   // name
43:   // nicname
53:   // domain
77:   // priv-rjs
79:   // finger
87:   // ttylink
95:   // supdup
101:  // hostriame
102:  // iso-tsap
103:  // gppitnp
104:  // acr-nema
109:  // pop2
110:  // pop3
111:  // sunrpc
113:  // auth
115:  // sftp
117:  // uucp-path
119:  // nntp
123:  // NTP
135:  // loc-srv /epmap
139:  // netbios
143:  // imap2
179:  // BGP
389:  // ldap
465:  // smtp+ssl
512:  // print/exec
513:  // login
514:  // shell
515:  // printer
526:  // tempo
530:  // courier
531:  // chat
532:  // netnews
540:  // uucp
556:  // remotefs
563:  // nntp+ssl
587:  // stmp?
601:  // ??
636:  // ldap+ssl
993:  // ldap+ssl
995:  // pop3+ssl
2049: // nfs
3659: // apple-sasl/PasswordServer
4045: // lockd
6000: // X11
6665: // Alternate IRC [Apple addition]
6666: // Alternate IRC [Apple addition]
6667: // Standard IRC [Apple addition]
6668: // Alternate IRC [Apple addition]
6669: // Alternate IRC [Apple addition]

How to Solve Chrome Error: “net::ERR_INCOMPLETE_CHUNKED_ENCODING”

Remember the process of troubleshooting. Premise to build a publishing system, colleagues suddenly appear in the use of the page whiteboard, the page can not render any content. Of course, the first reaction is that there may be something wrong with the diff module

Print the CMD of diff module and check the return without any problem. At the last step of the template, there is something wrong with the output. Strange heart 10000 question mark, again did not encounter this problem, change a browser. No problem! There is really no problem

Chrome Open debug mode, failed error code (failed) net:: err_ INCOMPLETE_ CHUNKED_ ENCODING。 Then Google got the results. Actually, it’s a very common problem. When the output proxy file size exceeds the configured proxy file size_ temp_ file_ write_ Size, nginx will write the file to the temporary directory. If you don’t have permission, chrome will fail without outputting anything

Specific error:

/var/lib/nginx/tmp/fastcgi/2/37/0000000372" failed (13: Permission denied) while reading upstream, client:, server: deploy.mgame.qihoo.net, request: "GET /walle/deploy?taskId=147 HTTP/1.1", upstream: "fastcgi://", host: "deploy.xxx.com:8081"


chown -R www:www /var/lib/nginx

WWW is replaced by the ngxin running user configured in the actual project

This problem review is when installing nginx, you can directly Yum install. When configuring the web, I forgot to change the directory permissions of/var/lib/nginx. The default is nginx:nginx Group permissions, usually do not use this account to start. So when it comes to a body with large output, this et:: err is triggered_ INCOMPLETE_ CHUNKED_ Encoding error

Solution to the error of not allowed to load local resource in Chrome

Recently, the project has encountered changes about the picture -> save -> local read

An error occurred in the link of local reading. At the beginning, the direct local path was used, but the following error occurred when debugging on the page. His path is still a relative path, as shown in the figure below:

Google’s console also reported an error, and then changed it to the file file he wanted, but it still guarantees the error:

It said that the current browser does not allow direct access for security reasons, but can I make a virtual path?

Because I use jetty, the solution is to configure a virtual path in the jetty configuration file, modify the following paragraph in Jetty installation directory> etc directory> jetty.xml

1  < Set name ="handler" > 
2        < New id ="Handlers" class ="org.eclipse.jetty.server.handler.HandlerCollection" > 
3          < Set name ="handlers" > 
4           < Array type ="org. eclipse.jetty.server.Handler" > 
5             < Item > 
6               < New id ="Contexts" class ="org.eclipse.jetty.server.handler.ContextHandlerCollection" /> 
7             </ Item > 
8             <Item > 
9               < New id ="ContextHandler" class ="org.eclipse.jetty.server.handler.ContextHandler" > 
10                   < Set name ="contextPath" > /images </ Set >   
11                    < Set name ="handler" >   
12                      < New class ="org.eclipse.jetty.server.handler.ResourceHandler" >   
13                         < Set name ="resourceBase" > E:/jetty-distribution-9.3.7.v20160115/ </ Set >   
14                         <Set name ="directoriesListed" > true </ Set >   
15                      </ New >   
16                  </ Set >  
17                 </ New > 
18             </ Item > 
19             < Item > 
20               < New id ="DefaultHandler" class ="org.eclipse .jetty.server.handler.DefaultHandler" /> 
21             </ Item > 
22           </ Array > 
23          </ Set >
24        </New > 
25      </ Set >

In this way, the problem can be solved. If it is Tomcat, you can refer to the following (I did not verify):

Map the file storage path directory to tomcat, the method is as follows:

1. Find the tomcat configuration file (\conf\server.xml) and open it

2. Add the following code between [host] and [/host]: [<Context path=”/file” docBase=”E:\test” debug=”0″ reloadable=”true”/>] Among them: [ path] is the mapped path, [docBase] is the path where your file is located

3. Calling method: There is a picture of test.jpg under [E:\test]

[The src in the img tag is changed to “/file/test.jpg”]

4. Test ok



The above is the solution, the test is available! Thank you for pointing out if there are any deficiencies


Chrome failed to download word

This article gives you a comprehensive understanding of Java object serialization and deserialization>>>

Background: this problem occurs in the development and testing phase of the project

Recurrence: there has been no problem in the development and debugging process. The local download of Excel, word and PDF is perfect. However, after the service is deployed to the server, the download of chrome in the test environment always fails, indicating network errors


At this time, we trace the problem. During the local test, we find that every download will have a problem warning: resource interpreted as document but transferred with MIME type application/octet stream

Baidu, most of them are modifying content-type, but no matter what type of modification it is, the packet is displayed back to the corresponding type, but download is not successful (it has to make complaints about Baidu, really is advertising first-class). p>

Switch to Bing and successfully find a solution: add the header information content length, , in which bytes is the binary stream file to download

The reason for this is that the download of byte stream is restricted by the advanced version of chrome, and the length of byte stream should be declared in the header information( What are the specific restrictions here?I’ll update it later when I find out the exact statement.)

Update on August 23, 2019: words exported in this way are lost. The length of the stream added in the header is only the length of the body (bytes. Length), and the length of the header needs to be added. I added 5000 here, which is also measured a little bit

Update on December 13, 2019: in the past two days, a user reported that the export of word failed, . First, I used my computer’s Chrome test – no problem, and asked him about the browser version he used – the latest version of chrome 79. After downloading, I tried, and sure enough, there was a problem, and I couldn’t find the reason through local debugging

Thinking about whether it is the length of the byte stream, I deleted the 5000 I added and tested it successfully. There was no loss of words! I guess some bugs have been fixed after chrome upgrade. The length of header information should not be added to the length of byte stream

Record as a problem only

Address: https://blog.csdn.net/qq_ 34720759/article/details/79189480

Chrome Commands Error: “Slow network is detected. Fallback font will be used while loading”

When the network environment is poor, the new version of chrome will output slow network is detected. Fallback font will be used while loading in the console, but sometimes it will cause inconvenience to debugging. You can disable this item in chrome configuration:
method: enter in the address bar chrome://flags/#enable -Webhosts-intervention-v2 , and set it to disabled; Restart chrome

Reference link: https://stackoverflow.com/questions/40143098/why-does-this-slow-network-detected-log-appear-in-chrome

In the console bar

1. Click pinion console settings

2. Check user messages only

The following place will not check out those XHR

Tomcat configuration SSL access chrome prompt err_ SSL_ VERSION_ OR_ CIPHER_ MISMATCH

After configuring Tomcat SSL today, we found that the page could not be accessed. Chrome prompts the following:

Access error.png

The problem is that the same configuration on other servers is OK
Baidu hasn’t found a solution after a circle, and doesn’t know much about the principle of Tomcat configuring SSL. Later, Google found a solution to configure the specified encryption protocol set in the SSL connector


The specific connector configuration is as follows:

 <Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true" URIEncoding="UTF-8" 
               keystoreFile="conf/chinanetcenter.tomcat"  keystorePass="2013111"
               clientAuth="false" sslProtocol="TLS" keystoreType="PKCS12" 
               compression="on" compressionMinSize="50" noCompressionUserAgents="gozilla, traviata"

After configuration, you can access the page

The specific reasons are not enough. Later, we will have an opportunity to further understand the principle of Tomcat mechanism

Here are some of the information we saw in the search for questions:

Tomcat’s SSL can be implemented in two ways, one is to use APR, the other is JSSE. Tomcat automatically selects which implementation to use. If the server is installed with APR, it seems that it will automatically choose to use APR ( I guess the above error may have something to do with APR, because only that server is installed with APR, it won’t work ). You can make Tomcat choose JSSE implementation by specifying protocol

Tomcat can implement SSL in two ways, JSSE and APR
(1) JDK has implemented JSSE since version 1.4, APR uses OpenSSL engine, so if you want to use APR, you must configure OpenSSL engine
(2) JSSE is divided into bio implementation and NiO implementation. The protocol value of bio implementation is org.apache.coyote.http11.http11protocol, and that of NiO implementation is org.apache.coyote.http11.http11nioprotocol if you want to use APR mode, you must install Tomcat local library
(3) the default connector in most Tomcat is bio connector
according to the test, Tomcat6 is bio connector and does not support NiO, so the protocol value of connect connector should be written as org.apache.coyote.http11.http11protocol