RC.0 Ionic serve FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

When running ionic serve after a couple of builds, it crashes. It’s happening every 15 minutes.
I already did the update for: “@ionic/app-scripts”: “^0.0.23”,

JS changed: www/build/main.js
[18:58:12] typescript compilation started …
[18:58:12] bundle dev update finished in 47.22 s
[18:58:12] sass started …
[18:58:12] sass finished in 511 ms
[18:58:12] bundle dev update started …
[18:58:16] typescript compilation finished in 4.36 s
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

<— Last few GCs —>
372634 ms: Scavenge 1405.2 (1457.3) → 1405.2 (1457.3) MB, 7.7 / 0 ms (+ 2.8 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
374101 ms: Mark-sweep 1405.2 (1457.3) → 1398.4 (1457.3) MB, 1467.3 / 0 ms (+ 4.0 ms in 2 steps since start of marking, biggest step 2.8 ms) [last resort gc].
375645 ms: Mark-sweep 1398.4 (1457.3) → 1400.9 (1457.3) MB, 1543.5 / 0 ms [last resort gc].
<— JS stacktrace —>
==== JS stack trace =========================================
Security context: 0x1b449bfb4629
1: decode(aka decode) [/Volumes/HDD-750/Documents/projects/cuentas_claras_2/cuentas_claras/node_modules/rollup/dist/rollup.js:~304] [pc=0x5a61df910b] (this=0x1b449bf041b9 ,mappings=0x223123f04101 <Very long string[3322750]>)
2: render [/Volumes/HDD-750/Documents/projects/cuentas_claras_2/cuentas_claras/node_modules/rollup/dist/rollup.js:8938] [pc=0x5a61d19dac] (this=0x28a1982…

(master) $ ionic info

Your system information:

Cordova CLI: 6.1.1
Gulp version: CLI version 1.2.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.5.0
ios-sim version: 3.1.1
OS: Mac OS X El Capitan
Node Version: v4.4.3
Xcode version: Xcode 8.0 Build version 8A218a

I met the same issue multiple times in the last day.

Looks like the issue is solved in the master branch of ionic-app-scripts.

You can clone the repo and build it yourself to apply the fix, until they publish a new release:

git clone https://github.com/driftyco/ionic-app-scripts
cd ionic-app-scripts
npm i
npm run build

Then copy all files/folders except node_modules and src to your project, under: node_modules/@ionic/app-scripts/.

Alternatively, you can download the package that I just compiled: https://dl.dropboxusercontent.com/u/35313543/ionic-app-scripts-0.0.27.tgz

I just applied this fix and it seems to be working good so far.


Update: I got rid of the Allocation failed - process out of memory error… but I’m still getting Maximum callstack exceeded

UPDATE #2: Nevermind, even using the master branch of ionic-app-scripts doesn’t fix this problem. But it doesn’t happen as often.

1 Like

Thanks a lot for the response. Seems to be working fine until now.

Unfortunately the problem continues happening.
I deleted the module and put the one you compiled.

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

<— Last few GCs —>
56401227 ms: Scavenge 1396.3 (1457.3) → 1396.3 (1457.3) MB, 5.7 / 0 ms (+ 3.2 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
56402676 ms: Mark-sweep 1396.3 (1457.3) → 1394.2 (1457.3) MB, 1449.4 / 0 ms (+ 4.9 ms in 2 steps since start of marking, biggest step 3.2 ms) [last resort gc].
56404171 ms: Mark-sweep 1394.2 (1457.3) → 1396.3 (1457.3) MB, 1494.2 / 0 ms [last resort gc].
<— JS stacktrace —>
==== JS stack trace =========================================
Security context: 0x595bdab4629
1: decode(aka decode) [/Volumes/HDD-750/Documents/projects/cuentas_claras_2/cuentas_claras/node_modules/rollup/dist/rollup.js:~304] [pc=0x3feed8c701eb] (this=0x595bda041b9 ,mappings=0x1a4dcdc04101 <Very long string[3325575]>)
2: render [/Volumes/HDD-750/Documents/projects/cuentas_claras_2/cuentas_claras/node_modules/rollup/dist/rollup.js:8938] [pc=0x3feed9a0738c] (this=0x290d9…

See issue driftyco/ionic-app-scripts#85.