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

Rocket Chat Rest Api Login error (Server error.) #10581

Closed
hannes-angst opened this issue Apr 25, 2018 · 5 comments · Fixed by #10805
Closed

Rocket Chat Rest Api Login error (Server error.) #10581

hannes-angst opened this issue Apr 25, 2018 · 5 comments · Fixed by #10805
Assignees
Projects
Milestone

Comments

@hannes-angst
Copy link

hannes-angst commented Apr 25, 2018

Issue #10199 got closed too soon.

The system is the same. Only the Rocket.Chat version is now 0.63.3

Curl:

$ curl -v  https://<host>/api/v1/login -d "user=myUser&password=myPassword"
< HTTP/1.1 500 Internal Server Error
< Server: nginx/1.12.2
< Date: Wed, 25 Apr 2018 12:41:37 GMT
< Content-Type: text/html
< Content-Length: 13
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< X-Instance-ID: G5sCcQNLnfgkfzvg8
< Cache-Control: no-store
< Pragma: no-cache
< Vary: Accept-Encoding
<
Server error.

Log (nginx)

POST /api/v1/login HTTP/1.1" 500 13 "-" "curl/7.54.0" "-

Log (Rocket.Chat):

$ journalctl --follow -u rocketchat

rocketchat[14829]: TypeError: Cannot read property 'debug' of undefined
rocketchat[14829]: at Object._internalRouteActionHandler [as action] (/opt/rocket/chat/programs/server/packages/rocketchat_api.js:175:25)
rocketchat[14829]: at Route.share.Route.Route._callEndpoint (/opt/rocket/chat/programs/server/packages/nimble_restivus.js:347:32)
rocketchat[14829]: at /opt/rocket/chat/programs/server/packages/nimble_restivus.js:236:33
rocketchat[14829]: at packages/simple_json-routes.js:98:9
@hannes-angst
Copy link
Author

hannes-angst commented Apr 25, 2018

I do not get a direct match to the code.
Best match is ./packages/rocketchat-api/server/api.js...?

$ git checkout tags/0.63.3
$ find . | grep api.js
./packages/rocketchat-graphql/server/mocks/accounts/graphql-api.js
./packages/rocketchat-graphql/server/api.js
./packages/rocketchat-livechat/server/api.js
./packages/rocketchat-videobridge/client/public/external_api.js
./packages/rocketchat-api/server/api.js
./packages/rocketchat-integrations/server/api/api.js

My guess is that this.logger is not defined when called as this.logger.debug(...).

Any help to trace the problem down is appreciated.

@Chris-Duke
Copy link

Haven't had a chance to look at this, but one of my users is having this very same issue.

@MarcosSpessatto MarcosSpessatto self-assigned this Apr 26, 2018
@MarcosSpessatto MarcosSpessatto added this to the 0.65.0 milestone Apr 26, 2018
@MarcosSpessatto MarcosSpessatto added this to Desirable in May/2018 via automation Apr 26, 2018
@MarcosSpessatto MarcosSpessatto moved this from Desirable to Backlog in May/2018 Apr 26, 2018
@graywolf336
Copy link
Contributor

Hi. @hannes-angst can you please contact either myself or @MarcosSpessatto on https://open.rocket.chat/? This way we can try to debug what the issue is, as we can not reproduce locally nor on our community server. As a result of us not being able to reproduce and your reproduction steps being too generic, I am going to close this. I was able to use the exact curl command with a valid username and password and it worked.

May/2018 automation moved this from Backlog to Done Apr 26, 2018
@guardian-liferay
Copy link

I have installed my new rocket chat and i still got the same problem
May I know how to fix this?
Here is my logs snapshot.
assist4-rocketchat | ➔ +-----------------------------------------------------------------+ assist4-rocketchat | ➔ | SERVER RUNNING | assist4-rocketchat | ➔ +-----------------------------------------------------------------+ assist4-rocketchat | ➔ | | assist4-rocketchat | ➔ | Rocket.Chat Version: 0.64.1 | assist4-rocketchat | ➔ | NodeJS Version: 8.9.3 - x64 | assist4-rocketchat | ➔ | Platform: linux | assist4-rocketchat | ➔ | Process Port: 3000 | assist4-rocketchat | ➔ | Site URL: https://dev04.ccoc.applabs.nec.com.au/im | assist4-rocketchat | ➔ | ReplicaSet OpLog: Disabled | assist4-rocketchat | ➔ | Commit Hash: 54738c011b | assist4-rocketchat | ➔ | Commit Branch: HEAD | assist4-rocketchat | ➔ | | assist4-rocketchat | ➔ +-----------------------------------------------------------------+ assist4-rocketchat | TypeError: Cannot read property 'debug' of undefined assist4-rocketchat | at Object._internalRouteActionHandler [as action] (/app/bundle/programs/server/packages/rocketchat_api.js:181:25) assist4-rocketchat | at Route.share.Route.Route._callEndpoint (/app/bundle/programs/server/packages/nimble_restivus.js:347:32) assist4-rocketchat | at /app/bundle/programs/server/packages/nimble_restivus.js:236:33 assist4-rocketchat | at packages/simple_json-routes.js:98:9 assist4-rocketchat | assist4-rocketchat | TypeError: Cannot read property 'debug' of undefined assist4-rocketchat | at Object._internalRouteActionHandler [as action] (/app/bundle/programs/server/packages/rocketchat_api.js:181:25) assist4-rocketchat | at Route.share.Route.Route._callEndpoint (/app/bundle/programs/server/packages/nimble_restivus.js:347:32) assist4-rocketchat | at /app/bundle/programs/server/packages/nimble_restivus.js:236:33 assist4-rocketchat | at packages/simple_json-routes.js:98:9

@haffla
Copy link
Contributor

haffla commented May 17, 2018

I can only cofirm this! When trying to login via REST API => Server error. Same log entries like @hannes-angst. Version 0.64.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
May/2018
  
Done
Development

Successfully merging a pull request may close this issue.

6 participants