Skip to content
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

"tns platform add ios" generates Fatal Error: v8::ArrayBuffer::Neuter #1129

Closed
EdwardSaid opened this issue Oct 31, 2015 · 20 comments
Closed

Comments

@EdwardSaid
Copy link

This is in reference to your "http://docs.nativescript.org/getting-started" (sample-Groceries), in particular these 2 steps:

$ tns platform add ios
$ tns platform add android

I am getting the following when executing either of the above at the command line:

FATAL ERROR: v8::ArrayBuffer::Neuter Only externalized ArrayBuffers can be neutered
Abort trap: 6

Here's a little background:

It seems that I have gone through all the steps of installing tns successfully (http://docs.nativescript.org/setup/ns-cli-setup/ns-setup-os-x.html).

To clarify further, here is the result of
$ tns platform add ios --log trace

Exec uname -a
stdout: Darwin Imads-MacBook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64

stderr:
Exec npm -v
stdout: 3.3.9

stderr:
spawn: java -version
Exec node-gyp -v
stdout:
stderr: /bin/sh: node-gyp: command not found

Exec xcodebuild -version
stdout: Xcode 7.1
Build version 7B91b

stderr:
Exec pod --version
stdout: 0.39.0

stderr:
Exec adb version
stdout: Android Debug Bridge version 1.0.32
Revision eac51f2bb6a8-android

stderr:
Exec android -h
stdout:
Usage:
android [global options] action [action options]
Global options:
-s --silent : Silent mode, shows errors only.
-v --verbose : Verbose mode, shows errors, warnings and all messages.
--clear-cache: Clear the SDK Manager repository manifest cache.
-h --help : Help on a specific command.

                                                                Valid
                                                                actions
                                                                are
                                                                composed
                                                                of a verb
                                                                and an
                                                                optional
                                                                direct
                                                                object:
  • sdk : Displays the SDK Manager window.

  • avd : Displays the AVD Manager window.

  • list : Lists existing targets or virtual devices.

  • list avd : Lists existing Android Virtual Devices.

  • list target : Lists existing targets.

  • list device : Lists existing devices.

  • list sdk : Lists remote SDK repository.

  • create avd : Creates a new Android Virtual Device.

  • move avd : Moves or renames an Android Virtual Device.

  • delete avd : Deletes an Android Virtual Device.

  • update avd : Updates an Android Virtual Device to match the folders
    of a new SDK.

  • create project : Creates a new Android project.

  • update project : Updates an Android project (must already have an
    AndroidManifest.xml).

  • create test-project : Creates a new Android project for a test package.

  • update test-project : Updates the Android project for a test package (must
    already have an AndroidManifest.xml).

  • create lib-project : Creates a new Android library project.

  • update lib-project : Updates an Android library project (must already have
    an AndroidManifest.xml).

  • create uitest-project: Creates a new UI test project.

  • update adb : Updates adb to support the USB devices declared in the
    SDK add-ons.

  • update sdk : Updates the SDK by suggesting new platforms to install
    if available.

    stderr:
    Exec mono --version
    stdout:
    stderr: /bin/sh: mono: command not found

Exec git --version
stdout: git version 2.4.9 (Apple Git-60)

stderr:
Exec gradle -v
stdout:

Gradle 2.8

Build time: 2015-10-20 03:46:36 UTC
Build number: none
Revision: b463d7980c40d44c4657dc80025275b84a29e31f

Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_65 (Oracle Corporation 25.65-b01)
OS: Mac OS X 10.10.5 x86_64

stderr:
Exec javac -version
stdout:
stderr: javac 1.8.0_65

System information:
{ procInfo: 'nativescript/1.4.3',
platform: 'darwin',
os: 'Darwin Imads-MacBook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64\n',
shell: '/bin/bash',
dotNetVer: null,
procArch: 'x64',
nodeVer: 'v5.0.0',
npmVer: '3.3.9',
javaVer: '1.8.0',
nodeGypVer: null,
xcodeVer: 'Xcode 7.1\nBuild version 7B91b\n',
itunesInstalled: true,
cocoapodVer: '0.39.0\n',
adbVer: 'Android Debug Bridge version 1.0.32',
androidInstalled: true,
monoVer: null,
gitVer: '2.4.9 (Apple Git-60)',
gradleVer: '2.8',
javacVersion: '1.8.0_65' }
Initializing analytics statuses.
Analytics statuses:
{ TrackFeatureUsage: 1, TrackExceptions: 0 }
Trying to track feature 'CLI' with value 'platform'.
BeforeHookName for command platform-add is before-platform-add
AfterHookName for command platform-add is after-platform-add
Looking for project in '/Users/imadatalla/Documents/shmarter/tests/sample-Groceries'
Project directory is '/Users/imadatalla/Documents/shmarter/tests/sample-Groceries'.
FATAL ERROR: v8::ArrayBuffer::Neuter Only externalized ArrayBuffers can be neutered
Abort trap: 6

@Trott
Copy link

Trott commented Nov 1, 2015

This seems to happen with node 5.0.0 but not node 4.2.1 so a fast workaround might be to install node 4.2.1 instead of 5.0.0.

@EdwardSaid
Copy link
Author

Thanks for the note. Does it mean that I could do the following:

brew uninstall node

then

brew install node

The question is how to install version 4.2.1 instead of 5.0.0

Please advise. Thanks for your assistance.


From: Rich Trott notifications@github.com
Sent: Saturday, October 31, 2015 8:33 PM
To: NativeScript/nativescript-cli
Cc: EdwardSaid
Subject: Re: [nativescript-cli] "tns platform add ios" generates Fatal Error: v8::ArrayBuffer::Neuter (#1129)

This seems to happen with node 5.0.0 but not node 4.2.1 so a fast workaround might be to install node 4.2.1 instead of 5.0.0.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1129#issuecomment-152783260.

[https://avatars2.githubusercontent.com/u/15524654?v=3&s=400]#1129 (comment)

"tns platform add ios" generates Fatal Error: v8::ArrayBuffer::Neuter · Issue #1129 · NativeScript/nativescript-cli
This is in reference to your "http://docs.nativescript.org/getting-started" (sample-Groceries), in particular these 2 steps: $ tns platform add ios $ tns platform add android I am getting the fol...
Read more...#1129 (comment)

@EdwardSaid
Copy link
Author

I downgraded to node v4.2.1, which also seems to have installed npm v2.14.7

Does it mean that I have to uninstall/reinstall the dependencies for iOS and Android development, as well as NativeScript CLI?

Because now it seems that something is wrong with tns:

$ tns doctor
/usr/local/lib/node_modules/nativescript/node_modules/fibers/fibers.js:16
throw new Error(''+ modPath+ '.node is missing. Try reinstalling node-fibers?');
^

Error: /usr/local/lib/node_modules/nativescript/node_modules/fibers/bin/darwin-x64-v8-4.5/fibers.node is missing. Try reinstalling node-fibers?
at Object. (/usr/local/lib/node_modules/nativescript/node_modules/fibers/fibers.js:16:8)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:4:13)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)

@Trott
Copy link

Trott commented Nov 1, 2015

I know next to nothing about nativescript, but I would uninstall and reinstall the CLI after doing a downgrade from node 5 to node 4: npm uninstall -g nativescript-cli followed by npm install -g nativescript-cli. Depending on your configuration and file permissions, you may need to use sudo on those commands. I'm assuming you're just getting started with nativescript-cli and you have no extensive configuration or pre-existing projects to be at all concerned about. If those assumptions are incorrect, I would advise you to wait to hear from someone who knows more about the CLI.

@Trott
Copy link

Trott commented Nov 2, 2015

Seems to be a confirmed bug in Node 5.0.0. There's a pull request to fix it. Should land in the next version in Node 5 which is expected to have a new release every one or two weeks. So it shouldn't be long before you can fix this by upgrading to the latest Node 5.x.x rather than downgrading to the last Node 4.x.x.

UPDATE: Fix has landed in Node's master branch. Should definitely be in the next 5.x.x release...

@EdwardSaid
Copy link
Author

I had already downgraded to Node 4.2.1, and I had to rebuild “node-fibers” (because Node 4.2.1 was a manual install, rather installing via “brew”). I also reinstalled Nativescript and all seems to work fine now.

BTW, now when I execute:
$ brew doctor

it gives me these warnings:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
/usr/local/include/node/android-ifaddrs.h
/usr/local/include/node/ares.h
/usr/local/include/node/ares_version.h
/usr/local/include/node/libplatform/libplatform.h
/usr/local/include/node/nameser.h
/usr/local/include/node/node.h

etc. etc. there are many header files that it lists. I just pasted a few in the above lines.
I am not sure if I should remove these header files (which are needed and which aren't).
In any case, thanks for your previous assistance with all the issues.

@svc76
Copy link

svc76 commented Nov 7, 2015

Edward, how did you reinstall node fibers? Can you put in the steps on how did you get native script to work again? I ran into the same issue. Downgraded node to 4.2.1. But not sure how to reinstall fibers. Node test says "cannot find module ....fibers/bin/test". npm install fibers fails as well with error "cannot install fibers as a dependency of itself"

@rosen-vladimirov
Copy link
Contributor

Hi @charismsft ,

After downgrading node, you will have to reinstall nativescript cli (npm i -g nativescript should be enough). Hope this helps.

@svc76
Copy link

svc76 commented Nov 11, 2015

Unfortunately that doesn't help me here.

tns doctor still throws error

/usr/local/lib/node_modules/nativescript/node_modules/fibers/fibers.js:16
throw new Error(''+ modPath+ '.node is missing. Try reinstalling node-fibers?');
^

Error: /usr/local/lib/node_modules/nativescript/node_modules/fibers/bin/darwin-x64-v8-4.5/fibers.node is missing. Try reinstalling node-fibers?
at Object. (/usr/local/lib/node_modules/nativescript/node_modules/fibers/fibers.js:16:8)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:4:13)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)

