Category Archives: Error

[Solved] Xcode13.1 Upgrade Error: CocoaPods installed but not working Failed to build gem native extension

After upgrading Xcode, you need to update cocoapods.

Cocoapods installed but not working appears when executing the shuttle doctor. This means that cocoapods is not installed locally. It may have been cleaned up during the upgrade. Reinstallation required

Problems also occur during installation. Failed to build gem native extension

First check whether cocoapods is installed

pod --version

perhaps

gem list --local | grep cocoapods

If not, perform the installation

sudo gem install -n /usr/local/bin cocoapods

If there is an error:

Building native extensions. This could take a while…
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.

Direct use installation
brew install cocoapodsor sudo gem install cocoapods
Wait until it is over and then run

pod --version

If an error is reported, restart the terminal

Installs the specified version of ruby

rvm reinstall ruby-2.6.6

After installation, view all versions

rvm list

Switch Ruby Version

rvm use <version>

Install the specified version of cocoapods

sudo gem install cocoapods -v <version>

Uninstall other versions of cocoapods

sudo gem uninstall cocoapods -v <version>

[Solved] Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest FAILED和cannot install, GOBIN must be an ab

When configuring the go environment with vscode

Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest FAILED
"stderr": "cannot install, GOBIN must be an absolute path\n" // Prompt to set absolute path

Go components can be installed here, but go.exe installation in Bin cannot be found

We enter go env to view the environment configuration

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=D:\Program Files\Go\bin  // Here is the path used to install the go component
set GOCACHE=C:\Users\44305\AppData\Local\go-build
set GOENV=C:\Users\44305\AppData\Roaming\go\env  // --------------------------------这里是env文件存放的位置
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\44305\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\44305\go
set GOPRIVATE=
set GOPROXY=https://goproxy.io,direct
set GOROOT=D:\Program Files\Go // ---------------Here is the location of the go installation
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.1
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\44305\AppData\Local\Temp\go-build352704544=/tmp/go-build -gno-record-gcc-switches

Use the command line to find that the settings still do not work. Finally, modify the file directly
1) the first step is to find the env file
set goenv = C:\users\44305\appdata\roaming\go\env// ——————————————- here is the location where the env file is stored

2) The second step is to open it with a notebook

3) the third step is to set the path here to the bin file in the following directory
set goroot = D:\program files\go// ——————– here is the location where go is installed

Finally, close vscode and then open it to install successfully

Tools environment: GOPATH=C:\Users\44305\go, GOBIN=D:\Program Files\Go\bin
Installing 8 tools at the configured GOBIN: D:\Program Files\Go\bin in module mode.
  go-outline
  gotests
  gomodifytags
  impl
  goplay
  dlv
  staticcheck
  gopls

Installing github.com/ramya-rao-a/go-outline@latest (D:\Program Files\Go\bin\go-outline.exe) SUCCEEDED
Installing github.com/cweill/gotests/gotests@latest (D:\Program Files\Go\bin\gotests.exe) SUCCEEDED
Installing github.com/fatih/gomodifytags@latest (D:\Program Files\Go\bin\gomodifytags.exe) SUCCEEDED
Installing github.com/josharian/impl@latest (D:\Program Files\Go\bin\impl.exe) SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay@latest (D:\Program Files\Go\bin\goplay.exe) SUCCEEDED
Installing github.com/go-delve/delve/cmd/dlv@latest (D:\Program Files\Go\bin\dlv.exe) SUCCEEDED
Installing honnef.co/go/tools/cmd/staticcheck@latest (D:\Program Files\Go\bin\staticcheck.exe) SUCCEEDED
Installing golang.org/x/tools/gopls@latest (D:\Program Files\Go\bin\gopls.exe) SUCCEEDED

All tools successfully installed. You are ready to Go. :)

[Solved] UE4 Android Package Error: failed for task :permission_library:compileDebugJavaWithJavac

Record ue4.27 Android packaging failure compileDebugJavaWithJavac

Enter the project folder G: \UE4_Project\MyProject\Intermediate\Android\arm64\gradle

Execute CMD  gradlew compileDebugJavaWithJavac

Solutions:

1. Add the red part to the .Build.cs of the project

2. Create extra file_UPL_.xml

3. Paste the following content into XML

<?xml version="1.0" encoding="utf-8"?>
<!-- XML -->
<root xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Gradle Properties -->
<gradleProperties>
<insert>
ANDROID_BUILD_TOOLS_GRADLE_VERSION=com.android.tools.build:gradle:3.5.3
</insert>
</gradleProperties>
</root>

[Solved] Searching for inspections failed: undefined method `map‘ for nil:NilClass“

Recently, the new project of pod reported this error. My Mac M1, record it

[cocoapods error]: searching for inspections failed: undefined method ` map ‘for nil: nilclass “error

Solution: execute the following command line

sudo arch -x86_64 gem install ffi

Then pop install

[Solved] validateNewTexture:89: failed assertion `BytesPerRow of a buffer-backed texture with pixelFormat

IPA runtime tips compiled after Xcode upgrade (version 13.1)

validateNewTexture:89: failed assertion `BytesPerRow of a buffer-backed texture with pixelFormat(MTLPixelFormatBGRA8Unorm) must be aligned to 64 bytes, found bytesPerRow(5344)'

Solution:
Product->Scheme->Edit Scheme->Diagnostics->Cancel API Validation

Reference: https://stackoverflow.com/questions/58043738/validatenewtexture89-failed-assertion-bytesperrow-of-a-buffer-backed-texture/58051893

[Solved] Unity Package Error: Failed running D:\Program Files\Unity2018.4.1\Editor\Data\il2cpp/build/il2cpp.exe

Today, I tried to access the company’s overseas SDK. The total package error is as follows:

Failed running D:\Program Files\Unity2018.4.1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="E:\TombNote_tChinese_test\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="E:\TombNote_tChinese_test\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="D:\Program Files\Unity2018.4.1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="D:\Program Files\Unity2018.4.1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="E:/AndroidSDK/NDK" --map-file-parser="D:\Program Files\Unity2018.4.1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="E:\TombNote_tChinese_test\Temp\StagingArea\assets\bin\Data\Managed" --generatedcppdir="E:\TombNote_tChinese_test\Temp\StagingArea\Il2Cpp\il2cppOutput"

stdout:
Building libil2cpp.so with AndroidToolChain
    Output directory: E:\TombNote_tChinese_test\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: E:\TombNote_tChinese_test\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
ObjectFiles: 603 of which compiled: 0
Total compilation time: 242 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: E:\AndroidSDK\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\RFL\AppData\Local\Temp\tmp80DF.tmp" -o "E:\TombNote_tChinese_test\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_EC005744B79151E709C4C1D5591AE889\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "E:\AndroidSDK\NDK\platforms\android-16\arch-arm" -gcc-toolchain "E:\AndroidSDK\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "E:\AndroidSDK\NDK\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

E:\TombNote_tChinese_test\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Assembly-CSharp_2.cpp:43762: error: undefined reference to 'CallSDKFunc'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

Results the data was checked because [dllimport (“_internal”)]
of OS cannot exist when Android is typed.

Solution:
find [dllimport (“_internal”)]
Add judgment platform in the code

#if UNITY_ IOS
[DllImport(“__Internal”)]
#endif

[Solved] Linux Start jar Error: nohup: failed to run command ‘java‘: No such file or directory

This prompt appears when Linux starts the jar package

Scenario:

The server host is transferred from building a to building B, the IP is changed, and the server content is unchanged

Start service prompt nohup: failed to run command ‘Java’: no such file or directory

Solution:

1. View JDK version
java – version
2. Echo $Java_ Home
view the installation directory
3. Execute startup jar
nohup previous result/bin/Java – jar XX. Jar

[Solved] Hive Error: FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask

Error while processing statement: failed: execution error, return code 3 from org.apache.hadoop.hive.ql.exec.mr.mapredlocaltask

1. Cluster environment

CDH cluster, hive’s engine is Mr.

2. Origin of error

Today, I ran a hive task in the cluster of the test environment and reported an error while processing statement: failed: execution error, return code 3 from org.apache.hadoop.hive.ql.exec.mr.mapredlocaltask.

3. Error reason

This error is because the map join parameter of hive is on by default:

hive.auto.convert.join=true

When using hive for map join, this type of error will be reported if the node memory is insufficient.

4. Error analysis

Mapjoin refers to join on the map side. Its principle is broadcast join, that is, the small table is used as a complete driving table for join operation. Usually, the data in each table to be connected will be processed in different maps. That is, the value corresponding to the same key may exist in different maps. In this way, you must wait until you connect in reduce. To make mapjoin work smoothly, you must meet the following conditions: except that the data of one table is distributed in different maps, the data of other connected tables must have a complete copy in each map. Map join will read all the small tables into memory and directly match the data of another table with the data of the table in memory in the map stage (at this time, the distributed cache can be used to distribute the small tables to various nodes for mapper loading). Due to the join operation during map, the reduction operation is omitted and the efficiency will be much higher.

When the machine memory is insufficient, an error will be reported if you cannot join on the map side.

5. Solution

1. You can close the above map join and change it to common join
shell command line: set hive. Auto. Convert. Join = false 2. Modify the parameters under the configuration file to close the map join. Use common join
hive_conf.xml

<property>
<name>hive.auto.convert.join</name>
<value>false</value>//Modify true to false
<description>Enables the optimization about converting common join into mapjoin</description>
</property>

[Solved] Git push error: error: RPC failed; HTTP 413 curl 22 the requested URL returned error: 413

 

#Accident scene

Git submitted push with enrollment error:

Enumerating objects: 448, done.
Delta compression using up to 4 threads
Total 424 (delta 109), reused 0 (delta 0), pack-reused 0
POST git-receive-pack (433422517 bytes)
Error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

#Solution

As can be seen from the above error message, the code size submitted by Git is 433422517 bytes, about 400m; It is suspected that the submitted documents are too large.

1. First, modify the GIT global configuration

git config –global http.postBuffer 524288000

The result is pushed again, which is invalid
it is suspected that the size of the transfer file is limited in other places. In retrospect, the server where Git is located was accessed directly, but later it was accessed after being forwarded by Nginx. Therefore, I think there may be a problem with the Nginx configuration.

2. View git related configuration of Nginx

	location ~ /git(/.*) {
	    # others
	    
	    client_max_body_size 200M;
	}

The client_max_body_Size modify the configuration to 500m and restart Nginx
push again to solve the problem.

[Solved] Rtthread DCM component dcm_cache_save interface Error: mkdir:/data failed

The rtthread dcm data persistence component was used in the project, but mkdir:/data failed was reported during dcm_cache_save

But this error log is not the code of this project, it is confirmed that it is the log printed inside the dcm interface

Then confirmed that the macro #define DCM_DEFAULT_STORAGE_NAME “/user/data/db/dcm” is already in rtconfig.h

Declare that this macro is also useful for business code at system startup

The final investigation is because dcm_default_storage_name needs to be assigned when the system starts, and the dcm_strg.o of the dcm component depends on

If this variable is not assigned, it will default to mkdir:/data, but if /data has no permission, it will report that error.

So dcm_default_storage_name = DCM_DEFAULT_STORAGE_NAME is solved (it needs to be called at startup)