-
Notifications
You must be signed in to change notification settings - Fork 133
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: Index out of range #1022
Comments
@shaikh-shahid could you provide more context about your problem like the steps you followed, the environment where you're running and if possible your program source code. |
Hey sure, I am using the official code. var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8083, "0.0.0.0");
console.log('Server running at http://127.0.0.1:8083/'); I have installed ops in machine and i am using vscode ops extension to execute. In vscode, i am opening the command palete using shift+ctrl+p and running Ops: run open file command. Same error when i am executing it via commands.
|
@shaikh-shahid are you on linux / mac / windows? what version of qemu are you using?
or
|
this might be from an older version of qemu nanovms/nanos#340 |
Hey I am on Ubuntu, ops profile results
|
yeh - that's what I expected - it's an old qemu version what release of ubuntu was that?
I just tried on 18.04 bionic with that version though, some qemu notes -> https://github.com/nanovms/nanos/wiki/qemu is it possible to try on a more up-to-date ubuntu or later version of qemu? |
I am running on 18.04 |
Any guide to upgrade to qemu ? I tried few commands but ops profile returning the same version. |
https://askubuntu.com/questions/1067722/how-do-i-install-qemu-3-0-on-ubuntu-18-04 or just upgrading the distro would work too |
fyi -- I was able to replicate what you see on 18.04 when accel is turned off
if you have access to use kvm that might fix it as well because it works when accel is on (which is the default) |
if you are on real hardware you can add yourself to kvm group as well https://nanovms.gitbook.io/ops/acceleration |
I followed the link you gave, it seems I enabled everything. groups command is returning the kvm user group. I am just gonna switch to my MacBook and use ops there for tutorial sake. I think my company laptop has some restrictions. |
Working fine in my Mac. Something wrong with my Ubuntu machine. Closing the issue. |
Getting this error when run ops run using the vscode extension.
What could be the possible issue?
booting /home/shahidshaikh/.ops/images/node ...
�[1;33mYou specified hardware acceleration, but it is not supported
Are you running inside a vm? If so disable accel with --accel=false
�[0m
�[1;33mAnyway, we will try to enable hardware acceleration
�[0mstderr: Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
stderr: qemu-system-x86_64: Back to tcg accelerator
en1: assigned 10.0.2.15
en1: assigned FE80::18E9:80FF:FE34:7D33
buffer.js:607
slice: (buf, start, end) => buf.utf8Slice(start, end),
^
RangeError: Index out of range
at Object.slice (buffer.js:607:37)
at Buffer.toString (buffer.js:804:14)
at Object.readFileSync (fs.js:408:41)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1195:22)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'ERR_OUT_OF_RANGE'
}
exit status 3
The text was updated successfully, but these errors were encountered: