Category Archives: Error

LDSC: Could not open Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscore[./gz/bz2]

The error that occurs when running the following script IOError: Could not open Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscore[./gz/bz2]:

ldsc.py \
    --h2-cts UKBB_BMI.sumstats.gz \
    --ref-ld-chr 1000G_EUR_Phase3_baseline/baseline. \
    --out BMI_Corces_ATAC \
    --ref-ld-chr-cts /ldsc/data/Corces_ATAC.ldcts \
    --w-ld-chr weights_hm3_no_hla/weights.

Solution, specify the absolute path of the Corces_ATAC_1000Gv3_ldscores folder, for example, the Corces_ATAC_1000Gv3_ldscores folder is stored in /ldsc/data, then it can be modified as follows:

cd /ldsc/data
ldsc.py \
    --h2-cts UKBB_BMI.sumstats.gz \
    --ref-ld-chr 1000G_EUR_Phase3_baseline/baseline. \
    --out BMI_Corces_ATAC \
    --ref-ld-chr-cts /ldsc/data/Corces_ATAC.ldcts \
    --w-ld-chr weights_hm3_no_hla/weights.

It can be understood that this is a bug of ldsc. ldsc needs to call Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscoredata internally, but there is no such parameter in the official script to specify Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscorethe data, so the data cannot be found when running.
Therefore, you only need to add cd /ldsc/datasuch a parameter before running.

Gradle Package Project Lombok Not Working: No serializer found for class com.qbb.User and no properties discovered to create BeanSerializer……

Full error:

03-Dec-2022 16:57:22.941 涓ラ噸 [http-nio-8080-exec-5] org.apache.catalina.core.StandardWrapperValve.invoke 鍦ㄨ矾寰勪负/ssm鐨勪笂涓嬫枃涓紝Servlet[DispatcherServlet]鐨凷ervlet.service锛堬級寮曞彂浜嗗叿鏈夋牴鏈師鍥犵殑寮傚父Request processing failed; nested exception is org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class com.qbb.User]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.qbb.User and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.ArrayList[0])
	com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.qbb.User and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.ArrayList[0])
		at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:77)
		at com.fasterxml.jackson.databind.SerializerProvider.reportBadDefinition(SerializerProvider.java:1276)
		at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:400)
		at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:71)
		at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:33)
		at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serializeContents(CollectionSerializer.java:145)
		at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize(CollectionSerializer.java:107)
		at com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize(CollectionSerializer.java:25)
		at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
		at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:400)
		at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1510)
		at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:1006)
		at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal(AbstractJackson2HttpMessageConverter.java:456)
		at org.springframework.http.converter.AbstractGenericHttpMessageConverter.write(AbstractGenericHttpMessageConverter.java:104)
		at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:290)
		at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:183)
		at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78)
		at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:135)
		at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
		at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
		at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
		at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1070)
		at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
		at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
		at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
		at javax.servlet.http.HttpServlet.service(HttpServlet.java:670)
		at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
		at javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
		at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
		at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)
		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
		at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
		at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
		at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
		at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
		at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.base/java.lang.Thread.run(Thread.java:833)

Solution 1:

Add getter and settermethod to the entity class that reported the error

think:

Because I use Lombok, and add the @Data annotation to the entity class, the get/set method also exists , so why doesn’t it take effect? This can’t help arousing my interest, I will build the project first, and check the classes directory

Solution 2:

Add the following codes in build.gradle

project("gradle-ssm-domain") {
    dependencies {
       ......
        // lombok does not take effect after solving Gradle packaging
        api 'org.projectlombok:lombok:1.18.24'
        annotationProcessor 'org.projectlombok:lombok:1.18.24'
    }
}

[Solved] PCH Warning: header stop not at file scope

Produces warnings when importing custom header files:PCH Warning: header stop not at file scope

The editor is VSCode, the compiler is g++11IntelliSense, and the code checker (that is, the one that reports the error) is IntelliSense.

The specific reason is: the syntax of c++17 is used in the code, which does not match the configuration of IntelliSense, and IntelliSense cannot recognize the syntax of the header file during precompilation.

