Author Archives: Robins

[Solved] NTP Sync common error: no server suitable for synchrnization found

Project Scene:

Environment centos7.9


Problem description

Set a server as ntp server. The other is the client. Found an error. no server suitable for synchrnization found

Use: ntpdate -d 10.143.33.50

View the error

xxx.xxx.xxx.xxx: Server dropped: no data

Appears again during debugging

xxx.xxx.xxx.xxx: server dropped: strata too high


Cause Analysis:

1. Keepalived was originally installed on the server. I thought it was because of this effect. After closing it, the problem is still there.

2,–check from the server side
[root@timeserver ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
210.72.145.44 .ACTS. 1 u 971 8 0 0.000 0.000 0.000
202.120.2.101 .INIT. 10 u 8 64 377 0.000 0.000 0.000

Viewing is normal.

3, there may be network reasons

4. From the data, it is also related to conf. configuration , configuration such as restrict


Solution:

1. Make sure port 123 is connected

2. Modify the server configuration (202.120.2.101 This is the synchronization server)

vim /etc/ntp.conf

restrict default nomodify notrap noquery
restrict 127.0.0.1
server 202.120.2.101 prefer
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /var /lib/ntp/drift
keys /etc/ntp/keys

3. Restart ntpd on the server side

service ntpd restart

[Solved] Mac Notebook M1 Chip Install Hashlips library npm error

Mac notebook M1 chip installs Hashlips library npm error problem

Foreword

When generating NFT, we often prepare all the materials needed for NFT, and then stack each material on the same canvas to generate an NFT, but if we manually It’s too troublesome to stack one by one, because NFTs are often issued in thousands of ten thousand, so manual generation is unrealistic, So what can we do to generate It, Is to use the computer, There are many similar tools on the Internet, There are graphical and pure code, And many use Paython to generate NFT, But there is a node abroad The script tool Hashlips can directly use node to generate, and it is very convenient and powerful to use, There was no problem when using the windows system before, After changing the MBP later, I found that Hashlips reported an error when executing npm install

image-20220913144839078

Cause Analysis

After various searches and research, I found that Hashlip is implemented with canvas canvas, Then I touched the node-canvas library, There is a very similar problem in the issue of this library, which probably means that the Mac with m1 chip cannot directly use npm to install the library to node-canvas, You need to use Homebrewto install what you need.

image-20220913145139869

Solution

Official solution

In fact, both node-canvas and hasllips have released solutions one after another,The solution is actually the same,The following is hasllips The method approved in the official issue

The correct method is as follows:

1. Download and install Node.js "Current" version, as opposed to the "LTS" (Long Term Support) version. This is now v18.0.0 as of the time of this post , but 17.x will work as well:
2. Ensure you have homebrew installed. You can go to or just use this command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install .sh)" to install Homebrew.
3. Install the dependencies via Homebrew using this command: arch -arm64 brew install pkg-config cairo pango jpeg giflib librsvg
4. In your root folder for the art engine project, install the project: npm install

The correct way is as follows:

1. Download and install the latest version of Node.js , instead of the "LTS" (Long Term Support) version.
2. Install Homebrew.
3. Install dependencies via Homebrew using the following command :arch -arm64 brew install pkg-config cairo pango jpeg giflib librsvg
4. In the root folder of your art engine project ,install the project:npm install

My solution

Combined with the above solution, The landlord did not upgrade the node version to the latest version, but used the LTS long-term support version of Node16.6, then Directly use Homebrew to execute the command brew install pkg-config cairo pango libpng jpeg giflib librsvg pixmaninstall

Wait for the above installation to complete,npm install or yarn install directly in the project

[Solved] Axis Failed to Import webService: No support for attachments

The client generated by Axis, Error when importing webService:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.RuntimeException: No support for attachments
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.RuntimeException: No support for attachments
at org.apache.axis.Message.setup(Message.java:372)
at org.apache.axis.Message.<init>(Message.java:235)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:779)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)

Problem Reason

Missing jars: mail.jar and activation.jar

Solution

