-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError [ERR_OUT_OF_RANGE] #65
Comments
@gildebrand Can you run |
I'm getting the same error. My output:
|
I have the same error. Any solutions? |
Hey, I had a similar error. For me it was because the app name in config.xml had problems. I fixed the name and then saved cordova plugins. Removed platform iOS and added it back. Then app built successfully. Hope this helps. |
Never Ever success with native-run
Instead, cordova, --no-native-run is running very well |
same error |
Same problem. This seems related to non-latin chars in the path. Note that the app name is not displayed correctly. client:afc makeDirectory: PublicStaging/读典籍.app +0ms |
Sigh, turns out that it's in https://www.npmjs.com/package/node-ioslib , which is not open sourced. In the generated afs.js, it's clear that Also, all the strings responded should be decoded with UTF-8, rather than String.fromCharCode(token) |
Any news on the issue? |
I got a similar error when I run "ionic cordova run ios -l --external --device" The output :
|
Any workarounds? I have a repository where the command is working, and a repository where I get this error. Its on the same development machine.. UPDATE: Found that |
I have the same problem, none of the above work for a fix for Capacitor. For me it happend after I deleted the android platform and tried to run on my iOS (iPhone), although it works perfectly when running from xCode or browser. Has anyone found the cause and a solution for this problem for apps running capacitor? |
I got the same error. Please help! [error] RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 74. Received 75 |
same here |
same, exactly the same error |
Same here |
As stated by @cxcxcxcx, Of course this is not a real solution, it will happen again as you run |
Running into this now. |
We found out the error was caused by non-ascii characters in path names. The
If you want to know which path is, run this file in the directory under investigation: const fs = require("fs");
const path = require("path");
function* walkSync(dir) {
const files = fs.readdirSync(dir, { withFileTypes: true });
for (const file of files) {
if (file.isDirectory()) {
yield* walkSync(path.join(dir, file.name));
} else {
yield path.join(dir, file.name);
}
}
}
for (const filePath of walkSync(__dirname)) {
if (Buffer.byteLength(filePath) != filePath.length) {
console.log(filePath);
}
} |
Yeah, it works! I got the same error because there are some asset files named in Chinese characters. I can rename the files named in non-ASCII characters with the file you provided to solve the problem now. Thanks! |
I try to
Error: UNKNOWN_ERROR
at AFCProtocolReader.callback
(/Users/satakeryouta/kusurimiru_nuxt_v3/node_modules/.pnpm/native-run@1.7.3/node_modules/native-run/dist/ios/lib/protocol/afc.js:277:54)
at AFCProtocolReader.onData
(/Users/satakeryouta/kusurimiru_nuxt_v3/node_modules/.pnpm/native-run@1.7.3/node_modules/native-run/dist/ios/lib/protocol/protocol.js:53:26)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:335:12)
at readableAddChunk (node:internal/streams/readable:308:9)
at Readable.push (node:internal/streams/readable:245:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
/Users/satakeryouta/kusurimiru_nuxt_v3/node_modules/.pnpm/native-run@1.7.3/node_modules/native-run/dist/ios/lib/protocol/protocol.js:104
throw err;
^
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at new NodeError (node:internal/errors:405:5)
at _write (node:internal/streams/writable:322:11)
at Writable.write (node:internal/streams/writable:337:10)
at AFCProtocolWriter.write
(/Users/satakeryouta/kusurimiru_nuxt_v3/node_modules/.pnpm/native-run@1.7.3/node_modules/native-run/dist/ios/lib/protocol/afc.js:361:16)
at
/Users/satakeryouta/kusurimiru_nuxt_v3/node_modules/.pnpm/native-run@1.7.3/node_modules/native-run/dist/ios/lib/protocol/afc.js:300:25
at new Promise (<anonymous>)
at AFCProtocolClient.sendMessage
(/Users/satakeryouta/kusurimiru_nuxt_v3/node_modules/.pnpm/native-run@1.7.3/node_modules/native-run/dist/ios/lib/protocol/afc.js:286:16)
at AFCClient.closeFile
(/Users/satakeryouta/kusurimiru_nuxt_v3/node_modules/.pnpm/native-run@1.7.3/node_modules/native-run/dist/ios/lib/client/afc.js:64:36)
at AFCClient.uploadFile
(/Users/satakeryouta/kusurimiru_nuxt_v3/node_modules/.pnpm/native-run@1.7.3/node_modules/native-run/dist/ios/lib/client/afc.js:78:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_STREAM_WRITE_AFTER_END'
}
Node.js v18.18.2 how is resolved it? |
To reproduce you can add this file to your assets of your app then call |
🎉 This issue has been resolved in version 2.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Version:
native-run: 0.2.7
node: 10.16.0
Description:
Native-run fails when running both through
ionic run ios
and when runningnative-run
directly. I've tried runningionic run ios
both with and without the--l
flag with same result. Tried runningnative-run ios --app "platforms/ios/build/device/App Admin.ipa" --device --connect --forward 8100:8100
with same result.Command Output:
Environment Info:
macOS version:
10.14.5
Xcode version:
10.2.1
The text was updated successfully, but these errors were encountered: