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

keystone application crash when enable 'trace' #629

Open
yuecchen opened this issue Nov 15, 2019 · 0 comments
Open

keystone application crash when enable 'trace' #629

yuecchen opened this issue Nov 15, 2019 · 0 comments

Comments

@yuecchen
Copy link
Contributor

yuecchen commented Nov 15, 2019

keystoneForjoyce.zip

Firstly, we do npm install to install dependencies, then we just add

var appmetrics = require('appmetrics');

to application, and run the application, it runs good:

[root@joycevm1 keystoneForjoyce]# node keystone.js
[Thu Nov 14 19:02:45 2019] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 5.1.1.201911141856 (Agent Core 4.0.5)
------------------------------------------------
Applying update 0.0.1-admins...

------------------------------------------------
keystone: Successfully applied update 0.0.1-admins.

Successfully created:

*   1 User Model


------------------------------------------------
Successfully applied 1 update.
------------------------------------------------

------------------------------------------------
KeystoneJS Started:
keystone is ready on http://0.0.0.0:3001
------------------------------------------------

GET /admin 404 6.831 ms
GET / 200 950.819 ms
GET /blog 200 228.102 ms
GET / 304 120.690 ms
GET /keystone/signin 200 11.809 ms
GET / 304 302.079 ms
......

Then, we add such a line after the require('appmetrics') line:

appmetrics.enable('trace');

then restart the application, it crash at once:

[root@joycevm1 keystoneForjoyce]# node keystone.js
[Thu Nov 14 19:03:59 2019] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 5.1.1.201911141856 (Agent Core 4.0.5)
/root/Node/App/keystone/keystoneForjoyce/node_modules/finalhandler/node_modules/statuses/index.js:67
    statuses[message.toLowerCase()] = status
                     ^

TypeError: message.toLowerCase is not a function
    at forEachCode (/root/Node/App/keystone/keystoneForjoyce/node_modules/finalhandler/node_modules/statuses/index.js:67:22)
    at Array.forEach (<anonymous>)
    at populateStatusesMap (/root/Node/App/keystone/keystoneForjoyce/node_modules/finalhandler/node_modules/statuses/index.js:60:22)
    at Object.<anonymous> (/root/Node/App/keystone/keystoneForjoyce/node_modules/finalhandler/node_modules/statuses/index.js:25:16)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:636:17)

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