Author Archives: Robins

[Solved] mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No s

After mongodb is installed, mongod reports the following error:

mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

Solution:

# Switch to the lib directory
cd ~/.conda/envs/my_gdal/lib # my_gdal:virtual environment
# Check if the file exists
ls -lh | grep "libcrypto.so.1.1"
-rwxrwxrwx 1 root root 3.2M Jun 4 15:43 libcrypto.so.1.1
# If the file exists execute
sudo ldconfig ~/.conda/envs/my_gdal/lib
# If the file does not exist
sudo find/-name 'libcrypto.so.1.1'
# Execute: sudo ldconfig path found
sudo ldconfig ~/.conda/pkgs/openssl-1.1.1q-h7f8727e_0/lib/

Error in nextTick: “TypeError: Cannot set properties of undefined (setting ‘checked‘)“

Error in nextTick: “TypeError: Cannot set properties of undefined (setting ‘checked‘)“

When you see nextTick, do you think of $nextTick?

This is exactly the kind of error that needs to be solved by using $nextTick

Vue performs asynchronously when updating the DOM. As soon as a data change is heard, Vue will open a queue and buffer all the data changes that occur in the same event loop, which means that a value assigned by vue will not take effect immediately, but will be updated when the next event is triggered. callback)

$nextTick is a delayed callback that is executed after the next DOM update loop. If you use $nextTick after modifying the data, you can get the updated DOM in the callback

[Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory

 

1. Error reporting

“Cannot open include file:” StdAfx. H “: no such file or directory”

The error here is that you included the header file # include generated by “StdAfx.h”. Presumably, you created an empty project but included this header file.

2. Solution

Method 1
replace the header file (this method is recommended, which is simpler); The contents of “StdAfx.h” are:

#include < stdio.h>
#include < tchar.h>
just delete your # include “StdAfx.h” here. Replace with what it contains. Namely:

#include < stdio.h>
#include < tchar.h>

method 2:
in your project, find the header file and add a header file named StdAfx.h: After adding successfully, click and add content:

#include < stdio.h>
#include < tchar.h>
save, compile again, and resolve the error~

 

[Solved] Error in event handler for “el.form.blur“: “RangeError: Maximum call stack size exceeded“

The following errors were encountered during form verification; This error will be reported when you lose focus or click to verify

If you look at the examples in the ElementUI document, you will find that they implement custom rules, setTimeout is used to limit the number of times the rules are called. In your case, once the field has a value (ergo, if is false), your else block will be executed again and again until it exceeds the maximum call stack size. You can solve this problem by restricting calls to custom rules

From: Javascript – understanding why element UI event handlers are triggering rangeerror: maximum call stack size exceeded- Stack Overflow

[Solved] Error: unable to perform an operation on node ‘rabbit@DESKTOP-xxx‘. Please see diagnostics informa

1. Recurrence problem

Today, I logged in to the rabbitmq background management. After inputting the user name and password, this error was reported: not management user, as shown in the following figure:

So I decided to execute the command rabbitmqctl list_users check whether there is this user.

  1. First D:\Software\rabbitmq\rabbitmq_server-3.8.15\sbinenter in the directory cmd:

  1. Execute the following command in the cmdcommand window:
rabbitmqctl list_users

But the following error is reported:

D:\Software\rabbitmq\rabbitmq_server-3.8.15\sbin>rabbitmqctl list_users
Error: unable to perform an operation on node 'rabbit@DESKTOP-UVTEHFR'. Please see diagnostics information and suggestions below.

Most common reasons for this are:

 * Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
 * CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
 * Target node is not running

In addition to the diagnostics info below:

 * See the CLI, clustering and networking guides on https://rabbitmq.com/documentation.html to learn more
 * Consult server logs on node rabbit@DESKTOP-UVTEHFR
 * If target node is configured to use long node names, don't forget to use --longnames with CLI tools

DIAGNOSTICS
===========

attempted to contact: ['rabbit@DESKTOP-UVTEHFR']

rabbit@DESKTOP-UVTEHFR:
  * connected to epmd (port 4369) on DESKTOP-UVTEHFR
  * epmd reports: node 'rabbit' not running at all
                  no other nodes on DESKTOP-UVTEHFR
  * suggestion: start the node

Current node details:
 * node name: 'rabbitmqcli-999-rabbit@DESKTOP-UVTEHFR'
 * effective user's home directory: C:\Users\zxy
 * Erlang cookie hash: pkFzX53V7Ok1QDOYqiMzXg==

3. Solving problems

Copy the .erlang.cookie file from the C:\user\your username\ directory to the C:\Windows\System32\config\systemprofile\ directory, as follows:

If the .erlang.cookie file already exists in C:\Windows\System32\config\systemprofile\, just use the .erlang.cookie file in the C:\user\your username\ directory to replace it.

Double-click rabbitmq-server.bat to restart the rabbitmq service, as shown in the following image:


In the cmd command line window, enter rabbitmqctl list_users again:

pod install error: Oh no, an error occurred. (Ultimate Solution)

Project scenario:

There was an error in pod install recently

[!] Oh no, an error occurred.


Problem description


JSON::ParserError - 416: unexpected token at '"SharedTestUtilities/FIROptionsMock'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification.rb:748:in `from_string'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification.rb:722:in `from_file'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source.rb:188:in `specification'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/set.rb:56:in `each'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:216:in `search'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:165:in `search_for'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `each'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_by'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_by!'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:94:in `resolve'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/Users/tiger/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/Users/tiger/.rvm/gems/ruby-2.6.3/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/Users/tiger/.rvm/gems/ruby-2.6.3/bin/pod:23:in `load'
/Users/tiger/.rvm/gems/ruby-2.6.3/bin/pod:23:in `<main>'
/Users/tiger/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
/Users/tiger/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=416%3A+unexpected+token+at+%27%22SharedTestUtilities%2FFIROptionsMock%27&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new


Cause analysis:

In fact, after upgrading cocoapods, you need to clear it…


Solution:

Use this following command to clear the cache:

sudo rm -rf ~/.cocoapods/repos

npm install error code EINTEGRITY sha1 [How to Solve]

npm install error code EINTEGRITY sha1

when other environment codes are packaged into another environment, the NPM install installation dependency reports an error.

13023 error code EINTEGRITY
13024 error sha1-LgxPksfBBzrHtltHrDbWAuirTr8= integrity checksum failed when using sha1: wanted sha1-LgxPksfBBzrHtltHrDbWAuirTr8= but got sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== sha1-stEE/g2Psnz54KHNqCYt04M8bKs=.

Solution:

rm -rf node_modules package-lock.json
npm cache clean --force
npm install --verbose

[Solved] springsecurity custom exceptions: Error: Parse Error: Response overflow

preface

In the process of writing the project, using springsecurity for permission management and customizing the token filter to be added before the authentication filter, there was a problem where the exception handling mechanism of springsecurity would be called when the token expired, instead of using my global exception handling

Solution:

Custom filter

package com.fruiter.filter;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.jsonwebtoken.ExpiredJwtException;
import org.springframework.web.filter.OncePerRequestFilter;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Handling exceptions thrown by Controller will be handled by this filter
 */
public class ControllerExceptionFilter extends OncePerRequestFilter {

    @Override
    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
        try {
            filterChain.doFilter(request, response);
        } catch (ExpiredJwtException e) {
            e.printStackTrace();

            response.setStatus(401);
            response.setContentType("application/json");
            response.setCharacterEncoding("utf-8");
            response.getWriter().print("token过期");
        }
    }

    public String convertObjectToJson(Object object) throws JsonProcessingException {
        if (object == null) {
            return null;
        }
        ObjectMapper mapper = new ObjectMapper();
        return mapper.writeValueAsString(object);
    }
}

Join for management

//WebAsyncManagerIntegrationFilter is the first exception handling filter
http.addFilterBefore(new ControllerExceptionFilter(), WebAsyncManagerIntegrationFilter.class);

be careful

Here, set the status code for response, that is, response.setStatus(401);
you can’t set an excessively large number such as 10010, otherwise an error will report error: parse error: response overflow

Modify it to 401.

Error: error:0308010C:digital envelope routines::unsupported [How to Solve]

Error message:

When the front-end project is started (npm run dev) and packaged (npm run build:prod), the following error is reported:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports 
....
 
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Cause of problem:

The reason for this is that nodeJs V17 released OpenSSL3.0 with stricter restrictions on the algorithm and secret key size, which did not affect versions before nodeJs v17, but this error will occur in V17 and later versions.

Solution (windows only):

Add SET NODE_OPTIONS=--openssl-legacy-provider in the scripts of the package.json 
Before:
"scripts": {
    "dev": "vue-cli-service serve",
    "build:prod": "vue-cli-service build"
  },
  
Added:
"scripts": {
    "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
    "build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build"
  },


Note: If the node version in the team is not the same, do not submit the package.json.
My v18.8.0 does not add this directive, my colleague is v14.17.3, adding this directive will report an error

[Solved] Error occurred during initialization of VM javalangNoClassDefFoundError javalangObject

When you run java/javac/java -version under the doc command, an error was reported:

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object

 

Or eclipse cannot be opened for this reason

I summarized the following three reasons:

1: java environment variables are misconfigured, check the right and wrong environment variables, especially check the classpath

General (in the case of java configuration only), the value of the environment variable

JAVA_HOME ========= “your jdk installation directory” such as “C:Program FilesJavajdk1.8.0_121”

Path ========= “%JAVA_HOME%in;%JAVA_HOME%jrein”

CLASS_PATH ========= “%JAVA_HOME%libdt.jar;%JAVA_HOME%lib ools.jar”

2: If there is no problem with the environment variable configuration, then go to the jdk installation directory (such as C:Program FilesJavajdk1.8.0_121) and look for tools.jar under lib and rt.jar under jrelib to see if they exist, it is possible that rt.pack and tools.pack exist.

At this point, just unpack the corresponding files into rt.jar and tools.jar, and you can use the unpack200 tool inside the bin

#cd /usr/java/j2sdk1.4.2/lib
#unpack tools.pack tools.jar
#cd …/jre/lib
#…/…/unpack rt.pack rt.jar

3: There is no tools.jar under lib or rt.jar under jrelib, or there are missing files under lib or jrelib (40 files), so just copy them from elsewhere.

If you run java command after copying tools.jar or rt.jar, there may be missing files under jrelib, look carefully or just copy a whole jrelib, it can be solved.

[Solved] sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, “You have an error in your SQ

Error Messages;

sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'fromt_user' at line 1")

 

The error message is like this, which means that my SQL syntax is wrong

Today, when pandas was connecting to the MySQL database, there was an error in the last run

Source code:

from sqlalchemy import create_engine

def query(table):
    host = 'localhost'
    user = 'root'
    password = '123456'
    database = 'ConstructionDB'
    port = 3306

    conn = create_engine('mysql+pymysql://{}:{}@{}:{}/{}'.format(user, password, host, port, database))

    sql = 'select * from' + table
    results = pd.read_sql(sql, conn)
    return results

Through debugging, it is found that there is no space in the original SQL statement when it is spliced, resulting in the last syntax of SQL

sql = [select * fromt_user]

Solved it!

def query(table):
    host = 'localhost'
    user = 'root'
    password = '123456'
    database = 'ConstructionDB'
    port = 3306
    conn = create_engine('mysql+pymysql://{}:{}@{}:{}/{}'.format(user, password, host, port, database))
    sql = 'select * from' +' ' + table
    results = pd.read_sql(sql, conn)
    return results

Pay attention to the SQL statement and splice a space in the middle of the code. The problem is solved

[Solved] Android Studio Generate APK Error: error_prone_annotations.jar (com.google.errorprone:error)

Android Studio failed to generate apk error:

Could not download error_prone_annotations.jar (com.google.errorprone:error)

 

Solution:

Modify the buildscript and allprojects in build.gradle file of your project:

google()jcenter()

to

maven { url ‘https://maven.aliyun.com/repository/google’ }maven { url ‘https://maven.aliyun.com/repository/jcenter’ }maven { url ‘http://maven.aliyun.com/nexus/content/groups/public’ }

Done!