According to the error message, find the relevant configuration of IntelliSense, because there are multiple c++ compilers on the computer, but there is no corresponding configuration when using IntelliSense. As can be seen the compiler used is clangnot actually used g++11.

clang

Modify the compiler configuration and add parameters -std=c++17to make the precompilation of IntelliSense work normally, indicating that the syntax of c++17 is used.

g++

Or do not add parameters -std=c++17, there is a configuration below that can modify the c++ standard used, and it can also work normally if it is changed to c++17.

c++17

error: rpmdb: BDB0113 Thread/process 14536/140712790841152 failed: BDB1507 Thread died in Berkeley DB library

yum remove docker
error: rpmdb: BDB0113 Thread/process 14536/140712790841152 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 – (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
[root@localhost bin]# yum remove
error: rpmdb: BDB0113 Thread/process 14536/140712790841152 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 – (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
[root@localhost bin]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 50G 11G 40G 21% /
devtmpfs 851M 0 851M 0% /dev
tmpfs 864M 0 864M 0% /dev/shm
tmpfs 864M 9.2M 854M 2% /run
tmpfs 864M 0 864M 0% /sys/fs/cgroup
/dev/sda2 1014M 139M 876M 14% /boot
/dev/sda1 200M 12M 189M 6% /boot/efi
/dev/mapper/centos-home 411G 33M 411G 1% /home
tmpfs 173M 0 173M 0% /run/user/0
[root@localhost bin]# mv /var/lib/rpm
rpm/ rpm-state/
[root@localhost bin]# mv /var/lib/rpm/
Basenames __db.001 __db.003 Dirnames Installtid Obsoletename Providename .rpm.lock Sigmd5
Conflictname __db.002 .dbenv.lock Group Name Packages Requirename Sha1header Triggername
[root@localhost bin]# mv /var/lib/rpm/__db.00
__db.001 __db.002 __db.003
[root@localhost bin]# mv /var/lib/rpm/__db.00
__db.001 __db.002 __db.003
[root@localhost bin]# mv /var/lib/rpm/__db.00* /tmp/ && yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up list of fastest mirrors
[root@localhost bin]# yum remove docker
Loaded plugins: fastestmirror
No Match for argument: docker

No Packages marked for removal
[root@localhost bin]#

[Solved] Unreal Engine Error: Widget Blueprint could not be loaded because it derives from an invalid class

 Widget Blueprint could not be loaded because it derives from an invalid class 

The blueprint control could not be loaded because it is from an invalid class

To generate node widgets a class must be created

This is my problem when packaging a project with a custom plugin

The reason for the problem: When the compiler is opened, the plug-in is loaded by default after the compiler is loaded.

Solution:

In the .uplugin file put

" LoadingPhase " : " Default "

changed to

" LoadingPhase " : " PreDefault "

It means that the loading order of the plug-ins is mentioned before the compiler is loaded, so that this problem can be solved.

.Net Core 5.0 Upload File limit via Swagger Api report error: error: request entity too large [Three Methods]

.Net Core 5.0 The size of the uploaded file through the Swagger Api is limited, report the error: error: request entity too large

 

Solution:

1. Add the following code in Startup

public void ConfigureServices(IServiceCollection services)
{
    services.Configure<FormOptions>(options =>
    {
        // Set the limit to 256 MB
        options.MultipartBodyLengthLimit = 268435456;
    });
}

2. Add in Program

public static IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args)
        .ConfigureWebHostDefaults(webBuilder =>
        {
            webBuilder.ConfigureKestrel((context, options) =>
            {
                // Handle requests up to 50 MB
                options.Limits.MaxRequestBodySize = 52428800;
            })
            .UseStartup<Startup>();
        });

3. Add the method of adding features in the operation method

// Handle requests up to 50 MB
[RequestSizeLimit(52428800)]
public ActionResult<ResultDto<bool>> AddFile()
{
    ...
}

Personally recommend the first one, and limit the case to the configuration file.

[Solved] UnsatisfiedDependencyException: Error creating bean with name

Error message:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘com.xubo.mybatisplus.MyBatisPlusTest’: Unsatisfied dependency expressed through field ‘userMapper’; of type ‘com.xubo.mybatisplus.mapper.UserMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

problem causes:

This is because mapperscan is not added to the startup class; the corresponding class cannot be scanned.
Add @MapperScan(“com…*.dao”) to the startup class; the problem is solved!

My own actual problem is to add it, but what I wrote is the path of the specific class, with the class name, so it doesn’t work, you must write the package name. Change it to the package name and start querying data successfully.

@MapperScan function : specify the package where the interface to be implemented class is located, and then all interfaces under the package will generate corresponding implementation classes after compilation
Add location: add above the Springboot startup class

The following paragraph is what I saw when I searched, and I don’t know its correctness. For more than an hour, I inadvertently researched that the location of the springboot startup class, in addition to the first principle, only scans the annotations of the same level directory and subdirectory where it is located, and at the same time the startup class is separated from the directory java by at least two layers of packages.

image-20221201211430383

How to Solve “parcel segmentation fault” Error in Linux

parcel is a very good all-in-one simple tool, which can facilitate web construction, because no problems were found when using mac to build, but when running on linux, it was
found that there was a problem, a segmentation fault occurred, and I tried a few times. There are various solutions (upgrade npm, node, yarn version) but none of them are solved, and try to use
strace information as follows

rt_sigprocmask( SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask( SIG_SETMASK, ~[ RTMIN RT_1], [], 8) = 0
read( 4, "*", 1)                          = 1
rt_sigaction( SIGIO, { sa_handler = SIG_DFL, sa_mask =[], sa_flags = SA_RESTORER, sa_restorer = 0x7eff95e58630}, NULL, 8) = 0
write( 5, "*", 1)                         = 1
rt_sigprocmask( SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask( SIG_SETMASK, ~[ RTMIN RT_1], [], 8) = 0
read( 4, "*", 1)                          = 1
rt_sigaction( SIGPWR, { sa_handler = SIG_DFL, sa_mask =[], sa_flags = SA_RESTORER, sa_restorer = 0x7eff95e58630}, NULL, 8) = 0
write( 5, "*", 1)                         = 1
rt_sigprocmask( SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask( SIG_SETMASK, ~[ RTMIN RT_1], [], 8) = 0
read( 4, "*", 1)                          = 1
rt_sigaction( SIGSTKFLT, { sa_handler = SIG_DFL, sa_mask =[], sa_flags = SA_RESTORER, sa_restorer = 0x7eff95e58630}, NULL, 8) = 0
write( 5, "*", 1)                         = 1
rt_sigprocmask( SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask( SIG_SETMASK, ~[ RTMIN RT_1], [], 8) = 0
read( 4, "*", 1)                          = 1
rt_sigaction( SIGSYS, { sa_handler = SIG_DFL, sa_mask =[], sa_flags = SA_RESTORER, sa_restorer = 0x7eff95e58630}, NULL, 8) = 0
write( 5, "*", 1)                         = 1
rt_sigprocmask( SIG_SETMASK, [], NULL, 8) = 0
write( 17, "", 0)                         = 0
futex( 0x306c80c, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, 0x306c7e0, 100) = 4
write( 12, "\1\0\0\0\0\0\0\0", 8)         = 8
futex( 0x7eff95a7a9d0, FUTEX_WAIT, 30173, NULL) = - 1 EAGAIN ( Resource temporarily unavailable)
munmap( 0x7eff9527a000, 8392704)          = 0
epoll_ctl( 3, EPOLL_CTL_ADD, 6, { EPOLLIN, { u32 = 6, u64 = 6 } } ) = 0
epoll_ctl( 3, EPOLL_CTL_ADD, 8, { EPOLLIN, { u32 = 8, u64 = 8 } } ) = 0
epoll_wait( 3, [], 1024, 0)               = 0
close( 6)                                 = 0
close( 7)                                 = 0
close( 8)                                 = 0
close( 3)                                 = 0
fstat( 0, { st_mode = S_IFCHR | 0620, st_rdev = makedev( 136, 0), ...}) = 0
fcntl( 0, F_GETFL)                        = 0x8002 ( flags O_RDWR | O_LARGEFILE)
rt_sigprocmask( SIG_BLOCK, [ TTOU], NULL, 8) = 0
ioctl( 0, SNDCTL_TMR_START or TCSETS, { B38400 opost isig icanon echo ...}) = 0
ioctl( 0, TCGETS, { B38400 opost isig icanon echo ... }) = 0
rt_sigprocmask( SIG_UNBLOCK, [ TTOU], NULL, 8) = 0
fstat( 1, { st_mode = S_IFCHR | 0620, st_rdev = makedev( 136, 0), ...}) = 0
fcntl( 1, F_GETFL)                        = 0x8002 ( flags O_RDWR | O_LARGEFILE)
rt_sigprocmask( SIG_BLOCK, [ TTOU], NULL, 8) = 0
ioctl( 1, SNDCTL_TMR_START or TCSETS, { B38400 opost isig icanon echo ...}) = 0
ioctl( 1, TCGETS, { B38400 opost isig icanon echo ... }) = 0
rt_sigprocmask( SIG_UNBLOCK, [ TTOU], NULL, 8) = 0
fstat( 2, { st_mode = S_IFCHR | 0620, st_rdev = makedev( 136, 0), ...}) = 0
fcntl( 2, F_GETFL)                        = 0x8002 ( flags O_RDWR | O_LARGEFILE)
rt_sigprocmask( SIG_BLOCK, [ TTOU], NULL, 8) = 0
ioctl( 2, SNDCTL_TMR_START or TCSETS, { B38400 opost isig icanon echo ...}) = 0
ioctl( 2, TCGETS, { B38400 opost isig icanon echo ... }) = 0
rt_sigprocmask( SIG_UNBLOCK, [ TTOU], NULL, 8) = 0
close( 4)                                 = 0
close( 5)                                 = 0
# There will be exception information here
futex( 0x2c97aa4, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x2c97aa0, FUTEX_OP_SET << 28 | 0 << 12 | FUTEX_OP_CMP_GT << 24 | 0x1) = 1
futex( 0x2c97a60, FUTEX_WAKE_PRIVATE, 1) = 1
futex( 0x7eff8effd9d0, FUTEX_WAIT, 30179, NULL) = 0
munmap( 0x7eff94a79000, 8392704)          = 0
munmap( 0x7eff94278000, 8392704)          = 0
munmap( 0x7eff8f7ff000, 8392704)          = 0
munmap( 0x7eff8effe000, 8392704)          = 0
exit_group( 0)                            = ?
+++ exited with 0 +++

The discovery is not very clear, and the trace information of perf is used as follows

1340.638 ( 43.568 ms): node / 30376   ... [ continued]: futex()) = 0
  1384.214 ( 0.008 ms): node / 30376 futex( uaddr: 0x2c97aa4, op: WAKE_OP | PRIV, val: 1, utime: 0x1, uaddr2: 0x2c97aa0, val3: 0x4000001d) = 1
  1384.226 ( 0.003 ms): node / 30376 futex( uaddr: 0x2c97a60, op: WAKE | PRIV, val: 1 ) = 0
  1384.236 ( 0.009 ms): node / 30376 madvise( start: 0x7f096e8db000, len_in: 8368128, behavior: MADV_DONTNEED) = 0
  1384.249( ): node / 30376 exit( )
  1340.722 ( 43.609 ms): node / 30378   ... [ continued]: futex()) = 0
  1384.337 ( 0.006 ms): node / 30378 futex( uaddr: 0x2c97aa4, op: WAKE_OP | PRIV, val: 1, utime: 0x1, uaddr2: 0x2c97aa0, val3: 0x4000001d) = 1
  1384.346 ( 0.003 ms): node / 30378 futex( uaddr: 0x2c97a60, op: WAKE | PRIV, val: 1 ) = 0
  1384.354 ( 0.007 ms): node / 30378 madvise( start: 0x7f096d8d9000, len_in: 8368128, behavior: MADV_DONTNEED) = 0
  1384.364( ): node / 30378 exit( )
  1341.178 ( 43.235 ms): node / 30377   ... [ continued]: futex()) = 0
  1384.417 ( 0.012 ms): node / 30377 futex( uaddr: 0x2c97aa4, op: WAKE_OP | PRIV, val: 1, utime: 0x1, uaddr2: 0x2c97aa0, val3: 0x4000001d) = 1
  1384.432 ( 0.003 ms): node / 30377 futex( uaddr: 0x2c97a60, op: WAKE | PRIV, val: 1 ) = 0
  1384.439 ( 0.005 ms): node / 30377 madvise( start: 0x7f096e0da000, len_in: 8368128, behavior: MADV_DONTNEED) = 0
  1384.447( ): node / 30377 exit( )
   307.570 ( 1077.301 ms): node / 30373   ... [ continued]: futex()) = - 1 ( unknown) INTERNAL ERROR: strerror_r( 512, [ buf], 128) = 22
         ? ( ​​): node / 30355   ... [ continued]: epoll_wait()) = 1
  1402.290 ( 0.004 ms): node / 30355 read( fd: 12, buf: 0x7fc200eaa8d0, count: 1024 ) = 8
  1402.305 ( 0.003 ms ): node / 30355 close( fd: 10 ) = 0
  1402.314 ( 0.002 ms): node / 30355 close( fd: 11 ) = 0
  1402.324 ( 0.002 ms): node / 30355 close( fd: 12) = 0
  1402.331 ( 0.002 ms ): node / 30355 close( fd: 9 ) = 0
  1402.341 ( 0.007 ms): node / 30355 madvise( start: 0x7fc2006ae000, len_in: 8368128, behavior: MADV_DONTNEED) = 0
  1402.351( ): node / 30355 exit( )
   281.999 ( 1121.739 ms): node / 30362   ... [ continued]: futex()) = 0
  1403.750 ( 0.008 ms): node / 30362 futex( uaddr: 0x2c97aa4, op: WAKE_OP | PRIV, val: 1, utime: 0x1, uaddr2: 0x2c97aa0, val3: 0x4000001d) = 1
  1403.760 ( 0.002 ms): node / 30362 futex( uaddr: 0x2c97a60, op: WAKE | PRIV, val: 1 ) = 0
  1403.766 ( 0.004 ms): node / 30362 madvise( start: 0x7fc1f8ffa000, len_in: 8368128, behavior: MADV_DONTNEED) = 0
  1403.772( ): node / 30362 exit( )
   282.093 ( 1121.731 ms): node / 30364   ... [ continued]: futex()) = 0
  1403.831 ( 0.009 ms): node / 30364 futex( uaddr: 0x2c97aa4, op: WAKE_OP | PRIV, val: 1, utime: 0x1, uaddr2: 0x2c97aa0, val3: 0x4000001d) = 1
  1403.842 ( 0.002 ms): node / 30364 futex( uaddr: 0x2c97a60, op: WAKE | PRIV, val: 1 ) = 0
  1403.846 ( 0.004 ms): node / 30364 madvise( start: 0x7fc1eb7ff000, len_in: 8368128, behavior: MADV_DONTNEED) = 0
  1403.852( ): node / 30364 exit( )
    13.769 ( 1390.637 ms): node / 30360   ... [ continued]: futex()) = - 1 ( unknown) INTERNAL ERROR: strerror_r( 512, [ buf], 128) = 22

I saw some things but I am still not sure how to solve it. Then I searched the github issue and found a lot of similar problems. From the description, the source-map plugin is related to the integration of rust

Solution

Very simple, the temporary solution is to add environment variables PARCEL_WORKER_BACKEND=processThe problem is temporarily solved, rust is good, but there is also a problem with rust and external integration (
many extensions of parcel use rust extensions)

References

https://github.com/parcel-bundler/parcel/issues/7598
https://github.com/parcel-bundler/source-map/pull/91

Docker: How to Enter the Closed Container and View the Logging

During the development process, especially when debugging the code, there will always be a situation where the Dockerfile or application exception causes the application to fail to start.
At this point, you want to go inside the container and see what’s going on.
At this time, I want to use docker exec -it Container_name bash it to enter the container normally, but Error response from daemon: Container baa1e5…… is not runningan exception will occur.

solution

View the container ID that needs to be entered

# View all container processes
docker ps -a 
# Copy the ID of this unbootable container
baa1e5

Save the abnormally started container as an image

# Here is a random mirror name
docker commit baa1e5 temp/test

Start a new container to view the log of the startup process

docker run -it temp/test sh

[Solved] Using `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables. Valid values are “development”, “test”, and “production”. Instead, received: undefined.

Running webpack gives the following error:

 

 The reason for the bug is:

The environment variable is not configured properly. Although the mode: ‘development’ configuration item is configured in webpack.dev.js, this environment variable is the environment variable for code running, not the environment variable for babel running, so it needs to be defined.

solution:

// Download cross-env. A library dedicated to defining environment variables 
npm install --save-dev cross- env

// Add the configuration in front of the webpage running command 
in package.json
 "scripts" : {
     "start": "npm run dev" ,
     "dev": " cross-env NODE_ENV=development webpack serve --config ./config /webpack.dev.js" 
 },

git submodule add Error: SSL certificate problem unable to get local issuer certificate

Errors encountered when using hugo and installing themesSSL certificate problem: unable to get local issuer certificate

(base) PS E:\vscodeProject\chz8bit.github.io\quickstart> git submodule add https://github.com/nanxiaobei/hugo-paper themes/paper
Cloning into 'E:/vscodeProject/chz8bit.github.io/quickstart/themes/paper'...
fatal: unable to access 'https://github.com/nanxiaobei/hugo-paper/': SSL certificate problem: unable to get local issuer certificate
fatal: clone of 'https://github.com/nanxiaobei/hugo-paper' into submodule path 'E:/vscodeProject/chz8bit.github.io/quickstart/themes/paper' failed

 

Solved the problem with the following link
How do I configure Git to trust certificates from the Windows Certificate Store? – Stack Overflow
Cant clone from GitHub : SSL certificate problem: unable to get local issuer certificate Issue #9293 desktop/desktop
Personally, I think it is mainly this line of code, and there is a corresponding explanation https://github.com/desktop/desktop/issues/9293#issuecomment-607357181

git config --global http.sslBackend schannel

The last run was successful

(base) PS E:\vscodeProject\chz8bit.github.io\quickstart> git submodule add https://github.com/nanxiaobei/hugo-paper themes/paper
Cloning into 'E:/vscodeProject/chz8bit.github.io/quickstart/themes/paper'...
remote: Enumerating objects: 1594, done.
remote: Counting objects: 100% (731/731), done.
remote: Compressing objects: 100% (402/402), done.
remote: Total 1594 (delta 361), reused 404 (delta 327), pack-reused 863 eceiving objects: 100% (1594/1594), 5.46 MiB | 445.00 KiB/s
Receiving objects: 100% (1594/1594), 5.50 MiB | 368.00 KiB/s, done.
Resolving deltas: 100% (750/750), done.
starting fsmonitor-daemon in 'E:/vscodeProject/chz8bit.github.io/quickstart/themes/paper'

 

Android7.0+ Failed to Share Images: exposed beyond app through ClipData.Item.getUri()

In Android 7.0 and above, the error exposed beyond app through ClipData.Item.getUri() occurs when sharing image files

reason

In fact, it is because of the problem caused by the Uri path enabled in versions 7.0 and above that we are not allowed to use file://it, only allowed to use content://it. We need to do the adaptation of FileProvider to solve this problem, or it will be simple and rude, and directly verify this to the close Lose

Solution (turn off the verification of uri)

StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
builder.detectFileUriExposure();

Write the above code in the application

Solution (adapted to FileProvider)

Create an xml folder in res (if the folder already exists, skip this step), create a file named myfileprovider.xml(the name can be arbitrary)

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="external_files" path="." />
</paths>

After that, declare this Provider in AndroidManifest.xml (the following code only needs to change the values ​​in the authorities and resources)

<application>
  ...
     <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="site.starsone.demo.fileprovider"
        android:exported="false"
        android:grantUriPermissions="true">
        <!-- ressource file to create -->
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/myfileprovider">  
        </meta-data>
    </provider>
</application>

Finally, when building the uri of the image file, use the following method to build (you can add a version judgment by the way, and use this method to build the Uri for Android 7.0 and above)

Uri imageUri = FileProvider.getUriForFile(
    MainActivity.this,
    "site.starsone.demo.provider", //(Use your package name+“.provider" )
    imageFile);

PS: The third parameter above is actually the authoritiesproperty defined by Provider in AndroidMainfest