Skip to content

gulp test fails, hangs and causes V8 heap exhaustion in clean project #2377

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

Open
1 task done
csvan opened this issue Dec 4, 2016 · 0 comments
Open
1 task done

gulp test fails, hangs and causes V8 heap exhaustion in clean project #2377

csvan opened this issue Dec 4, 2016 · 0 comments

Comments

@csvan
Copy link

csvan commented Dec 4, 2016

  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 4.1
Node 6.9.1
npm 3.10.8
Operating System Ubuntu 16.10
Item Answer
Transpiler TypeScript
Markup HTM
CSS SCSS
Router ui-router
Client Tests Mocha
DB SQL
Auth Y

To reproduce, create clean project with the above settings and run gulp test. Output is:

[09:43:23] Requiring external module babel-register
[09:43:24] Using gulpfile ~/IdeaProjects/crossreal/gulpfile.babel.js
(node:6916) DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
(node:6916) DeprecationWarning: crypto.Credentials is deprecated. Use tls.SecureContext instead.
[09:43:24] Starting 'test'...
[09:43:24] Starting 'test:server'...
[09:43:24] Starting 'env:all'...
[09:43:24] Finished 'env:all' after 31 ms
[09:43:24] Starting 'env:test'...
[09:43:24] Finished 'env:test' after 231 μs
[09:43:24] Starting 'mocha:unit'...


  Thing API Router:
    ✓ should return an express router instance
    GET /api/things
      ✓ should route to thing.controller.index
    GET /api/things/:id
      ✓ should route to thing.controller.show
    POST /api/things
      ✓ should route to thing.controller.create
    PUT /api/things/:id
      ✓ should route to thing.controller.upsert
    PATCH /api/things/:id
      ✓ should route to thing.controller.patch
    DELETE /api/things/:id
      ✓ should route to thing.controller.destroy

  User API Router:
    ✓ should return an express router instance
    GET /api/users
      ✓ should verify admin role and route to user.controller.index
    DELETE /api/users/:id
      ✓ should verify admin role and route to user.controller.destroy
    GET /api/users/me
      ✓ should be authenticated and route to user.controller.me
    PUT /api/users/:id/password
      ✓ should be authenticated and route to user.controller.changePassword
    GET /api/users/:id
      ✓ should be authenticated and route to user.controller.show
    POST /api/users
      ✓ should route to user.controller.create

  User Model
    ✓ should begin with no users
Express server listening on 9000, in test mode
(node:6916) DeprecationWarning: crypto.pbkdf2 without specifying a digest is deprecated. Please specify a digest
    ✓ should fail when saving a duplicate user (86ms)
    #email
      ✓ should fail when saving without an email
    #password
      ✓ should authenticate user if valid (56ms)
      ✓ should not authenticate user if invalid (42ms)
      ✓ should remain the same hash unless the password is updated (66ms)


  20 passing (585ms)

[09:43:26] Finished 'mocha:unit' after 1.49 s
[09:43:26] Starting 'mocha:integration'...


  Thing API:
    GET /api/things
GET /api/things 200 12.363 ms - 2
      ✓ should respond with JSON array
    POST /api/things
Express server listening on 9000, in test mode
POST /api/things 201 15.370 ms - 68
      ✓ should respond with the newly created thing
    GET /api/things/:id
GET /api/things/1 200 7.703 ms - 82
      ✓ should respond with the requested thing
    PUT /api/things/:id
      1) "before each" hook for "should respond with the original thing"
    PATCH /api/things/:id
PATCH /api/things/1 200 21.153 ms - 84
      ✓ should respond with the patched thing
    DELETE /api/things/:id
DELETE /api/things/1 204 45.571 ms - -
      ✓ should respond with 204 on successful removal (51ms)
DELETE /api/things/1 404 23.278 ms - -
      ✓ should respond with 404 when thing does not exist

  User API:
    GET /api/users/me
POST /auth/local 200 25.389 ms - 169
GET /api/users/me 200 5.802 ms - 162
      ✓ should respond with a user profile when authenticated
GET /api/users/me 401 6.414 ms - 408
      ✓ should respond with a 401 when not authenticated


  8 passing (5s)
  1 failing

  1) Thing API: PUT /api/things/:id "before each" hook for "should respond with the original thing":
     Error: timeout of 5000ms exceeded. Ensure the done() callback is being called in this test.
  



^C^C


^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C


<--- Last few GCs --->

   48084 ms: Mark-sweep 1283.0 (1447.9) -> 1283.0 (1447.9) MB, 231.3 / 0.0 ms [allocation failure] [scavenge might not succeed].
   48333 ms: Mark-sweep 1283.0 (1447.9) -> 1283.0 (1447.9) MB, 248.5 / 0.0 ms [allocation failure] [scavenge might not succeed].
   48600 ms: Mark-sweep 1283.0 (1447.9) -> 1286.2 (1430.9) MB, 267.5 / 0.0 ms [last resort gc].
   48843 ms: Mark-sweep 1286.2 (1430.9) -> 1289.6 (1430.9) MB, 242.4 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

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

Security context: 0x338f13bcfb51 <JS Object>
    1: captureStackTrace [native messages.js:~686] [pc=0x1056523cfe07] (this=0x338f13be6119 <JS Global Object>,Q=0x3d3a644fd401 <an Error with map 0x270dbe3c2221>,bp=0x338f13bb73c1 <JS Function Error (SharedFunctionInfo 0x338f13b79b81)>)
    2: new constructor(aka Error) [native messages.js:639] [pc=0x105651bbec91] (this=0x3d3a644fd401 <an Error with map 0x270dbe3c2221>,bn=0x338f13b04381 <undef...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [gulp]
 2: 0x558dd7fd8a5e [gulp]
 3: v8::Utils::ReportApiFailure(char const*, char const*) [gulp]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [gulp]
 5: v8::internal::Factory::NewFixedArrayWithHoles(int, v8::internal::PretenureFlag) [gulp]
 6: v8::internal::Isolate::CaptureSimpleStackTrace(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>) [gulp]
 7: v8::internal::Isolate::CaptureAndSetSimpleStackTrace(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>) [gulp]
 8: v8::internal::Runtime_CollectStackTrace(int, v8::internal::Object**, v8::internal::Isolate*) [gulp]
 9: 0x1056507092a7

Aborted (core dumped)
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