Introduce dependencies



    javax.mail
    mail
    1.4.7



    javax.activation
    activation
    1.1.1

[Solved] Vscode1.71.0 terminal error: `sed: illegal option — r`

Problem description

In the Mac environment, the terminal that comes with Vscode will show a sed prompt no matter what command it is.,There is no problem with using the built-in terminal

$ echo 'hi'
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ... ]
hi

System Environment

# system version
$sw_vers

ProductName: Mac OS X
ProductVersion: 10.14.4
BuildVersion: 18E2035

# vscode version
$ code -v
1.71.0
784b0177c56c607789f9638da7b6bf3230d47a8c
x64

Solution

Refer to the issue for a good solution to this problem

The official website also said that this problem will be fixed in the next version

Modify file /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh

Replace line 125

# __vsc_current_command="$(builtin history 1 | sed -r 's/ *[0 -9]+ +//')"
__vsc_current_command="$(builtin history 1 | sed -E 's/ *[0-9]+ +//')"

How to Solve Xcode 14 Pod Signature Error

Background:

After pod install with Xcode 14, If there are bundle resource files in the library, an error will be reported during compilation, error: “igning for “xxxxx” requires a development team. Select a development team in the Signing & Capabilities editor.”

Solution:

Option 1:
Set the bundle identifier and team for the pod library that reported the error one by one.

Disadvantages: Our configuration will disappear after each execution of pod install, Need to manually set it again

Option 2:

Add the following configuration in Podfile, add and then re-pod update

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings["DEVELOPMENT_TEAM"] = " Your Team ID &# 34;
         end
    end
  end
end

If you don’t want to set a specific team ID, try the following configuration:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" 
      target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
    end
  end
end

The above solution comes from: https://github.com/CocoaPods/CocoaPods/issues/11402

[Solved] KeyCloak users check their profile error: “failed to initialize keycloak”

Whether it is an administrator, or a newly added Realm user, after logging in, checking your own account, will report the error failed to initialize keycloak, and cannot borrow KeyCloak The interface can modify the password and update personal information by itself.

Solution:

Modify the web orgine whose client name is account-console, add *

Refer to here

[Solved] Android Compile and Package Error: Invalid keystore format

Problem description

Running an old open source project, compiles the following error.

java.io.IOException: Invalid keystore format
Execution failed for task ':app:transformDexWithInstantRunDependenciesApkForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\a do\.android\debug.keystore": Invalide keystore format

Solution

According to the error message, there is a problem with the debug signature format.

We only need to open the c drive, in the current user’s directory, there is a .android directory, delete the debug.keystore inside.

If it prompts that the process is occupied, exit Android Studio first. Then delete it again.

Finally re-running the project, will automatically generate debug.keystore.

How to Solve UE4 packaging Android error

UE4 packaging Android error reporting solution

Error:

insert picture description here

The error is as above

Workaround:

1. Find the UE installation directory UE_4.26\Engine\Extras\Android such as :

E:\UE4\UE4An\UE_4.26\Engine\Extras\Android

2. Start the SetupAndroid.bat file in this directory

insert picture description here

3. The file starts to download sdk, According to the download prompt, you can know the sdk download directory.

insert picture description here

4. Open UE, in the project settings ProjectSettings to Android SDK to configure the SDK corresponding to the download in the previous step, in which, NDK is also in the download directory, jdk can use 1.8.0

insert picture description here

5. Package successfully

insert picture description here

dtype=np.int error: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`.

There is a line of code c = np.fromfile(“b.dat”, dtype=np.int, sep=”,”) when running Error,The content is as follows:

DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20 .0-notes.html#deprecations
c = np.fromfile(“b.dat”, dtype=np.int, sep=”,”)

Reason: numpy1.20 has deprecated np.int, checked my version

The numpy version has reached 1.23.2

Solution: Change to np.int16/np.int32 directly to specific bytes or change to np.int_

Run again, problem-solved!

 

[Solved] JNI Error: Fatal signal 11 (SIGSEGV)

2022-09-14 09:19:01.092 3562-3580/com.derry.opengl A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x24 in tid 3580 (GLThread 103) 

I often encounter this kind of error report, making me very bummed.

I tried a solution (rooted phone or emulator, otherwise the error log file can not be found): 1.

1. find the file where the logs are located: data/tombstones

2. Find the file with this latest date

3. save the file to the desktop (I did not encounter problems with permissions using the emulator, so I can export directly) If you encounter insufficient permissions, you need to use su superuser permissions (chmod 777 xxxxx)

4. open the log file: there are error logs inside (this point is not enough permissions for me) specific analysis of the problem, this point is mainly to explain how to view this log file

--------- log main 09-14 09:18:58.184 3562 3562 D : houdini no need remount 09-14 09:18:58.201 3562 3562 I art : Late-enabling -Xcheck:jni 09-14 09:18:58.236 3562 3562 E libnb : load libnb 09-14 09:18:58.252 3562 3562 D houdini : [3562] Initialize library(version: 7.1.1b_x.49852 RELEASE)... successfully. 09-14 09:18:58.254 3562 3562 W art : Unexpected CPU variant for X86 using defaults: x86 09-14 09:18:58.719 3562 3562 W art : Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 09-14 09:18:58.782 3562 3562 I art : Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 09-14 09:18:58.783 3562 3562 I art : at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2341) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.widget.ActionBarContainer.(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Constructor.newInstance0!( java.lang.Object[]) (Constructor.java:-2) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727) 09-14 09:18:58.783 3562 3562 I art : at void android.view.LayoutInflater.rInflate(org.xmlpull.v1. XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858) 09-14 09:18:58.783 3562 3562 I art : at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1. XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1. XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377) 09-14 09:18:58.783 3562 3562 I art : at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 09-14 09:18:58.783 3562 3562 I art : at void com.derry.opengl.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:19) 09-14 09:18:58.783 3562 3562 I art : at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6692) 09-14 09:18:58.783 3562 3562 I art : at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118) 09-14 09:18:58.783 3562 3562 I art : at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2621) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2729) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1480) 09-14 09:18:58.783 3562 3562 I art : at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) 09-14 09:18:58.783 3562 3562 I art : at void android.os.Looper.loop() (Looper.java:154) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6176) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Method.invoke!( java.lang.Object, java.lang.Object[]) (Method.java:-2) 09-14 09:18:58.783 3562 3562 I art : at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:893) 09-14 09:18:58.783 3562 3562 I art : at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:783) 09-14 09:18:58.783 3562 3562 I art : Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.derry.opengl-1/base.apk"],nativeLibraryDirectories=[/data/app/com.derry.opengl-1/lib/arm, /data/app/com.derry.opengl-1/base.apk! /lib/armeabi-v7a, /system/lib, /vendor/lib]] 09-14 09:18:58.783 3562 3562 I art : at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 09-14 09:18:58.783 3562 3562 I art : at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2341) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.widget.ActionBarContainer.(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Constructor.newInstance0!( java.lang.Object[]) (Constructor.java:-2) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727) 09-14 09:18:58.783 3562 3562 I art : at void android.view.LayoutInflater.rInflate(org.xmlpull.v1. XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858) 09-14 09:18:58.783 3562 3562 I art : at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1. XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1. XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426) 09-14 09:18:58.783 3562 3562 I art : at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377) 09-14 09:18:58.783 3562 3562 I art : at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 09-14 09:18:58.783 3562 3562 I art : at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 09-14 09:18:58.783 3562 3562 I art : at void com.derry.opengl.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:19) 09-14 09:18:58.783 3562 3562 I art : at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6692) 09-14 09:18:58.783 3562 3562 I art : at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118) 09-14 09:18:58.783 3562 3562 I art : at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2621) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2729) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1480) 09-14 09:18:58.783 3562 3562 I art : at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) 09-14 09:18:58.783 3562 3562 I art : at void android.os.Looper.loop() (Looper.java:154) 09-14 09:18:58.783 3562 3562 I art : at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6176) 09-14 09:18:58.783 3562 3562 I art : at java.lang.Object java.lang.reflect.Method.invoke!( java.lang.Object, java.lang.Object[]) (Method.java:-2) 09-14 09:18:58.783 3562 3562 I art : at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:893) 09-14 09:18:58.783 3562 3562 I art : at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:783) 09-14 09:18:58.783 3562 3562 I art : 09-14 09:18:58.843 3562 3562 W System.err: java.io.FileNotFoundException: /sdcard/lbpcascade_frontalface.xml (Permission denied) 09-14 09:18:58.844 3562 3562 W System.err: at java.io.FileOutputStream.open(Native Method) 09-14 09:18:58.844 3562 3562 W System.err: at java.io.FileOutputStream.(FileOutputStream.java:221) 09-14 09:18:58.844 3562 3562 W System.err: at java.io.FileOutputStream.(FileOutputStream.java:169) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.utils.FileUtil.copyAssets2SDCard(FileUtil.java:16) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.MyGLRenderer.(MyGLRenderer.java:43) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.MyGLSurfaceView.init(MyGLSurfaceView.java:29) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.MyGLSurfaceView.(MyGLSurfaceView.java:21) 09-14 09:18:58.844 3562 3562 W System.err: at java.lang.reflect.Constructor.newInstance0(Native Method) 09-14 09:18:58.844 3562 3562 W System.err: at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.createView(LayoutInflater.java:645) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:518) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:426) 09-14 09:18:58.844 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:377) 09-14 09:18:58.844 3562 3562 W System.err: at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) 09-14 09:18:58.844 3562 3562 W System.err: at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 09-14 09:18:58.844 3562 3562 W System.err: at com.derry.opengl.MainActivity.onCreate(MainActivity.java:19) 09-14 09:18:58.844 3562 3562 W System.err: at android.app.Activity.performCreate(Activity.java:6692) 09-14 09:18:58.845 3562 3562 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 09-14 09:18:58.846 3562 3562 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2621) 09-14 09:18:58.846 3562 3562 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2729) 09-14 09:18:58.846 3562 3562 W System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) 09-14 09:18:58.847 3562 3562 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480) 09-14 09:18:58.848 3562 3562 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 09-14 09:18:58.848 3562 3562 W System.err: at android.os.Looper.loop(Looper.java:154) 09-14 09:18:58.848 3562 3562 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6176) 09-14 09:18:58.848 3562 3562 W System.err: at java.lang.reflect.Method.invoke(Native Method) 09-14 09:18:58.848 3562 3562 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) 09-14 09:18:58.848 3562 3562 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) 09-14 09:18:58.857 3562 3562 W System.err: java.io.FileNotFoundException: /sdcard/seeta_fa_v1.1.bin (Permission denied) 09-14 09:18:58.862 3562 3562 W System.err: at java.io.FileOutputStream.open(Native Method) 09-14 09:18:58.862 3562 3562 W System.err: at java.io.FileOutputStream.(FileOutputStream.java:221) 09-14 09:18:58.862 3562 3562 W System.err: at java.io.FileOutputStream.(FileOutputStream.java:169) 09-14 09:18:58.862 3562 3562 W System.err: at com.derry.opengl.utils.FileUtil.copyAssets2SDCard(FileUtil.java:16) 09-14 09:18:58.862 3562 3562 W System.err: at com.derry.opengl.MyGLRenderer.(MyGLRenderer.java:45) 09-14 09:18:58.862 3562 3562 W System.err: at com.derry.opengl.MyGLSurfaceView.init(MyGLSurfaceView.java:29) 09-14 09:18:58.862 3562 3562 W System.err: at com.derry.opengl.MyGLSurfaceView.(MyGLSurfaceView.java:21) 09-14 09:18:58.862 3562 3562 W System.err: at java.lang.reflect.Constructor.newInstance0(Native Method) 09-14 09:18:58.862 3562 3562 W System.err: at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 09-14 09:18:58.862 3562 3562 W System.err: at android.view.LayoutInflater.createView(LayoutInflater.java:645) 09-14 09:18:58.862 3562 3562 W System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) 09-14 09:18:58.862 3562 3562 W System.err: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.rInflate(LayoutInflater.java:858) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:518) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:426) 09-14 09:18:58.863 3562 3562 W System.err: at android.view.LayoutInflater.inflate(LayoutInflater.java:377) 09-14 09:18:58.863 3562 3562 W System.err: at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) 09-14 09:18:58.863 3562 3562 W System.err: at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 09-14 09:18:58.863 3562 3562 W System.err: at com.derry.opengl.MainActivity.onCreate(MainActivity.java:19) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.Activity.performCreate(Activity.java:6692) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2621) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2729) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480) 09-14 09:18:58.863 3562 3562 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 09-14 09:18:58.863 3562 3562 W System.err: at android.os.Looper.loop(Looper.java:154) 09-14 09:18:58.863 3562 3562 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6176) 09-14 09:18:58.863 3562 3562 W System.err: at java.lang.reflect.Method.invoke(Native Method) 09-14 09:18:58.863 3562 3562 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:893) 09-14 09:18:58.863 3562 3562 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) 09-14 09:18:58.998 3562 3562 D : static HostConnection *HostConnection::createUnique(): call 09-14 09:18:58.999 3562 3562 D : HostConnection::get() New Host Connection established 0xd2dfcd30, tid 3562 09-14 09:18:59.103 3562 3586 I OpenGLRenderer: Initialized EGL, version 1.4 09-14 09:18:59.103 3562 3586 D OpenGLRenderer: Swap behavior 1 09-14 09:18:59.105 3562 3586 D : HostConnection::get() New Host Connection established 0xd2dfcf10, tid 3586 09-14 09:18:59.416 3562 3580 D : HostConnection::get() New Host Connection established 0xd7012480, tid 3580 09-14 09:18:59.794 3562 3580 E EGL_emulation: eglQueryContext 32c0 EGL_BAD_ATTRIBUTE 09-14 09:18:59.794 3562 3580 E EGL_emulation: tid 3580: eglQueryContext(1413): error 0x3004 (EGL_BAD_ATTRIBUTE)

Ubuntu22.04 OpenHarmony Execute hb set Error [How to Solve]

Error message

Recently using Ubuntu22.04 to build OpenHarmony compilation environment, When executing the hb set command to select the development board, the following error appears:
Insert picture description here
The detailed log is as follows:

fangye@fangye-virtual-machine:~/niobeu4_src$ hb set
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File "/home/fangye/.local/lib/python3.10/site-packages/hb/__main__.py", line 84, in main
[OHOS ERROR] status = args.command(args)
[OHOS ERROR] File "/home/fangye/niobeu4_src/build/lite/hb_internal/set/set.py", line 45, in exec_command
[OHOS ERROR] return set_product() == 0
[OHOS ERROR] File "/home/fangye/niobeu4_src/build/lite/hb_internal/set/set.py", line 62, in set_product
[OHOS ERROR] product_info = Product.product_menuconfig()
[OHOS ERROR] File "/home/fangye/niobeu4_src/build/lite/hb_internal/common/product.py", line 260, in product_menuconfig
[OHOS ERROR] product = menu.list_promt('product', 'Which product do you need" alt="" />

 

Solution:

Modify the python script reported error: modify from collections import Mapping tofrom collections.abc import Mapping:

vim ~/.local/lib/python3.10/site-packages/prompt_toolkit/styles/from_dict.py

在这里插入图片描述

How to Solve linq Statement IsNullOrWhiteSpace Error

Using the IsNullOrWhiteSpace method in a linq statement will report an error,

Error message: System.NotSupportedException: ‘LINQ to Entities does not recognize the method ‘Boolean lsNullOrWhiteSpace(System.String)’ method, and this method cannot be translated into a store expression.’

You can use the method below to solve:

You can also use IsNullOrEmpty, IsNullOrEmpty method does not report an error, normal operation

The following figure is the analysis of these two methods: