You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
I'm building my vanila nativescript project with webpack + jscrambler. For iOS it builds with no issues, however for Android it fails with "[ERROR] FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory".
Running full build
Warning: there already is an extend called undefined.
Warning: The static binding generator will generate extend from:vendor.js implementation
<--- Last few GCs --->
[3765:0x102801600] 120827 ms: Mark-sweep 1403.2 (1463.6) -> 1403.1 (1432.6) MB, 3170.3 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 3170 ms) last resort
[3765:0x102801600] 123679 ms: Mark-sweep 1403.1 (1432.6) -> 1403.1 (1432.6) MB, 2852.6 / 0.0 ms last resort
Security context: 0x13f996a266a1
1: get [/Users/user/Documents/dev/NativeScript/MyApp/node_modules/babel-traverse/lib/path/index.js:~76] [pc=0xfd743b32069](this=0x284745236711 <JS Function NodePath (SharedFunctionInfo 0x317ec69995a1)>,_ref=0x3fe4114bab71 <an Object with map 0x3405d470ec79>)
2: node [/Users/user/Documents/dev/NativeScript/MyApp/node_modules/babel-traverse/lib/index.js:~94] [pc=0xfd743bbfcee](t...
gave the following error:
[ERROR] 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::Localv8::Value, v8::Localv8::Message) [/usr/local/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
4: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/local/bin/node]
5: v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
6: 0xfd74390ed46
7: 0xfd743b32069
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at org.nativescript.staticbindinggenerator.Generator.getBaseDir(Generator.java:307)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:86)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:157)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:77)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:54)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:15)
@NickIliev, thank you, but I did try all of those before and it didn't help.
The Jscrambler support helped me to fix the issue. This is their reply "...the problem lies in the usage of the duplicateLiterals removal transformation. Since you have a lot of numbers in your source code, the transformation is generating a bundle that can go up to 10 times the size of the original. " I adjusted jscrambler.json like they had suggested and it fixed the issue for me. Maybe this will be useful for someone else struggling with the error.
I'm building my vanila nativescript project with webpack + jscrambler. For iOS it builds with no issues, however for Android it fails with "[ERROR] FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory".
My environment:
tns cli 3.3.0
package.json
Error:
Running full build
Warning: there already is an extend called undefined.
Warning: The static binding generator will generate extend from:vendor.js implementation
<--- Last few GCs --->
[3765:0x102801600] 120827 ms: Mark-sweep 1403.2 (1463.6) -> 1403.1 (1432.6) MB, 3170.3 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 3170 ms) last resort
[3765:0x102801600] 123679 ms: Mark-sweep 1403.1 (1432.6) -> 1403.1 (1432.6) MB, 2852.6 / 0.0 ms last resort
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x13f996a266a1
1: get [/Users/user/Documents/dev/NativeScript/MyApp/node_modules/babel-traverse/lib/path/index.js:~76] [pc=0xfd743b32069](this=0x284745236711 <JS Function NodePath (SharedFunctionInfo 0x317ec69995a1)>,_ref=0x3fe4114bab71 <an Object with map 0x3405d470ec79>)
2: node [/Users/user/Documents/dev/NativeScript/MyApp/node_modules/babel-traverse/lib/index.js:~94] [pc=0xfd743bbfcee](t...
gave the following error:
[ERROR] 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::Localv8::Value, v8::Localv8::Message) [/usr/local/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
4: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/local/bin/node]
5: v8::internal::Runtime_AllocateInTargetSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
6: 0xfd74390ed46
7: 0xfd743b32069
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at org.nativescript.staticbindinggenerator.Generator.getBaseDir(Generator.java:307)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:86)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:157)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:77)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:54)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:15)
FAILURE: Build failed with an exception.
Where:
Build file '/Users/user/Documents/dev/NativeScript/MyApp/platforms/android/build-tools/android-static-binding-generator/build.gradle' line: 279
What went wrong:
Execution failed for task ':asbg:generateBindings'.
The text was updated successfully, but these errors were encountered: