Category Archives: Error

[Solved] Python Connect to ES Error: elasticsearch.ApiError: ApiError(406

elasticsearch.ApiError: ApiError(406, ‘Content-Type header [application/vnd.elasticsearch+x-ndjson; compatible-with=8] is not supported’, ‘Content-Type header [application/vnd.elasticsearch+x-ndjson; compatible-with=8] is not supported’)

 

Solution:

1. You need to keep the elasticsearch installation version consistent with the python elasticsearch third-party library (module) version to solve
view the server installation version

view the third-party library (module) version

2 If not, upgrade or downgrade the third-party library (module) to achieve consistency

[Solved] OpenCV Train the class Error: Bad argument & Error: Insufficient memory

OpenCV(3.4.1) Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.
) in CvCascadeImageReader::PosReader::get, file

 

Solution: reduce the number of positive samples

opencv_traincascade.exe -data data_2 -vec positives.vec -bg bg.txt -numPos 350 -numNeg 1963 -mem 8192 -numStages 20 -w 20 -h 20

Here, you can reduce the numpos value

OpenCV(3.4.1) Error: Insufficient memory (Failed to allocate 782736980 bytes) in cv::OutOfMemoryError, file C:\application\opencv\opencv\sources\modules\core\src\alloc.cpp, line 55

 

Solution: increase memory

Here, increase the value of -mem and decrease the value of numPos

Summary: these two errors mainly lie in that the value of the number of positive samples for each level of training is too large. Numpos must be less than the total number of positive samples. Modifying MEM value only improves the running speed

[USF-XSim-62] ‘elaborate‘ step failed with errors.[Vivado 12-4473] Detected error while running sim

[USF-XSim-62] ‘elaborate’ step failed with error(s). Please check the Tcl console output . and

[Vivado 12-4473] Detected error while running simulation. Please correct the issue and retry this operation.

The problems are as follows:

Ways to find problems

Method 1: messages in vivado cannot see detailed information, but after the error, the path of the log will be displayed. Open D:/vivado/fortest/fortest.sim/sim_1/behav/xsim/ elaboration.log, we can see error: [vrfc 10-3180] cannot find port ‘extreme_Result ‘on this module, modify the error

method 2: directly see the details in the log window in vivado, find the error, and then modify it

my error is that the port name of the instantiated function file in the simulation file is wrong.

Compare the size of two numbers of 8 bits

module extreme_8bit(
    extreme0,
    extreme1,
    DataSign,
    SubType,
    extreme_Result    
    );
 
input [7:0]          extreme0;//vector operand 1 to participate in the most-valued comparison
input [7:0] extreme1;//vector operand 2 to participate in the most-valued comparison
input DataSign;//0: unsigned; 1: signed
input SubType;//0: find the maximum value max;1: find the minimum value min
output reg [7:0] extreme_Result;//the final result   
reg extreme_c_carry;
wire carry;
wire [7:0] extreme_sum;
wire [7:0] temp_extreme0,temp_extreme1;//find the most value when the unsigned highest bit is the same, the virtual construction of the two numbers 
reg [7:0] add_extreme0,add_extreme1;//enter the adder's operands for subtraction operations

Translated with www.DeepL.com/Translator (free version)
reg  [7:0]          min,max;
assign temp_extreme0={1'b1,extreme0[6:0]};
assign temp_extreme1={1'b0,extreme1[6:0]};    


always @(*)begin
extreme_c_carry = 1'b1;
    if(DataSign==0)begin//0:unsigned
    {add_extreme0,add_extreme1} = {temp_extreme0,~temp_extreme1};
        if(SubType==0)begin//0: find the maximum value max, i.e. unsigned vector with same width integer subsumption max
            if(extreme0[7]! =extreme1[7]) begin // make sure the highest bit of the input data is inconsistent 
                if(extreme0[7]==1) begin //extreme0>extreme1
                    max <= extreme0;
					extreme_Result <= max;
				end 
				else begin //extreme0[7]==0;extreme1[7]==1;extreme0<extreme1
					max <= extreme1;
					extreme_Result <= max;
				end 
            end
            else begin//extreme0[7]==extreme1[7] input data highest bit is the same, remove the highest bit to do the difference
                if(extreme_sum[7]==1)begin//extreme0>extreme1,when subtracting, the highest bit does not happen to be borrowed, the highest bit built 1 is still 1
				    max <= extreme0;
				    extreme_Result <= max;							
				end 
				else begin//extreme_sum[7]==0,extreme0<extreme1,,when subtracted, the highest bit is borrowed and the constructed 1 becomes 0
				    max <= extreme1;
				    extreme_Result <= max;	
				end
            end
        end
        else begin//SubType==1,1:Find the minimum min, i.e., the minimum with unsigned vectors of the same width integer normalization 
            if(extreme0[7]! =extreme1[7]) begin // Determine if the highest bit of the input data is inconsistent 
                if(extreme0[7]==1) begin//extreme0>extreme1 
					min <= extreme1;
					extreme_Result <= min;
				end 
				else begin //extreme0[7]==0;extreme1[7]==1;extreme0<extreme1
                    min <= extreme0;
					extreme_Result <= min;
				end 
            end
            else begin//extreme0[7]==extreme1[7]Input data highest bit is the same, remove the highest bit to do the difference
                if(extreme_sum[7]==1)begin//extreme0>extreme1,when subtracting, the highest bit does not happen to borrow, the highest bit built 1 is still 1
				    min <= extreme1;
					extreme_Result <= min;							
				end 
				else begin//extreme_sum[7]==0,extreme0<extreme1,,when subtracted, the highest bit is borrowed and the constructed 1 becomes 0
				    min <= extreme0;
					extreme_Result <= min;
				end
            end
        end    
    end

    else begin//DataSign==1,1:with symbols
    {add_extreme0,add_extreme1} = {extreme0,~extreme1};
        if(SubType==0)begin//0: find the maximum value max, i.e. the signed vector with the same width integer subsumption max
            if(extreme0[7]! =extreme1[7])begin///heteroscedasticity of two numbers, the highest bit does not match the case to determine who is the largest integer                    
                if(extreme0[7]==1) begin//extreme0 is a negative number
					max <= extreme1;
					extreme_Result <= max;
				end 
				else begin //extreme1 is a negative number
					max <= extreme0;
					extreme_Result <= max;
				end                                          
            end
            else begin//The same number (with the same positive or negative) of two numbers, the highest bit of the same case to determine who is the largest integer
                if(extreme_sum[7]==1)begin//extreme0<extreme1,the result of subtraction is negative
				    max <= extreme1;
				    extreme_Result <= max;							
				end 
				else begin//extreme_sum[7]==0,extreme0>extreme1,the result of subtraction is positive
				    max <= extreme0;
				    extreme_Result <= max;	
				end
            end
        end
        else begin//SubType==1,1:Find the minimum min, i.e., the signed vector with the same width integer normalized to the minimum      
            if(extreme0[7]! =extreme1[7])begin///Determine who is the smallest integer if the two numbers with different signs and the highest bit do not match                    
                if(extreme0[7]==1) begin//extreme0 is a negative number
					min <= extreme0;
					extreme_Result <= min;
				end 
				else begin //extreme1 is negative
					min <= extreme1;
					extreme_Result <= min;
				end                                          
            end
            else begin//Two numbers with the same number (same positive or negative), the highest bit is the same to determine who is the smallest integer  
                if(extreme_sum[7]==1)begin//extreme0<extreme1,the result of subtraction is negative
				    min <= extreme0;
				    extreme_Result <= min;							
				end 
				else begin//extreme_sum[7]==0,extreme0>extreme1,the result of subtraction is positive
				    min <= extreme0;
				    extreme_Result <= min;	
				end
            end        
        end    
    end    
end    
    
RISCV_8BIT_REDADD extreme(
    .o_sum(extreme_sum),
    .o_cout(carry),
    .i_a(add_extreme0),
    .i_b(add_extreme1),
    .i_cin(extreme_c_carry)
);   
                             
endmodule

The multi bit width is divided into 8 bits to compare the size

module extreme_8bit_256( 
    extreme0,
    extreme1,
    DataSign,
    SubType,
    extreme_temp,
    extreme_result256    
    );
parameter M = 16; //VLEN = 256 ; 
parameter N = 8; //SEW = 8 ;  
 
input    [M-1:0]            extreme0;//The number of vector operands participating in the most-valued comparison1
input [M-1:0] extreme1;//vector operand 2 for the most-valued comparison
input [1:0] DataSign;//x0: unsigned; x1: signed
input [2:0] SubType;//0: find the maximum value max;1: find the minimum value min
output [M-1:0] extreme_temp;
output [N-1:0] extreme_result256;//the final result   

extreme_8bit extreme_8bit_inst0(
    .extreme0(extreme0[N-1:0]),
    .extreme1(extreme1[N-1:0]),
    .DataSign(DataSign[0]),
    .SubType(DataSign[0]),
    .extreme_Result(extreme_temp[N-1:0])   
    );   
    
    genvar i;
    generate 
    for(i = 0;i < 1;i = i + 1)begin
    extreme_8bit extreme_8bit_inst(
    .extreme0(extreme_temp[i*N+N-1:i*N]),
    .extreme1(extreme1[(i+1)*N+N-1:(i+1)*N]),
    .DataSign(DataSign[0]),
    .SubType(SubType[0]),
    .extreme_Result(extreme_temp[(i+1)*N+N-1:(i+1)*N])
    );
    
    assign extreme_result256[N-1:0] = extreme_temp[M-1:M-N];
    end
    
endgenerate 

endmodule

Simulation file (the previous file reported an error because when the extreme_8bit_256 module was instantiated, the port extreme_result256 was incorrectly written as extreme_result, and all displays did not find the port extreme_result)

module fortest_tb(    );
parameter M = 16; //VLEN = 256 ; 
parameter N = 8; //SEW = 8 ;  
   
    reg    [M-1:0]         extreme0;
    reg    [M-1:0]         extreme1;
    reg    [1:0]           DataSign;//0:unsigned; 1: signed
    reg [2:0] SubType;//0: find the maximum value max;1: find the minimum value min  
    wire   [M-1:0]         extreme_temp;
    wire   [N-1:0]         extreme_result;   

    extreme_8bit_256 extreme_8bit_256_inst( 
    .extreme0(extreme0),
    .extreme1(extreme1),
    .DataSign(DataSign),
    .SubType(SubType),
    .extreme_temp(extreme_temp),
    .extreme_result256(extreme_result)    
    );

   initial  begin//DataSign;//x0:unsigned; x1: signed  SubType;//xx0:max;  xx1:min
   extreme0 = 16'b0;
   extreme1 = 16'b0;
   DataSign = 2'b00;
   SubType = 3'b000;
   #100
   SubType = 3'b000;
   extreme0 =  16'b1010_0001_0001_0111;
   extreme1 =  16'b0100_0111_1010_0001;
   #100
   SubType = 3'b001;
   extreme0 =  16'b1010_0001_0001_0111;
   extreme1 =  16'b0100_0111_1010_0001;
   #100
   DataSign = 2'b01;
   SubType = 3'b000;
   extreme0 =  16'b1010_0001_0001_0111;
   extreme1 =  16'b0100_0111_1010_0001;
   #100
   SubType = 3'b001;
   extreme0 =  16'b1010_0001_0001_0111;
   extreme1 =  16'b0100_0111_1010_0001;
   end       
endmodule

[Solved] ERROR RocketmqCommon-Failed to obtain the host name

report an error when building a rocketmq stand-alone environment.

Problem encountered: using command

nohup sh mqnamesrv &

The following error occurred

java. net. UnknownHostException: hadoop03: hadoop03: unknown error
at java. net. InetAddress. getLocalHost(InetAddress.java:1505)
at org. apache. rocketmq. common. BrokerConfig. localHostName(BrokerConfig.java:201)
at org. apache. rocketmq. common. BrokerConfig.& lt; init> (BrokerConfig.java:39)
at org. apache. rocketmq. broker. BrokerStartup. createBrokerController(BrokerStartup.java:101)
at org. apache. rocketmq. broker. BrokerStartup. main(BrokerStartup.java:56)
Caused by: java. net. UnknownHostException: hadoop03: unknown error
at java. net. Inet4AddressImpl. lookupAllHostAddr(Native Method)
at java. net. InetAddress$2. lookupAllHostAddr(InetAddress.java:928)
at java. net. InetAddress. getAddressesFromNameService(InetAddress.java:1323)
at java. net. InetAddress. getLocalHost(InetAddress.java:1500)
… 4 common frames omitted

This is because the IP address corresponding to your host name cannot be found during startup. Just add the above configuration in /etc/hosts

Solution:

Operate according to the following command

Add the mapping marked in red to the file. Note: permission problems may occur during editing, and the root account needs to be switched

:wq! Save exit

Use the JPS command to check the process to see if NamesrvStartup has been started. If it is about closing it

sh mqshutdown namesrv

Start mqnamesrv again

nohup sh mqnamesrv &

Check the log and solve the problem

[Solved] Bat starts springboot project error: ERROR org.springframework.boot.SpringApplication -Application run failed

Project scenario:

use bat to execute java to start the springboot project in a flash


Problem description

the background log displays the following information

2022-04-25 17:35:27.845 [main] ERROR org.springframework.boot.SpringApplication -Application run failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/G:/2022/admin/lib3/yy-common-1.1.jar!/com/yy/config/RemoveDruidAdConfig.class]; nested exception is java.lang.IllegalStateException: Could not evaluate condition on com.yy.config.RemoveDruidAdConfig due to org/springframework/boot/bind/RelaxedPropertyResolver not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:457)
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:316)
    at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:276)
    at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:128)
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:296)
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:207)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:175)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:302)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290)
    at com.yy.YyApplication.main(YyApplication.java:18)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
    at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
