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

Debugging via WebStorm causes not redirecting when logging in #4791

Closed
jiangcaiyang opened this issue Jun 26, 2016 · 3 comments
Closed

Debugging via WebStorm causes not redirecting when logging in #4791

jiangcaiyang opened this issue Jun 26, 2016 · 3 comments

Comments

@jiangcaiyang
Copy link

When debugging via WebStorm using NodeBB 1.0.3, the latest version 2016-06-26 14:53:49
When we log into our forum using correct user name and password however, the forum does not redirect to the last page viewed.

the sever-end echos nothing noticable:

/home/jiangcaiyang/Develop/node-v4.4.4-linux-x64/bin/node --debug-brk=36961 app.js
Debugger listening on port 36961
26/6 14:58 [4745] - info: NodeBB v1.0.3 Copyright (C) 2013-2014 NodeBB Inc.
26/6 14:58 [4745] - info: This program comes with ABSOLUTELY NO WARRANTY.
26/6 14:58 [4745] - info: This is free software, and you are welcome to redistribute it under certain conditions.
26/6 14:58 [4745] - info: 
26/6 14:58 [4745] - info: Time: Sun Jun 26 2016 14:58:58 GMT+0800 (CST)
26/6 14:58 [4745] - info: Initializing NodeBB v1.0.3
26/6 14:58 [4745] - info: [database] Checking database indices.
26/6 14:59 [4745] - warn: [plugins/nodebb-plugin-composer-default] Hook `filter:composer.build` parameters: `{req, res}`, are being deprecated, all plugins should now use the `middleware/cls` module instead of hook's arguments to get a reference to the `http-request` or the `socket-request` object(s) (from which you can get the current `uid` if you need to.) - for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-each-request-from-within-any-plugin-hook

26/6 14:59 [4745] - warn: [plugins/nodebb-widget-essentials] Hook `filter:widget.render` parameters: `{req, res}`, are being deprecated, all plugins should now use the `middleware/cls` module instead of hook's arguments to get a reference to the `http-request` or the `socket-request` object(s) (from which you can get the current `uid` if you need to.) - for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-each-request-from-within-any-plugin-hook

26/6 14:59 [4745] - warn: [plugins/nodebb-plugin-spam-be-gone] Hook `filter:register.build` parameters: `{req, res}`, are being deprecated, all plugins should now use the `middleware/cls` module instead of hook's arguments to get a reference to the `http-request` or the `socket-request` object(s) (from which you can get the current `uid` if you need to.) - for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-each-request-from-within-any-plugin-hook

26/6 14:59 [4745] - warn: [plugins/nodebb-plugin-spam-be-gone] Hook `filter:register.check` parameters: `{req, res}`, are being deprecated, all plugins should now use the `middleware/cls` module instead of hook's arguments to get a reference to the `http-request` or the `socket-request` object(s) (from which you can get the current `uid` if you need to.) - for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-each-request-from-within-any-plugin-hook

26/6 14:59 [4745] - warn: [plugins/nodebb-plugin-category-sections] Hook `action:homepage.get` parameters: `{req, res}`, are being deprecated, all plugins should now use the `middleware/cls` module instead of hook's arguments to get a reference to the `http-request` or the `socket-request` object(s) (from which you can get the current `uid` if you need to.) - for more info, visit https://docs.nodebb.org/en/latest/plugins/create.html#getting-a-reference-to-each-request-from-within-any-plugin-hook


26/6 14:59 [4745] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
  * nodebb-theme-lavender
  * nodebb-plugin-mentions
  * nodebb-plugin-category-notifications
  * nodebb-plugin-quanmintv
  * nodebb-plugin-sketchfab
  * nodebb-plugin-emailer-local

26/6 14:59 [4745] - info: NodeBB Ready
26/6 14:59 [4745] - info: Enabling 'trust proxy'
26/6 14:59 [4745] - info: NodeBB is now listening on: 0.0.0.0:1111
26/6 14:59 [4745] - info: [plugins/spam-be-gone] Settings loaded

the front-end shows 'login failed':
0_1466925626643_upload-dd11ccfa-131c-4255-8a3a-43c8dc522772

Is it because of NodeBB's bug?

@pitaj
Copy link
Contributor

pitaj commented Jul 15, 2016

Does it work without debugging? If not, it's probably an incompatible plugin.

@jiangcaiyang
Copy link
Author

It is, by my investigation, due to the fact that we forked a password verification process, that could not be controlled by debugging process, see also: https://community.nodebb.org/topic/9147/debugging-via-webstorm-causing-nodebb-not-respond-when-logging-in/5

@barisusakli
Copy link
Member

I am able to debug, login and get redirected with VS code after the above commit.

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "node",
            "request": "launch",
            "program": "${workspaceRoot}/app.js",
            "stopOnEntry": false,
            "args": [],
            "cwd": "${workspaceRoot}",
            "preLaunchTask": null,
            "runtimeExecutable": null,
            "runtimeArgs": [
                "--nolazy"
            ],
            "env": {
                "NODE_ENV": "development"
            },
            "externalConsole": false,
            "sourceMaps": false,
            "outDir": null
        },
        {
            "name": "Attach",
            "type": "node",
            "request": "attach",
            "port": 5859,
            "address": "localhost",
            "restart": false,
            "sourceMaps": false,
            "outDir": null,
            "localRoot": "${workspaceRoot}",
            "remoteRoot": null
        }
    ]
}

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

3 participants