ionic-team / native-run

Utility for running native binaries on iOS and Android devices and simulators/emulators
MIT License
127 stars 21 forks source link

App name with Multibytes characters in config.xml hangs forever #78

Open pipoa opened 5 years ago

pipoa commented 5 years ago

Version:

0.2.8

Description:

App display name with multi-bytes charactesr in config.xml effect native-run hung forever

[ config.xml ]

multi-bytes name such as below result in hung forever...
<name>我的程式</name>
<name>私のプログラム</name>
<name>मेरा कार्यक्रम</name>

Command Output:

forever hangs, error messages: 1,121,62,87,105,70,105,77,65,67,65,100,100,114,101,115,115,60,47,107,101,121,62,10,9,60,115,116,114,105,110,103,62,54,56,58,100,98,58,99,97,58,55,53,58,57,55,58,52,97,60,47,115,116,114,105,110,103,62,10,60,47,100,105,99,116,62,10,60,47,112,108,105,115,116,62,10]}} [native-run] RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 55. Received 56 [native-run] at boundsError (internal/buffer.js:49:9) [native-run] at writeU_Int8 (internal/buffer.js:558:5) [native-run] at Buffer.writeUInt8 (internal/buffer.js:565:10) [native-run] at toCString (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/client/afc.js:150:9) [native-run] at AFCClient.makeDirectory (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/client/afc.js:84:19) [native-run] at uploadDir (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/client/afc.js:102:41) [native-run] at AFCClient.uploadDirectory (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/client/afc.js:95:22) [native-run] at process._tickCallback (internal/process/next_tick.js:68:7)

Instead, running WITHOUT native-run is ok $ ionic cordova run ios --no-native-run running WITH ASCII app name is ok too

<name>myApp</name>

Environment Info:

Ionic:

Ionic CLI : 5.2.8 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.9.0 @angular-devkit/build-angular : 0.13.9 @angular-devkit/schematics : 7.3.9 @angular/cli : 7.3.9 @ionic/angular-toolkit : 1.5.1

Cordova:

Cordova CLI : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 8.0.0, ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 27 other plugins)

Utility:

cordova-res : 0.6.0 native-run : 0.2.8

System:

Android SDK Tools : 26.1.1 (/Users/avex/Library/Android/sdk) ios-deploy : 1.9.4 ios-sim : 8.0.1 NodeJS : v10.15.3 (/usr/local/bin/node) npm : 6.11.3 OS : macOS Mojave Xcode : Xcode 10.2 Build version 10E125

macOS version: 10.14.4

Xcode version: 10.2

shifu201 commented 5 years ago

RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 79. Received 80 [native-run] at boundsError (internal/buffer.js:49:9) [native-run] at writeU_Int8 (internal/buffer.js:558:5) [native-run] at Buffer.writeUInt8 (internal/buffer.js:565:10) [native-run] at toCString (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/client/afc.js:150:9) [native-run] at AFCClient.openFile (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/client/afc.js:50:9) [native-run] at AFCClient.uploadFile (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/client/afc.js:69:24) I ve the error smilar to yours.

junbonglee commented 4 years ago

Having same issue. It has been almost 4 months now since first error was reported. Is there any way to solve this?

Bernix01 commented 2 years ago

2022 this is still a thing!

Bernix01 commented 2 years ago

Fun fact if you end up here. non alphanumeric characters in any file will cause this error. For example an image named árbol.png