Skip to content

[$50] Prod - Users not able to access challenge discussion post registration on a contest #618

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

Closed
m-yadav opened this issue May 10, 2021 · 11 comments

Comments

@m-yadav
Copy link

m-yadav commented May 10, 2021

Registered users are getting permission denied error while trying to access the challenge discussion page.

for instance the error is observed on https://www.topcoder.com/challenges/53039ebe-384b-4f55-b768-dec66bc1c259?tab=details
the challenge discussion link is : https://discussions.topcoder.com/categories/53039ebe-384b-4f55-b768-dec66bc1c259

Ideally the users when registered should be able to access challenge discussion forum

image

@jmgasper jmgasper changed the title Users not able to access challenge discussion post registration on a contest [$50] Prod - Users not able to access challenge discussion post registration on a contest May 10, 2021
@jmgasper
Copy link
Collaborator

Challenge https://www.topcoder.com/challenges/f9d7c8a1-5d54-4e61-af23-3d3cc3e747f2 has been created for this ticket.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator

Challenge https://www.topcoder.com/challenges/f9d7c8a1-5d54-4e61-af23-3d3cc3e747f2 has been assigned to obog.

This is an automated message for ghostar via Topcoder X

@atelomycterus
Copy link
Collaborator

@jmgasper Need your help with this issue.

  1. Could you provide the names of users who cannot access the group challenge? I'll check UserGroup table.
  2. Could you provide Vanilla log file from PROD?
  3. Could you provide a challenge forum processor log file from PROD?

@atelomycterus
Copy link
Collaborator

@jmgasper I registered for the challenge but I haven't been added to UserGroup table in Vanilla.
In this way, either no events are generated or an error in the challenge forum processor. First need to look at a challenge forum processor log. Could you provide a challenge forum processor log file from PROD?

@Dara-K
Copy link

Dara-K commented May 10, 2021

@atelomycterus Me and irfanrosandi, couldn't access this design challenge, but the support team send me an invitation and that is solved. They are still working with irfanrosandi on it.

However there are other members with same issue:

Examples:
lavisht22 can't access this challenge:
https://www.topcoder.com/challenges/96e52d11-6f8d-4c5c-9261-1a7a2ab52de3?tab=details

Z.paint can't access this one:
https://www.topcoder.com/challenges/574e9ec4-5761-4551-90bb-37fd809443a4?tab=details

@sdgun sdgun added P0 bug Something isn't working labels May 10, 2021
@jmgasper
Copy link
Collaborator

jmgasper commented May 10, 2021

@atelomycterus - Logs:

2021-05-10T10:10:43.279Z [debug]: Message from challenge.action.resource.create: [{"id":"9f9226bd-f06f-4d5b-8a36-a0999871cf68","challengeId":"b17c63a3-2720-4753-8474-32a5e2ef23fb","memberId":"22731350","memberHandle":"panoptimum","roleId":"732339e7-8e30-49d7-9198-cccf9451e221","created":"2021-05-10T10:10:42.000Z","createdBy":"ajay.saini"}]
2021-05-10T10:10:43.761Z [info]: Managing user for challengeID=b17c63a3-2720-4753-8474-32a5e2ef23fb [action=invite, handle=panoptimum, projectRole=null, challengeRoles=["Submitter"]]...
2021-05-10T10:10:44.106Z [error]: { Error: Not Found
    at Request.callback (/challenge-forum-processor/node_modules/superagent/lib/node/index.js:871:15)
    at /challenge-forum-processor/node_modules/superagent/lib/node/index.js:1114:20
    at IncomingMessage.<anonymous> (/challenge-forum-processor/node_modules/superagent/lib/node/parsers/json.js:22:7)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
  status: 404,
  response:
   Response {
     domain: null,
     _events: {},
     _eventsCount: 0,
     _maxListeners: undefined,
     res:
      IncomingMessage {
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _eventsCount: 4,
        _maxListeners: undefined,
        socket: [Object],
        connection: [Object],
        httpVersionMajor: 1,
        httpVersionMinor: 1,
        httpVersion: '1.1',
        complete: true,
        headers: [Object],
        rawHeaders: [Array],
        trailers: {},
        rawTrailers: [],
        upgrade: false,
        url: '',
        method: null,
        statusCode: 404,
        statusMessage: 'Not Found',
        client: [Object],
        _consuming: true,
        _dumped: false,
        req: [Object],
        text: '{\n    "message": "/api/v2/users/by-names not found.",\n    "status": 404,\n    "description": null\n}',
        read: [Function] },
     request:
      Request {
        domain: null,
        _events: [Object],
        _eventsCount: 1,
        _maxListeners: undefined,
        _enableHttp2: false,
        _agent: false,
        _formData: null,
        method: 'GET',
        url: 'https://discussions.topcoder.com/api/v2/users/by-names?access_token=&name=panoptimum',
        _header: {},
        header: {},
        writable: true,
        _redirects: 0,
        _maxRedirects: 5,
        cookies: '',
        qs: {},
        _query: [],
        qsRaw: [],
        _redirectList: [],
        _streamRequest: false,
        req: [Object],
        protocol: 'https:',
        host: 'discussions.topcoder.com',
        _endCalled: true,
        _callback: [Function],
        _fullfilledPromise: [Object],
        res: [Object],
        _resBuffered: true,
        response: [Circular],
        called: true },
     req:
      ClientRequest {
        domain: null,
        _events: [Object],
        _eventsCount: 3,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        upgrading: false,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: false,
        sendDate: false,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: 0,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'GET /api/v2/users/by-names?access_token=&name=panoptimum HTTP/1.1\r\nHost: discussions.topcoder.com\r\nAccept-Encoding: gzip, deflate\r\nConnection: close\r\n\r\n',
        _onPendingData: [Function: noopPendingOutput],
        agent: [Object],
        socketPath: undefined,
        timeout: undefined,
        method: 'GET',
        path: '/api/v2/users/by-names?access_token=&name=panoptimum',
        _ended: true,
        res: [Object],
        aborted: undefined,
        timeoutCb: null,
        upgradeOrConnect: false,
        parser: null,
        maxHeadersCount: null,
        [Symbol(outHeadersKey)]: [Object] },
     text: '{\n    "message": "/api/v2/users/by-names not found.",\n    "status": 404,\n    "description": null\n}',
     body:
      { message: '/api/v2/users/by-names not found.',
        status: 404,
        description: null },
     files: undefined,
     buffered: true,
     headers:
      { date: 'Mon, 10 May 2021 10:10:44 GMT',
        'content-type': 'application/json; charset=utf-8',
        'transfer-encoding': 'chunked',
        connection: 'close',
        server: 'Apache/2.4.29 (Ubuntu)',
        p3p: 'CP="CAO PSA OUR"',
        'cache-control': 'private, no-cache, max-age=0, must-revalidate',
        expires: 'Sat, 01 Jan 2000 00:00:00 GMT',
        pragma: 'no-cache',
        vdk: '3.3',
        'content-security-policy': '',
        'strict-transport-security': 'max-age=604800' },
     header:
      { date: 'Mon, 10 May 2021 10:10:44 GMT',
        'content-type': 'application/json; charset=utf-8',
        'transfer-encoding': 'chunked',
        connection: 'close',
        server: 'Apache/2.4.29 (Ubuntu)',
        p3p: 'CP="CAO PSA OUR"',
        'cache-control': 'private, no-cache, max-age=0, must-revalidate',
        expires: 'Sat, 01 Jan 2000 00:00:00 GMT',
        pragma: 'no-cache',
        vdk: '3.3',
        'content-security-policy': '',
        'strict-transport-security': 'max-age=604800' },
     statusCode: 404,
     status: 404,
     statusType: 4,
     info: false,
     ok: false,
     redirect: false,
     clientError: true,
     serverError: false,
     error:
      { Error: cannot GET /api/v2/users/by-names?access_token=&name=panoptimum (404)
    at Response.toError (/challenge-forum-processor/node_modules/superagent/lib/node/response.js:98:13)
    at ResponseBase._setStatusProperties (/challenge-forum-processor/node_modules/superagent/lib/response-base.js:119:48)
    at new Response (/challenge-forum-processor/node_modules/superagent/lib/node/response.js:44:8)
    at Request._emitResponse (/challenge-forum-processor/node_modules/superagent/lib/node/index.js:918:18)
    at /challenge-forum-processor/node_modules/superagent/lib/node/index.js:1114:42
    at IncomingMessage.<anonymous> (/challenge-forum-processor/node_modules/superagent/lib/node/parsers/json.js:22:7)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
        status: 404,
        text: '{\n    "message": "/api/v2/users/by-names not found.",\n    "status": 404,\n    "description": null\n}',
        method: 'GET',
        path: '/api/v2/users/by-names?access_token=&name=panoptimum' },
     created: false,
     accepted: false,
     noContent: false,
     badRequest: false,
     unauthorized: false,
     notAcceptable: false,
     forbidden: false,
     notFound: true,
     unprocessableEntity: false,
     type: 'application/json',
     charset: 'utf-8',
     links: {},
     setEncoding: [Function: bound ],
     redirects: [],
     pipe: [Function] } }
2021-05-10T10:11:15.437Z [debug]: Message from challenge.action.resource.create: [{"id":"09a26827-911e-44da-a08b-a7e923983855","challengeId":"c09a4b83-9856-4506-a518-a5907d0d3bc9","memberId":"40647030","memberHandle":"VigneshG","roleId":"732339e7-8e30-49d7-9198-cccf9451e221","created":"2021-05-10T10:11:14.000Z","createdBy":"VigneshG"}]
2021-05-10T10:11:15.707Z [info]: Managing user for challengeID=c09a4b83-9856-4506-a518-a5907d0d3bc9 [action=invite, handle=VigneshG, projectRole=null, challengeRoles=["Submitter"]]...
2021-05-10T10:11:15.852Z [error]: Error: The group wasn't not found by challengeID
    at manageVanillaUser (/challenge-forum-processor/src/services/vanilla.js:27:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

@atelomycterus
Copy link
Collaborator

@jmgasper Please apply PRs

Thanks!

The problem was caused by two REST API controllers with the same name in different Vanilla plugins/application. As a result, only the methods of the last controller were available.

@atelomycterus
Copy link
Collaborator

atelomycterus commented May 10, 2021

@jmgasper

PROD

Important note: For users who have previously registered for a challenge and have a problem with access. Need to unregister and register for a challenge again.

Normal user:
register for a challenge (https://www.topcoder.com/challenges/b17c63a3-2720-4753-8474-32a5e2ef23fb)
image

image

@jmgasper
Copy link
Collaborator

Ready for QA in prod

@jmgasper
Copy link
Collaborator

Payment task has been updated: https://www.topcoder.com/challenges/f9d7c8a1-5d54-4e61-af23-3d3cc3e747f2
Payments Complete
Winner: obog
Copilot: ghostar
Challenge f9d7c8a1-5d54-4e61-af23-3d3cc3e747f2 has been paid and closed.

This is an automated message for ghostar via Topcoder X

@sdgun sdgun added this to the 1.8.1 milestone May 11, 2021
@sdgun
Copy link
Collaborator

sdgun commented May 11, 2021

Verified by creating challenges in all 4 tracks in production.

image

Note: however, couldn't verify the scenario of already registered users having to unregister and re-register since I was not registered to any challenges with the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants