Skip to content

Application crashes on load with error #4

@seethun

Description

@seethun

Sails version: 1.1.0
Node version: v11.0.0
NPM version: 6.9.0
DB adapter name: sails-mysql
DB adapter version: 1.0.1
Operating system: ubuntu


I installed this module, and customized the findOne blueprint action in /api/blueprints as documented. I get the following error when loading the application, and the application crashes on load. Please help

Steps to reproduce error:

cd testproject; cp node_modules/sails/lib/hooks/blueprints/actions/findOne.js api/blueprints

commented out this line in api/blueprints/findOne.js:
//queryOptions.criteria.where = _.pick(queryOptions.criteria.where, Model.primaryKey);

sails lift

I get the following error message on sails lift - and the application crashes:

``
...
info: ✓ Auto-migration complete.


WARNING: Something seems to be wrong with this function.
It is trying to signal that it has finished AGAIN, after
already resolving/rejecting once.
(silently ignoring this...)

To assist you in hunting this down, here is a stack trace:

    at Object.releaseConnection (/home/ubuntu/dev/testproject/node_modules/sails-mysql/helpers/private/connection/release-connection.js:27:9)
    at buildIndexesCb (/home/ubuntu/dev/testproject/node_modules/sails-mysql/helpers/define.js:143:30)
    at /home/ubuntu/dev/testproject/node_modules/sails-mysql/node_modules/async/dist/async.js:486:20
    at replenish (/home/ubuntu/dev/testproject/node_modules/sails-mysql/node_modules/async/dist/async.js:879:29)
    at iterateeCallback (/home/ubuntu/dev/testproject/node_modules/sails-mysql/node_modules/async/dist/async.js:869:21)
    at /home/ubuntu/dev/testproject/node_modules/sails-mysql/node_modules/async/dist/async.js:847:20
    at Object.success (/home/ubuntu/dev/testproject/node_modules/sails-mysql/helpers/private/query/run-native-query.js:64:14)
    at /home/ubuntu/dev/testproject/node_modules/machine/lib/private/help-build-machine.js:1517:30
    at proceedToFinalAfterExecLC (/home/ubuntu/dev/testproject/node_modules/parley/lib/private/Deferred.js:1151:14)
    at proceedToInterceptsAndChecks (/home/ubuntu/dev/testproject/node_modules/parley/lib/private/Deferred.js:909:12)
    at proceedToAfterExecSpinlocks (/home/ubuntu/dev/testproject/node_modules/parley/lib/private/Deferred.js:841:10)
    at /home/ubuntu/dev/testproject/node_modules/parley/lib/private/Deferred.js:303:7
    at /home/ubuntu/dev/testproject/node_modules/machine/lib/private/help-build-machine.js:954:24
    at Function.handlerCbs.success (/home/ubuntu/dev/testproject/node_modules/machine/lib/private/help-build-machine.js:814:26)
    at Query.query [as _callback] (/home/ubuntu/dev/testproject/node_modules/machinepack-mysql/lib/send-native-query.js:320:20)
    at Query.Sequence.end (/home/ubuntu/dev/testproject/node_modules/machinepack-mysql/node_modules/mysql/lib/protocol/sequences/Sequence.js:88:24)
    at Query._handleFinalResultPacket (/home/ubuntu/dev/testproject/node_modules/machinepack-mysql/node_modules/mysql/lib/protocol/sequences/Query.js:139:8)
    at Query.OkPacket (/home/ubuntu/dev/testproject/node_modules/machinepack-mysql/node_modules/mysql/lib/protocol/sequences/Query.js:72:10)
    at Protocol._parsePacket (/home/ubuntu/dev/testproject/node_modules/machinepack-mysql/node_modules/mysql/lib/protocol/Protocol.js:279:23)
    at Parser.write (/home/ubuntu/dev/testproject/node_modules/machinepack-mysql/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/home/ubuntu/dev/testproject/node_modules/machinepack-mysql/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/home/ubuntu/dev/testproject/node_modules/machinepack-mysql/node_modules/mysql/lib/Connection.js:103:28)

[?] For more help, visit https://sailsjs.com/support


error: Failed to lift app: Error: Sails is taking too long to load.


Troubleshooting tips:
-• Were you still reading/responding to an interactive prompt?
(Whoops, sorry! Please lift again and try to respond a bit more quickly.)

-• Do you have a lot of stuff in assets/? Grunt might still be running.
(Try increasing the hook timeout. Currently it is 40000.
e.g. sails lift --hookTimeout=80000)

-• Is pubsub a custom or 3rd party hook?
(If initialize() is using a callback, make sure it's being called.)


at Timeout.tooLong [as _onTimeout] (/home/ubuntu/dev/testproject/node_modules/sails/lib/app/private/loadHooks.js:191:21)
at listOnTimeout (timers.js:324:15)
at processTimers (timers.js:268:5)

``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions