Issues when logging in with seed data
Im trying to set up gitter locally and was following the dev instrument but for some reason the generated access token from create-seed-data
only seems to be valid for a few minutes. Im not sure whats going on
I do the below steps
npm run create-seed-data
this is my output
There is now a public room http://localhost:5000/_test_71596277169102
And there are two users:
User A (_testuser_31596277169102) is an admin of the room
- you can log in by going to http://localhost:5000/?access_token=_test_b2e480c6_a6aa_4f10_b7c2_2c697901df46
User B (_testuser_61596277169102) is not a member of the room
- you can log in by going to http://localhost:5000/?access_token=_test_66b572a2_d77a_4b13_a793_f0d5b8c0fef5
========================
redis handler failed during shutdown: TypeError: Cannot read property 'activeMasterClient' of undefined
i go ahead and try to login with either of the above URLs - i get logged in but the server shows the below logs
message:
'{"message":"Requires authentication","documentation_url":"https://developer.github.com/v3/orgs/#list-your-organizations"}',
2020-08-01T10:19:38.390Z - info: Tentacles 401 error.
{ exception:
{ message: 'Requires authentication',
stack:
'TentaclesGitHubError: Requires authentication\n at /home/kj/webapp/node_modules/tentacles/lib/client.js:142:27\n at /home/kj/webapp/modules/github/lib/fetch-all-pages.js:62:44\n at /home/kj/webapp/modules/github/lib/log-failing-request.js:43:12\n at /home/kj/webapp/node_modules/request-http-cache/lib/index.js:243:7\n at /home/kj/webapp/modules/github/lib/request-with-retry.js:50:16\n at Request._callback (/home/kj/webapp/modules/github/lib/log-rate-limit.js:30:12)\n at Request.self.callback (/home/kj/webapp/node_modules/request-extensible/node_modules/request/request.js:185:22)\n at Request.emit (events.js:198:13)\n at Request.EventEmitter.emit (domain.js:448:20)\n at Request.<anonymous> (/home/kj/webapp/node_modules/request-extensible/node_modules/request/request.js:1161:10)\n at Request.emit (events.js:198:13)\n at Request.EventEmitter.emit (domain.js:448:20)\n at IncomingMessage.<anonymous> (/home/kj/webapp/node_modules/request-extensible/node_modules/request/request.js:1083:12)\n at Object.onceWrapper (events.js:286:20)\n at IncomingMessage.emit (events.js:203:15)\n at IncomingMessage.EventEmitter.emit (domain.js:448:20)\n at endReadableNT (_stream_readable.js:1145:12)\n at process._tickCallback (internal/process/next_tick.js:63:19)\nFrom previous event:\n at Client._request (/home/kj/webapp/node_modules/tentacles/lib/client.js:105:19)\n at Constructor.fn [as listForAuthUser] (/home/kj/webapp/node_modules/tentacles/lib/Method.js:74:25)\n at ServiceWrapper.GitHubMeService.getOrgs (/home/kj/webapp/modules/github/lib/github-me-service.js:37:24)\n at /home/kj/webapp/modules/github/lib/github-cache-wrapper.js:79:34\n at StandardCachePolicy.fetchValuesAndSave (/home/kj/webapp/node_modules/snappy-cache/lib/cache-policy/standard.js:54:3)\n at /home/kj/webapp/node_modules/snappy-cache/lib/cache-policy/standard.js:32:19\n at try_callback (/home/kj/webapp/node_modules/@gitterhq/env/node_modules/redis/index.js:573:9)\n at RedisClient.return_reply (/home/kj/webapp/node_modules/@gitterhq/env/node_modules/redis/index.js:661:13)\n at ReplyParser.<anonymous> (/home/kj/webapp/node_modules/@gitterhq/env/node_modules/redis/index.js:309:14)\n at ReplyParser.emit (events.js:198:13)\n at ReplyParser.EventEmitter.emit (domain.js:448:20)\n at ReplyParser.send_reply (/home/kj/webapp/node_modules/@gitterhq/env/node_modules/redis/lib/parser/javascript.js:300:10)\n at ReplyParser.execute (/home/kj/webapp/node_modules/@gitterhq/env/node_modules/redis/lib/parser/javascript.js:203:22)\n at RedisClient.on_data (/home/kj/webapp/node_modules/@gitterhq/env/node_modules/redis/index.js:534:27)\n at Socket.<anonymous> (/home/kj/webapp/node_modules/@gitterhq/env/node_modules/redis/index.js:91:14)\n at Socket.emit (events.js:198:13)\n at Socket.EventEmitter.emit (domain.js:448:20)\n at addChunk (_stream_readable.js:288:12)\n at readableAddChunk (_stream_readable.js:269:11)\n at Socket.Readable.push (_stream_readable.js:224:10)\n at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)',
name: 'TentaclesGitHubError' },
headersIncluded: true,
category: 'github' }
2020-08-01T10:19:38.390Z - info: token-error-handler: logout_destroy_user_tokens error caught
2020-08-01T10:19:38.390Z - warn: logout-destroy-tokens: performing logout
{ userId: '5f2541b11d3cdf3c2c74a2ca',
username: '_testuser_31596277169102' }
2020-08-01T10:19:38.390Z - info: logout: logging out user
{ userId: '5f2541b11d3cdf3c2c74a2ca',
username: '_testuser_31596277169102' }
im guessing the above error invalidates the access_token somehow because i get the below dialog popup in my browser saying my token is no longer valid
My redis,mongo, es and neo4j containers all seem to be working fine
Workarounds
Run the app with the GItHUB API disabled:
DISABLE_GITHUB_API=1 npm start
(set DISABLE_GITHUB_API=1&&npm start
for Windows)
Edited by Eric Eastwood