@Trott
Copy link

Trott commented Nov 11, 2015

Node 5.1.0 is likely to come out tomorrow and it will contain the fix for this.

@rosen-vladimirov
Copy link
Contributor

@charismsft, did you reinstall nativescript-cli after downgrading Node 4.2.2? It looks like you have not reinstalled it and that's throwing the error.

@EdwardSaid
Copy link
Author

Sorry about the delay, just got back from a trip (without access to the digital world, believe it or not in this time and age). Trying to have a recollection of the exact steps I did. But according to my incoherent notes:

After cd to your correct path (important to be in the right folder),

$ npm uninstall fibers
OR (can't remember which I did)
$ rm -R node_modules/fibers
THEN reinstall fibers,
$ npm install fibers
THEN reinstall nativescript cli as rosen-vladimirov pointed out.

Let me know how this works out for you.

After this episode, I started looking into PhoneGap...exploring it now.

@svc76
Copy link

svc76 commented Nov 12, 2015

i ran npm i -g nativescript, it succeeded fine. I re-opened the shell and ran tns doctor. Got the same error.

@svc76
Copy link

svc76 commented Nov 12, 2015

Ok, i made progress. I reinstalled nativescript successfully. But now, if i try to run "tns doctor" it doesn't find the command "tns". It is in /usr/local/bin. The folder is in the path. What else do i need to do?

@rosen-vladimirov
Copy link
Contributor

Hi @svc76
Based on this issue I believe you have solved your problem, am I correct?

@EdwardSaid
Copy link
Author

Not sure if this is related, but I wonder if your .bash_profile has the correct path saved in it.

@svc76
Copy link

svc76 commented Nov 20, 2015

Thank you i resolved after manually cleaning node js and reinstalling it and reinstalling nativescript

@Trott
Copy link

Trott commented Nov 20, 2015

Node 5.1.0 was released three days ago, so another solution for this issue is to upgrade to Node 5.1.0.

@rosen-vladimirov
Copy link
Contributor

I'm closing this issue as it has been fixed in Node 5.1.0 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants