Category Archives: Error

How to Solve Macbookm1 pod error

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "ZLPhotoBrowser":
  In snapshot (Podfile.lock):
    ZLPhotoBrowser (= 4.1.5)

  In Podfile:
    images_picker (from `.symlinks/plugins/images_picker/ios`) was resolved to 0.0.1, which depends on
      ZLPhotoBrowser (= 4.1.9)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `ZLPhotoBrowser` inside your development pod `images_picker`.
   You should run `pod update ZLPhotoBrowser` to apply changes you've made.

Solution:

sudo arch -x86_64 gem install ffi

arch -x86_64 pod install
//Prompt for pod update ZLPhotoBrowser uses the arch -x86_64 pod to update
arch -x86_64 pod update ZLPhotoBrowser

How to Solve elasticsearch-7.15.1 operation errors

Error 1:

WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.elasticsearch.bootstrap.Elasticsearch (file:/root/tools/elasticsearch-7.15.1/lib/elasticsearch-7.15.1.jar)
WARNING: Please consider reporting this to the maintainers of org.elasticsearch.bootstrap.Elasticsearch
WARNING: System::setSecurityManager will be removed in a future release
[2021-10-27T10:39:13,960][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [elk-node01] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:171) ~[elasticsearch-7.15.1.jar:7.15.1]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:158) ~[elasticsearch-7.15.1.jar:7.15.1]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75) ~[elasticsearch-7.15.1.jar:7.15.1]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:114) ~[elasticsearch-cli-7.15.1.jar:7.15.1]
at org.elasticsearch.cli.Command.main(Command.java:79) ~[elasticsearch-cli-7.15.1.jar:7.15.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:123) ~[elasticsearch-7.15.1.jar:7.15.1]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81) ~[elasticsearch-7.15.1.jar:7.15.1]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) ~[elasticsearch-7.15.1.jar:7.15.1]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170) ~[elasticsearch-7.15.1.jar:7.15.1]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399) ~[elasticsearch-7.15.1.jar:7.15.1]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:167) ~[elasticsearch-7.15.1.jar:7.15.1]
... 6 more
uncaught exception in thread [main]
java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:399)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:167)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:158)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:114)
at org.elasticsearch.cli.Command.main(Command.java:79)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:123)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
For complete error details, refer to the log at /data/elk_data/logs/my-elk-cluster.log

Solution: elastic refuses to run with the root user, you need to create a separate user and group for elastic.
————————————————————————————————————————
[root@elk-node01 ~]# groupadd elastic
[root@elk-node01 ~]# useradd -d /data -g elastic elastic

 

Error 2:

ERROR: [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch.
bootstrap check failure [1] of [2]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /data/es_data/logs/my-elk-cluster.log
[2021-10-27T10:46:55,882][INFO ][o.e.n.Node               ] [elk-node01] stopping ...
[2021-10-27T10:46:55,898][INFO ][o.e.n.Node               ] [elk-node01] stopped
[2021-10-27T10:46:55,898][INFO ][o.e.n.Node               ] [elk-node01] closing ...
[2021-10-27T10:46:55,915][INFO ][o.e.n.Node               ] [elk-node01] closed

Solution: Modify the system kernel parameters and configure them as required.
———————————————————————————————————————————- ——-
vi /etc/security/limits.conf, add the following four lines before # End of file
* soft nofile 65535
* hard nofile 131072
* soft nproc 65535
* hard nproc 65535
vi /etc/sysctl.conf, add the following line at the end of the document
vm.max_map_count=262145
Execute sysctl -p
Note: Use ulimit -n to check the number of file handles setting, if it is still 1024, then you need to restart the VM.

M1 Computer: How to Solve pod update

Error Messages:

Solution:

Method 1: A simple and straightforward solution
Add arch -x86_64 in front of the pod command
e.g. arch -x86_64 pod update

Method 2: reinstall cocoaPods

Answering my own question. I fixed the ffi issue by uninstalling my faulty Ruby version and CocoaPods, then I used the -x86_64 arch to reinstall ffi and CocoaPods.
These are the steps I did to get back to a working state (and to apply the M1 workarounds for ffi):

Uninstall Ruby with: brew uninstall ruby –force
Uninstall CocoaPods. At first, try to list all CocoaPods versions / components with gem list –local | grep cocoapods. Then uninstall them one by one, in my case:
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-downloader
etc.
As a next step I was able to reinstall ffi and then CocoaPods with:
sudo arch -x86_64 gem install ffi
sudo arch -x86_64 gem install cocoapods
Once done, I could run pod install as expected. Note that I had the Terminal open all the time in standard mode – no Rosetta required

DRF uses paging function Error: unorderedobjectlistwarning

UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class ‘myapp.models.Power’> QuerySet.
paginator = self.django_paginator_class(queryset, page_size)

The reason is that you are not sorting.

Solution.
(a) add ordering to the design of the model

class test(models.Model):
    ...

    class Meta:
        ...
        ordering=["xx"]

(b) Add order_by to the query set for sorting

SAP: How to Solve error Message Number SO322

This type of file is not allowed on your system
Message number SO322
Diagnosis
An attempt was made to create a document of a type not allowed by system administration.
System Response
The system does not accept documents of this type.
Procedure
Select another type.

 

Solution:
Just use the transaction code SOPE to add the postfix of the error report file

See SAP Notes 2184005
2184005 – Error message: Documents of this type are not allowed in your system (SO322) for attachments
Symptom
Error message: Documents of this type are not allowed in your system (SO322) displayed when creating attachment in GOS.
Environment
SAP Basis release independent
Reproducing the Issue

    In any application transaction where GOS is available open the GOS Toolbox menuWith the service New -> Create Attachment add a new file

OR

    In transaction SO01 or SBWP create a New MessageAdd a new attachment

Cause
The file type (extension) is not allowed in transaction SOPE
See Also
If the file type (extension) is allowed in SOPE, but the error message is still received check the Knowledge
Provider (KPro) errors in transaction SLG1 for the timeframe when the error occured. It’s possible to block
some file types and MIME-Types on content server side.
Consider the system customizing referring to KBA 1634908.
For specific Knowledge Provider (KPro) issues refer to KBAs:
1482012 – ContentServer: How to check the connection to content server
1800664 – Error: HTTP/1.1 401 Authorization Required SsfVerify failed: rc=5 when accessing a content repository
Keywords
SO 322, Dokumente dieses Typs sind in Ihrem System nicht erlaubt
Products
SAP NetWeaver Application Server for ABAP 7.1
SAP NetWeaver Application Server for ABAP 7.2
SAP NetWeaver Application Server for ABAP 7.4 for SAP Business Suite
SAP NetWeaver Application Server for ABAP 7.4, OEM version 1.0
SAP NetWeaver Application Server for ABAP 7.6 for SAP S/4HANA Cloud
SAP NetWeaver Application Server for ABAP 7.61 for SAP S/4HANA Cloud
SAP NetWeaver Application Server for ABAP 7.62 for SAP S/4HANA
SAP enhancement package 1 for SAP NetWeaver Application Server for ABAP 7.1

How to Solve Project Upgrade to flutter2.5.0 Error

Record an error report about the error report after the project is upgraded to 2.5.0

error message 1:

Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.

Solution:
in your project level gradle file, just increase ext.kotlin.version from any version you have to "1.4.32" or any latest version available. Path:/Android/build. Gradle

buildscript {
    // ext.kotlin_version = '1.3.50'
    ext.kotlin_version = '1.4.32'
    repositories {
        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'}
        // google()
        // mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        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'}
        // google()
        // mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Error Message 2:
D8: Cannot fit requested classes in a single dex file (# methods: 76688 > 65536) com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The shrinker may have failed to optimize the Java bytecode.
Solution
Path: /android/app/build.gradle,Change the minSdkVersion version to a larger one, e.g. 21

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.good_commodity"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

[Solved] Android9.0 App Install Android4.4 Error: InflateException-You must supply a layout_height attribute.

Problem description: Android 9.0 application installed to Android 4.4 reports an error InflateException, prompting you must provide a layout_height property.
Android9.0 application installed to Android4.4 reports an error InflateException, prompting you must provide a layout_height property.
Stack.

0-26 11:19:23.312 10710 10710 E AndroidRuntime: FATAL EXCEPTION: main
10-26 11:19:23.312 10710 10710 E AndroidRuntime: Process: com.XX.app, PID: 10710
10-26 11:19:23.312 10710 10710 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.XX.app/com.XX.view.player.VideoPlayActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class com.XX.widget.TvXXControlView
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:135)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.os.Looper.loop(Looper.java:136)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5047)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:658)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)
10-26 11:19:23.312 10710 10710 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.XX.widget.TvControlView
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:620)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at com.XX.view.player.BaseVideoPlayActivity.onCreate(BaseVideoPlayActivity.java:90)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:5294)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     ... 11 more
10-26 11:19:23.312 10710 10710 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at java.lang.reflect.Constructor.constructNative(Native Method)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:594)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     ... 22 more
10-26 11:19:23.312 10710 10710 E AndroidRuntime: Caused by: java.lang.RuntimeException: Binary XML file line #17: You must supply a layout_height attribute.
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:492)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:5949)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:6117)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.widget.RelativeLayout$LayoutParams.<init>(RelativeLayout.java:1225)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.widget.RelativeLayout.generateLayoutParams(RelativeLayout.java:1062)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.widget.RelativeLayout.generateLayoutParams(RelativeLayout.java:82)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:757)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at android.view.View.inflate(View.java:17465)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at com.xx.widget.TvControlView.<init>(TvControlView.java:132)
10-26 11:19:23.312 10710 10710 E AndroidRuntime:     at com.xx.widget.TvXXControlView.<init>(TvXXControlView.java:64)

 

Solution:
This problem actually has nothing to do with the version, but with the screen allocation rate. The layout xml defines the layout_height referencing the constant defined in the values, but the definition is only defined in the directory of the specific resolution. So the solution Define the referenced value in the values directory

[Solved] Console error: syntax error: illegal return statement

Problem Description:

When you run the code containing the return statement directly in the script tag or in the browser console, an error is reported:

SyntaxError: Illegal return statement

if (!NaN) {
	console.log('went into the conditional statement')
	return "Ollie gives!"
}

reason:

In JavaScript, the return statement can only be placed in the function, otherwise the following error will pop up.

SyntaxError: Illegal return statement

Solution:
package the modified code block in function.

(function () {
	if (!NaN) {
		console.log('went into the conditional statement')
	return "Ollie gives!"
	}
})()

// Run results 
It goes into the conditional statement
"Ollie gives!"

[Solved] Zabbix Error: Cannot parse list of active checks

Question:

There is no data reported by the virtual machine, and an error is reported:

Cannot parse list of active checks

Solution:

1. Search the forum. The comment shows that there is a problem with the 10051 interface to the server. Check the firewall and no problem is found

2. The architecture adopts the mode of agent channel machine IP1 serverip2,

On the agent machine:

 tcping IP1 10051端口

The display is turned on. Continue troubleshooting

3. On the server machine, check the port status

tcping IP2 10051端口

It is found that the 10051 port is not open. Locate the problem, that is, the server problem. Restart the httpd service and solve it

systemctl restart httpd

[Solved] Android 9.0 APP Install Android 4.4 Error: IllegalArgumentException

 

Problem Description.
App works on Android 9.0, but the installation to version 4.4 program crashes with the error:

IllegalArgumentException
10-25 17:07:12.475 14178 14178 E AndroidRuntime: FATAL EXCEPTION: main
10-25 17:07:12.475 14178 14178 E AndroidRuntime: Process: com.xx.app, PID: 14178
10-25 17:07:12.475 14178 14178 E AndroidRuntime: java.lang.RuntimeException: Unable to create service com.xx.service.XXService: java.lang.IllegalArgumentException:

 

Stack:

10-25 17:07:12.475 14178 14178 E AndroidRuntime: FATAL EXCEPTION: main
10-25 17:07:12.475 14178 14178 E AndroidRuntime: Process: com.xx.app, PID: 14178
10-25 17:07:12.475 14178 14178 E AndroidRuntime: java.lang.RuntimeException: Unable to create service com.xx.service.XXService: java.lang.IllegalArgumentException: MediaButtonReceiver component may not be null
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2582)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at android.app.ActivityThread.access$1800(ActivityThread.java:135)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at android.os.Looper.loop(Looper.java:136)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5047)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
10-25 17:07:12.475 14178 14178 E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:658)

 

Solution:
Register MediaButtonReceiver in Manifest

<receiver android:name="androidx.media.session.MediaButtonReceiver" >
    <intent-filter>
        <action android:name="android.intent.action.MEDIA_BUTTON" />
    </intent-filter>
</receiver>