Caused by: java.lang.IllegalStateException: Could not evaluate condition on com.yy.config.RemoveDruidAdConfig due to org/springframework/boot/bind/RelaxedPropertyResolver not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:55)
    at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
    at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:88)
    at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:71)
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.isConditionMatch(ClassPathScanningCandidateComponentProvider.java:512)
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.isCandidateComponent(ClassPathScanningCandidateComponentProvider.java:495)
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:430)
    ... 28 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/bind/RelaxedPropertyResolver
    at org.springframework.boot.autoconfigure.condition.OnPropertyCondition$Spec.collectProperties(OnPropertyCondition.java:154)
    at org.springframework.boot.autoconfigure.condition.OnPropertyCondition$Spec.access$000(OnPropertyCondition.java:117)
    at org.springframework.boot.autoconfigure.condition.OnPropertyCondition.determineOutcome(OnPropertyCondition.java:99)
    at org.springframework.boot.autoconfigure.condition.OnPropertyCondition.getMatchOutcome(OnPropertyCondition.java:60)
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
    ... 34 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.bind.RelaxedPropertyResolver
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 39 common frames omitted

Cause analysis:

After comparison and detection, it turns out that the referenced lib package is caused by redundancy


Solution:

Delete the package in lib folder, execute Maven install, and copy the jar package in Lib in target to Lib folder again

[Solved] Milvus Error: [ERROR][SERVER][TakeToEUse milvus.has_collection to verify whether the collection exists

Error Messages:

[2022-04-25 23:07:20,681][ERROR][SERVER][TakeToExecute][reqsched_thread] Request failed with code: Error code(30100): Collection xxx does not exist. Use milvus.has_collection to verify whether the collection exists. You also can check whether the collection name exists.

Solution

When deleting, you must delete the index first and then the set. If the order is reversed, an error will be reported

When creating an index, create a set first. If the order is reversed, an error will be reported

    def insert_ini(self, collection_name, vectors, ids=None, partition_tag=None):
        try:
            if self.has_collection(collection_name):
                self.client.drop_index(collection_name)
                self.client.drop_collection(collection_name)
            self.creat_collection(collection_name)
            self.create_index(collection_name)
            print('collection info: {}'.format(self.client.get_collection_info(collection_name)[1]))
            self.create_partition(collection_name, partition_tag)
            if vectors != -1:
                status, ids = self.client.insert(
                    collection_name=collection_name,
                    records=vectors,
                    ids=ids,
                    partition_tag=partition_tag)
                self.client.flush([collection_name])
                print(
                    'Insert {} entities, there are {} entities after insert data.'.
                    format(
                        len(ids), self.client.count_entities(collection_name)[1]))
                return status, ids
            else:
                return -1, ids
        except Exception as e:
            print("Milvus insert error:", e)

After finishing the whole, be sure to check the log in the background of the component to see if there are exceptions

Stand alone version

 cd /home/$USER/milvus/logs

The log is completely normal only when there is no error report

cat milvus-22-04-25-22:22-error.log

Mishards cluster version, or report an error

[2022-04-26 01:13:47,971][ERROR][SERVER][TakeToExecute][reqsched_thread] Request failed with code: Error: Collection already exists and it is in delete state, please wait a second
[2022-04-26 01:13:47,975][ERROR][SERVER][TakeToExecute][reqsched_thread] Request failed with code: Error code(30100): Collection call_12345_prd does not exist. Use milvus.has_collection to verify whether the collection exists. You also can check whether the collection name exists.
[2022-04-26 01:13:47,978][ERROR][SERVER][TakeToExecute][reqsched_thread] Request failed with code: Error code(30100): Collection call_12345_prd does not exist. Use milvus.has_collection to verify whether the collection exists. You also can check whether the collection name exists.
[2022-04-26 01:13:47,981][ERROR][SERVER][TakeToExecute][reqsched_thread] Request failed with code: Error code(30100): Collection call_12345_prd does not exist. Use milvus.has_collection to verify whether the collection exists. You also can check whether the collection name exists.
[2022-04-26 01:13:47,985][ERROR][SERVER][OnExecute][reqsched_thread] [insert][0] Collection call_12345_prd not found
[2022-04-26 01:13:47,985][ERROR][SERVER][TakeToExecute][reqsched_thread] Request failed with code: Error code(30100): Collection call_12345_prd does not exist. Use milvus.has_collection to verify whether the collection exists. You also can check whether the collection name exists.
[2022-04-26 01:13:47,987][ERROR][SERVER][TakeToExecute][reqsched_thread] Request failed with code: Error code(30100): Collection call_12345_prd does not exist. Use milvus.has_collection to verify whether the collection exists. You also can check whether the collection name exists.
[2022-04-26 01:13:47,990][ERROR][SERVER][TakeToExecute][reqsched_thread] Request failed with code: Error code(30100): Collection call_12345_prd does not exist. Use milvus.has_collection to verify whether the collection exists. You also can check whether the collection name exists.

Go to the corresponding node and check the log files one by one.

 	kubectl get pods

    kubectl exec -it milvus-release-mishards-767dc476bf-fxz8v -- /bin/bash

    kubectl exec -it milvus-release-readonly-6cb6c5bcd9-9m4c5 -- /bin/bash
    kubectl exec -it milvus-release-readonly-6cb6c5bcd9-mzrh6 -- /bin/bash

    kubectl exec -it milvus-release-writable-7776777fcc-dsdmv -- /bin/bash

[Solved] error LNK2005: _bn_sub_part_words Already defined in bn_mul.obj

Compiling openssl and using the nasm method of mutation ends up with the following error:

link /nologo /subsystem:console /opt:ref /debug /dll /out:out32dll\libea
y32.dll /def:ms/LIBEAY32.def @C:\Users\Unst\AppData\Local\Temp\nm75AD.tmp
bn-586.obj : error LNK2005: _bn_sub_part_words

Already defined in bn_mul.obj
Library out32dll\libeay32.lib and object out32dll\libeay32.exp are being created
mem.obj : error LNK2001: Unresolved external symbol _cleanse_ctr
mem.obj : error LNK2001: Unresolvable external symbol _cleanse_ctr
out32dll\libeay32.dll : fatal error LNK1120: 1 unresolvable external command
NMAKE : fatal error U1077: ""D:\Program Files\Microsoft Visual Studio 10.0\VC\B
IN\link.EXE"": return code "0x460"
Stop.

 

Solution: Delete the OpenSSL directory and try again.

How to Solve screenfull plug-in Error (Version Issues)

We can use handwriting directly to realize the full screen function, but it is very convenient to use the screenfull plug-in to deal with the problem of full screen, but there is a bug in normal use today

Install NPM package NPM i screenfull ,the default is to import the latest version

Import Import screenfull from 'screenfull' to use

You can use the full screen function nomarlly screenfull.toggle()

At this time, I reported an error to me

when the page was blank and could not be loaded, I went to the Internet to find several articles that said the version was too high and needed to reduce the version of the package plug-in. I tried many times and still reported an error

Solution:

It’s really necessary to reduce the version. I’ve reduced it to [email protected] Version, then why do you report an error?I found that the imported path is screenfull under the module directory, but there is no corresponding index.js file

so we have to change the import path import ScreenFull from 'screenfull/dist/screenfull', the page will be displayed normally and the full screen function will be normal

[Solved] UE4UE5 Package Android Error: UnrealBuildTool failed

Error:

Android\armv7\gradle\rungradle.bat……UnrealBuildTool failed

Solution:

1. Replace gradle package

Download address: http://services.gradle.org/distributions/

Replace with: C:\Users\your_user_name\.gradle\wrapper\dists\gradle-x.x-all\xxxxxxxxxxxxxxxxxxxxxxx

2. Update SDK
check the latest SDK in SDK manager in Android studio (you can download the update directly)

3. Update NDK and build tool

Error reported: XXXXXX\gradle\rungradle.bat” :app :assembleDebug

Solution: in the SDK manager, find SDK Tools – Show package details and delete the build tool version with relevant errors according to the error information.

Just pack it.

[Solved] Unity Publish WebGL Error: Unable to parse Build/webTest2.framework.js.gz

For H5 projects published directly, http-server or anywhere -p

When you open it at this time, you will find that the page is as follows:

Solution: PlayerSetting->Player->Publishing Setting

Check DecomPression Fallback

It can work normally after being released at this time, but it is not full screen:

In the released H5 project, edit index.html file

Directly modify the style of canvas:

<canvas id="unity-canvas" style="width: 100%; height: 100%; background: #231F20"></canvas>

Or insert code in <Script> :

  var canvas = document.getElementById("#unity-canvas");
    canvas.height = document.documentElement.clientHeight;
    canvas.width = document.documentElement.clientWidth;

This can solve the problem, but it is troublesome to modify it manually after each release. Later, we will study the automatic processing during release.

Or there are other full-screen settings.