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

Publishing plugin leads to JavaScript heap out of memory #57

Closed
dartmann opened this issue Jan 17, 2018 · 1 comment
Closed

Publishing plugin leads to JavaScript heap out of memory #57

dartmann opened this issue Jan 17, 2018 · 1 comment

Comments

@dartmann
Copy link

dartmann commented Jan 17, 2018

Make sure to check the demo app(s) for sample usage

Not relevant.

Make sure to check the existing issues in this repository

Done.

If the demo apps cannot help and there is no issue for your problem, tell us about it

When I try to publish my plugin, the pack.sh script fails at the step when the newly created src dir is built.

Which platform(s) does your issue occur on?

  • Both
  • iOS/Android versions 3.0.0
  • emulator or device. What type of device? Not relevant.

Please, provide the following version numbers that your issue occurs with:

  • CLI: 3.4.1
  • Cross-platform modules: 3.4.0
  • Runtime(s): 3.4.1
  • Plugin(s):
    "tns-core-modules": "^3.3.0",
    "tns-platform-declarations": "^3.3.0",
    "typescript": "~2.3.0",
    "prompt": "^1.0.0",
    "rimraf": "^2.5.0",
    "tslint": "^5.0.0"

Please, tell us how to recreate the issue in as much detail as possible.

I configured my project for publishing to the npm repo of my company. Afterwards, I run the publish.sh script and got the following error:

Building /src...

<--- Last few GCs --->

   39933 ms: Mark-sweep 1359.2 (1437.2) -> 1359.0 (1437.2) MB, 1301.8 / 0.0 ms [allocation failure] [GC in old space requested].
   41278 ms: Mark-sweep 1359.0 (1437.2) -> 1359.0 (1437.2) MB, 1345.2 / 0.0 ms [allocation failure] [GC in old space requested].
   42580 ms: Mark-sweep 1359.0 (1437.2) -> 1361.9 (1413.2) MB, 1300.8 / 0.0 ms [last resort gc].
   43873 ms: Mark-sweep 1361.9 (1413.2) -> 1364.7 (1413.2) MB, 1292.5 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x14317b2cfb39 <JS Object>
    1: getTypeOfFuncClassEnumModule [/Users/david/Desktop/ecsec/taxi/plugins/nativescript-keystore/publish/src/node_modules/typescript/lib/tsc.js:~24186] [pc=0x3f4d0488399] (this=0x10ad20755ea1 <JS Global Object>,symbol=0x191d40910a59 <a Symbol with map 0x1081ea107641>)
    2: getTypeOfSymbol [/Users/david/Desktop/ecsec/taxi/plugins/nativescript-keystore/publish/src/node_modules/typescript/lib/...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/local/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]
 3: v8::Utils::ReportApiFailure(char const*, char const*) [/usr/local/bin/node]
 4: v8::Utils::ApiCheck(bool, char const*, char const*) [/usr/local/bin/node]
 5: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
 6: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/local/bin/node]
 7: v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
 8: 0x3f4d03079a7
 9: 0x3f4d0488399
10: 0x3f4d04a8cb8
11: 0x3f4d086240e
./pack.sh: line 13: 32492 Abort trap: 6           node_modules/.bin/tsc
Creating package...

Is there any code involved?

At the moment I am not able to provide the code of the project. Hopefully somebody can provide me an advice what the issue could be, anyway.

Update

It seems that this error is rather a problem of the typescript compiler: MS Typescript Issue 1, MS Typescript Issue 2. Should I open an Issue at there repo? I think the main problem in this case would be the reproduction step of the error, because I do not know where exactly the compiler fails...

@dartmann
Copy link
Author

The problem magically disappeared after hours of debugging. I hate it, when I can not figure out what exactly the problem was... 😞
Sorry for any inconvenience and kind regards, David.

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

1 participant