[Solved] Unity Error: Assertion failed on expression: ‘IsMatrixValid(matrix)‘…

Problem description:

I get an error when running the Interaction_Example of steam VR, and the running screen is a black screen, where unity is 2021.3.6f1c1, steam VR(2.7.3), steamvrSDK( 1.23.7), The headset is HTC Vive pro2. The specific content of the error is as follows:

Assertion failed on expression: 'IsMatrixValid(matrix)'
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Screen position out of view frustum (screen pos 0.000000, 0.000000, 300.000000) (Camera rect 0 0 0 0)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

 

Problem Solving:

Click Edit->Project Settings…->XR Plug-in Management->OpenVR and set Stereo Rendering Mode to Multi Pass.

[Solved] PHP Error: Warning: file_get_contents(): Failed to enable crypto

I. Description
file_get_contents() error when reading https content

II. Reason
Local service is not configured ssl certificate, can not get the contents of the path to https

III. Solution
1, Linux server configuration https ssl certificate.
Linux server configuration https ssl certificate.
2. curl_ request to obtain the content (see the following method curlGet ())

    /**
     * get the content
     * @param $url
     * @return bool|string
     */
    function curlGet($url)
    {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36');
        curl_setopt($ch, CURLOPT_TIMEOUT, 30);
        $content = curl_exec($ch);
        curl_close($ch);
        return ($content);
    }

3.Use file_get_contents() function to skip https authentication

        $streamOpts = [
            'ssl' => [
                'verify_peer' => false,
                'verify_peer_name' => false
            ]
        ];
        $html = file_get_contents($pageUrl, false, stream_context_create($streamOpts));

[Solved] org.springframework.context.ApplicationContextException: Failed to start bean ‘org.springframework.a

Error

org.springframework .context.ApplicationContextException: Failed to start bean &#39 ;org.springframework.amqp.rabbit.config.internalRabbitListenerEndpointRegistry'; nested exception is org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup

Errors reported when using RabbitMq to test switches and queues

Think hard

At first I thought it was the queue’s listener configuration information and listener code that were written wrong,I checked it repeatedly and there was no error.
Then continue to read the error ,there are these two errors,instant epiphany.

Caused by: org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
Caused by: org.springframework.amqp. AmqpAuthenticationException: com. rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED

Suddenly realized

ACCESS_REFUSEDSuch a big word, I read it several times, but I didn’t expect this error, It is probably the wrong copy when configuring the password

spring:
  rabbitmq:
    host: 192.168.149.128
    port: 5672
    virtual-host: /hotel
    username: hotel
    password: hotel

hotel was resolutely written as guest

Ok, change the password, successfully run, also warn everyone to be careful!!!

idea Error: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource

Error:

在这里插入图片描述
Error Message:

APPLICATION FAILED TO START
***************************

Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class


Action:

Consider the following:
	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
	If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).


Solution:- [ ] List item
Just check the nacos port and change it to the port used by the project you are running.

[Solved] Message from debugger: debug-server is x86_64 binary running in translation, attached failed.

After transferring an Xcode project from an Intel Mac to an Apple M1 chip, code compiles successfully on the M1 chip, but displays the following error at runtime:

Message from debugger: debug-server is x86_64 binary running in translation, attached failed.

insert image description here

Solution:

I have checked Xcode’s “Open with Rosettea” option, but it still doesn’t work successfully on the M1 chip. So this program doesn’t work for me. . .
insert image description here
Valid solutions:
Find Edit Scheme -> Run -> Debug excitable, Cancel this option to run successfully.
insert image description here
Note: If this method fails to Solve your problem, Please refer to the link below:
debugserver is x86_64 binary running in translation, attached failed. Could not attach to pid

error in ./node_modules/@lit/reactive-element/decorators/state.jsModule parse failed: Unexpected

Recently developed an old project, I found that the project that was good before is now running an error, Various switching of npm sources and node versions does not work, Google did not find relevant information, The error is as follows:

 error  in ./node_modules/@lit/reactive-element/decorators/state.js

Module parse failed: Unexpected token (6:27)
You may need an appropriate loader to handle this file type.
|  * Copyright 2017 Google LLC
|  * SPDX-License-Identifier: BSD-3-Clause
|  */function t(t){return r({...t,state:!0})}export{t as state};
| //# sourceMappingURL=state.js.map

It says that the current file cannot be processed.

 error in ./node_modules/@lit/reactive-element/decorators/state.js

Module parse failed: Unexpected token (6:27)
You may need an appropriate loader to handle this file type.
| * Copyright 2017 Google LLC
| * SPDX-License-Identifier: BSD-3-Clause
| */function t(t){return r({...t,state:!0})}export{t as state};
| //# sourceMappingURL=state.js.map
| 

It is found that the file under the @lit module reports an error, click on the details and find that the source file here, is not es5 syntax.

Look at the version number in package.json, the ^ is used, which means that this module can be automatically minor version upgrade. Guess it should be that the module is automatically upgraded, causing some incompatibility so an error is reported,

Finally, I found that the project is configured with, babel parsing, this plugin outputs es6 code, needs to be compiled with bable.

 {
        test: /\.js$/,
        loader: 'babel-loader',
        include: [
          [resolve('src'), resolve('/node_modules/[email protected]')]
        ],
      }

See the error message is ./node_modules/@lit/reactive-element , the original path of the new version was changed to @lit,The old version is [email protected] So there is no bable parsing, resulting in an error. After the following modification, a new parsing path has been added, The problem has been solved.

 {
        test: /\.js$/,
        loader: 'babel-loader',
        include: [
          [resolve('src'), resolve('/node_modules/[email protected]'), resolve('/node_modules/@lit') ]
        ],
      }

Failed to register bundle identifier. The app identifier “xxx” cannot be registered to your developm

Error

Failed to register bundle identifier. The app identifier “xxx” cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.

Provisioning profile “iOS Team Provisioning Profile: *” doesn’t support the Associated Domains and Push Notifications capability.

Provisioning profile “iOS Team Provisioning Profile: *” doesn’t include the aps-environment and com.apple.developer.associated-domains entitlements.

Please add picture description

Solution:

Log in to Xcode with the apple account that supports the APP, and select the team where the account is locatedPlease add a picture description

As shown in the picture, Select the team corresponding to the account
Please add a picture description

How to Solve Image Upload Error: Uncaught (in promise) DOMException: Failed to execute ‘put‘ on ‘IDBObjectStore‘

I encountered a small problem in a recent project,when the system uploads pictures on the front-end page,the background reports 400 errors: Uncaught (in promise) DOMException: Failed to execute ‘put’ on ‘IDBObjectStore ‘: HTMLInputElement object could not be cloned.

Investigation ideas

  1. Analyze from the error 400,http status code is 400,bad request means it is a bad request,invalid hostname means the domain name does not exist. The cause of 400 is generally:
  • The field name or field type of the data submitted by the front-end is inconsistent with the entity class of the back-end, which cannot be encapsulated.
  • The data submitted by the front-end to the back-end should be of json string type, and the front-end has no conversion type.
    Since the back-end interface uses File to receive the picture, the file transmitted by the front-end through the form form, obviously has nothing to do with the parameter type.
  1. So breakpoint debugging at the Controller layer, found that the request did not enter the breakpoint at all, This is a bit strange.
    Roll back the code and repackage it for deployment, This picture can be uploaded normally.
  2. Change my way of thinking to find the answer from the code submission records, I browsed carefully, I found that a colleague submitted a filter, This is a bit relevant, Immediately click in to see the source code. After viewing, it was found that a filter, was added for the POST request, and the file stream was not excluded in the filte, which resulted in the file upload request being directly filtered out.

Solution

Exclude specific requested URLs in SpringBoot filters, example below:

@WebFilter(urlPatterns = "/*")
@Order(value = 1)
public class TestFilter implements Filter {
  
    private static final Set EXCLUDED_PATHS = Collections.unmodifiableSet(new HashSet(
            Arrays.asList("/login", "/register")));
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        //init filter
    }
  
    @Override
    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
        HttpServletRequest request = (HttpServletRequest) req;
        HttpServletResponse response = (HttpServletResponse) res;
        String path = request.getRequestURI().substring(request.getContextPath().length()).replaceAll("[/]+$", "&# 34;);
        boolean excludedPath = EXCLUDED_PATHS.contains(path);
  
        if (excludedPath) {
            // Exclude URLs that do not need filtering
            chain.doFilter(req, res);
        } else {
            // URL that needs to be filtered
            // TODO
        }
    }
  
    @Override
    public void destroy() {
        // destroy filter
    }
}