Skip to content

[$60] Investigate challenge forum processor failing in dev #502

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
jmgasper opened this issue Mar 28, 2021 · 9 comments
Closed

[$60] Investigate challenge forum processor failing in dev #502

jmgasper opened this issue Mar 28, 2021 · 9 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Mar 28, 2021

@atelomycterus : For some reason, the challenge forum processor is failing in dev, with the log below. The group and all template posts are created, but it's failing on adding folks to the group. Has anything changed there recently?

Note that the token used is from TonyJ and should have the Vanilla Admin role applied.

2021-03-28T01:22:58.675Z [debug]: Message from challenge.notification.create: [{"id":"9f7e1768-9954-4b71-bbbb-441b1b687c9a","created":"2021-03-28T01:22:57.934Z","createdBy":"TonyJ","updated":"2021-03-28T01:22:57.934Z","updatedBy":"TonyJ","status":"New","projectId":16804,"name":"Justin Test 4","typeId":"927abff4-7af9-4145-8ba1-577c16e64e2e","trackId":"9b6fc876-f4d9-4ccb-9dfd-419247628825","startDate":"2021-03-29T01:22:57.000Z","legacy":{"reviewType":"COMMUNITY"},"descriptionFormat":"markdown","timelineTemplateId":"7ebf1c69-f62f-4d3a-bdfb-fe9ddb56861c","terms":[{"id":"317cd8f9-d66c-4f2a-8774-63c612d99cd4","roleId":"732339e7-8e30-49d7-9198-cccf9451e221"}],"groups":[],"discussions":[{"name":"Justin Test 4 Discussion","type":"challenge","provider":"vanilla","id":"1f367448-24c5-4dd2-82a4-750ed1f9330a"}],"description":"","billing":{"billingAccountId":80000247,"markup":null},"phases":[{"phaseId":"a93544bc-c165-4af4-b55e-18f3593b457a","duration":432000,"id":"fcd4954e-3bf3-4bdc-b09e-b09dd5fef91b","name":"Registration","isOpen":false,"scheduledStartDate":"2021-03-29T12:22:57+11:00","scheduledEndDate":"2021-04-03T01:22:57.000Z","actualStartDate":"2021-03-29T12:22:57+11:00","actualEndDate":"2021-04-03T01:22:57.000Z"},{"phaseId":"6950164f-3c5e-4bdc-abc8-22aaf5a1bd49","duration":432000,"id":"77139177-5f96-4d54-ae71-a4fe45763b36","name":"Submission","isOpen":false,"scheduledStartDate":"2021-03-29T12:22:57+11:00","scheduledEndDate":"2021-04-03T01:22:57.000Z","actualStartDate":"2021-03-29T12:22:57+11:00","actualEndDate":"2021-04-03T01:22:57.000Z"},{"phaseId":"aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b","duration":172800,"id":"8c111813-4d46-4dc3-8ce5-6c30177e8c5f","name":"Review","isOpen":false,"predecessor":"6950164f-3c5e-4bdc-abc8-22aaf5a1bd49","scheduledStartDate":"2021-04-03T01:22:57.000Z","scheduledEndDate":"2021-04-05T01:22:57.000Z","actualStartDate":"2021-04-03T01:22:57.000Z","actualEndDate":"2021-04-05T01:22:57.000Z"},{"phaseId":"1c24cfb3-5b0a-4dbd-b6bd-4b0dff5349c6","duration":86400,"id":"b045619a-dbe5-4eb6-8b4b-0d566d0432d3","name":"Appeals","isOpen":false,"predecessor":"aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b","scheduledStartDate":"2021-04-05T01:22:57.000Z","scheduledEndDate":"2021-04-06T01:22:57.000Z","actualStartDate":"2021-04-05T01:22:57.000Z","actualEndDate":"2021-04-06T01:22:57.000Z"},{"phaseId":"797a6af7-cd3f-4436-9fca-9679f773bee9","duration":43200,"id":"9185b14b-a960-453c-a76e-dfa129a00929","name":"Appeals Response","isOpen":false,"predecessor":"1c24cfb3-5b0a-4dbd-b6bd-4b0dff5349c6","scheduledStartDate":"2021-04-06T01:22:57.000Z","scheduledEndDate":"2021-04-06T13:22:57.000Z","actualStartDate":"2021-04-06T01:22:57.000Z","actualEndDate":"2021-04-06T13:22:57.000Z"}],"endDate":"2021-03-29T13:22:57.000Z","numOfSubmissions":0,"numOfRegistrants":0,"currentPhaseNames":[],"registrationStartDate":"2021-03-29T12:22:57+11:00","registrationEndDate":"2021-04-03T01:22:57.000Z","submissionStartDate":"2021-03-29T12:22:57+11:00","submissionEndDate":"2021-04-03T01:22:57.000Z","track":"Development","type":"Challenge"}]
2021-03-28T01:22:58.677Z [info]: The challenge with challengeID=9f7e1768-9954-4b71-bbbb-441b1b687c9a:
2021-03-28T01:22:58.677Z [debug]: Message from challenge.action.resource.create: [{"id":"34a42fee-1a14-4194-8dac-3aada4fa8ff6","challengeId":"9f7e1768-9954-4b71-bbbb-441b1b687c9a","memberId":"8547899","memberHandle":"TonyJ","roleId":"0e9c6879-39e4-4eb6-b8df-92407890faf1","created":"2021-03-28T01:22:58.000Z","createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"}]
2021-03-28T01:22:58.809Z [info]: Managing user for challengeID=9f7e1768-9954-4b71-bbbb-441b1b687c9a [action=invite, handle=TonyJ, projectRole="manager", challengeRoles=["Manager"]]...
2021-03-28T01:22:58.893Z [info]: Creating Vanilla entities for the 'Justin Test 4 Discussion' discussion ....
2021-03-28T01:22:58.895Z [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)
2021-03-28T01:22:58.977Z [info]: The group with groupID=869 was created
2021-03-28T01:23:01.076Z [debug]: Message from challenge.action.resource.create: [{"id":"13a5241c-213e-4c94-8a8e-78de317e662e","challengeId":"9f7e1768-9954-4b71-bbbb-441b1b687c9a","memberId":"40158994","memberHandle":"TCConnCopilot","roleId":"2a4dc376-a31c-4d00-b173-13934d89e286","created":"2021-03-28T01:23:00.000Z","createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"}]
2021-03-28T01:23:01.076Z [debug]: Message from challenge.action.resource.create: [{"id":"2e68fa3e-ee52-4bee-bb31-0fff835b6206","challengeId":"9f7e1768-9954-4b71-bbbb-441b1b687c9a","memberId":"40158997","memberHandle":"TCConManager","roleId":"2a4dc376-a31c-4d00-b173-13934d89e286","created":"2021-03-28T01:23:00.000Z","createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"},{"id":"fc778e7d-c762-48b2-a789-ec8381b53e3d","challengeId":"9f7e1768-9954-4b71-bbbb-441b1b687c9a","memberId":"8547899","memberHandle":"TonyJ","roleId":"2a4dc376-a31c-4d00-b173-13934d89e286","created":"2021-03-28T01:23:00.000Z","createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"}]
2021-03-28T01:23:01.313Z [info]: Managing user for challengeID=9f7e1768-9954-4b71-bbbb-441b1b687c9a [action=invite, handle=TCConnCopilot, projectRole="copilot", challengeRoles=["Observer"]]...
2021-03-28T01:23:01.323Z [info]: Managing user for challengeID=9f7e1768-9954-4b71-bbbb-441b1b687c9a [action=invite, handle=TCConManager, projectRole="manager", challengeRoles=["Observer"]]...
2021-03-28T01:23:02.347Z [error]: { Error: Bad Request
    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: 400,
  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: 400,
        statusMessage: 'Bad Request',
        client: [Object],
        _consuming: true,
        _dumped: false,
        req: [Object],
        text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
        read: [Function] },
     request:
      Request {
        domain: null,
        _events: [Object],
        _eventsCount: 1,
        _maxListeners: undefined,
        _enableHttp2: false,
        _agent: false,
        _formData: null,
        method: 'POST',
        url: 'https://vanilla.topcoder-dev.com/api/v2/groups/869/members?access_token=...',
        _header: [Object],
        header: [Object],
        writable: true,
        _redirects: 0,
        _maxRedirects: 5,
        cookies: '',
        qs: {},
        _query: [],
        qsRaw: [],
        _redirectList: [],
        _streamRequest: false,
        _data: [Object],
        req: [Object],
        protocol: 'https:',
        host: 'vanilla.topcoder-dev.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: true,
        sendDate: false,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: 26,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'POST /api/v2/groups/869/members?access_token=... HTTP/1.1\r\nHost: vanilla.topcoder-dev.com\r\nAccept-Encoding: gzip, deflate\r\nContent-Type: application/json\r\nContent-Length: 26\r\nConnection: close\r\n\r\n',
        _onPendingData: [Function: noopPendingOutput],
        agent: [Object],
        socketPath: undefined,
        timeout: undefined,
        method: 'POST',
        path: '/api/v2/groups/869/members?access_token=...',
        _ended: true,
        res: [Object],
        aborted: undefined,
        timeoutCb: null,
        upgradeOrConnect: false,
        parser: null,
        maxHeadersCount: null,
        [Symbol(outHeadersKey)]: [Object] },
     text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
     body:
      { message: 'Don\'t have permissions to add a member to this group.',
        status: 400,
        description: null },
     files: undefined,
     buffered: true,
     headers:
      { date: 'Sun, 28 Mar 2021 01:23:02 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: 'Sun, 28 Mar 2021 01:23:02 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: 400,
     status: 400,
     statusType: 4,
     info: false,
     ok: false,
     redirect: false,
     clientError: true,
     serverError: false,
     error:
      { Error: cannot POST /api/v2/groups/869/members?access_token=... (400)
    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: 400,
        text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
        method: 'POST',
        path: '/api/v2/groups/869/members?access_token=...' },
     created: false,
     accepted: false,
     noContent: false,
     badRequest: true,
     unauthorized: false,
     notAcceptable: false,
     forbidden: false,
     notFound: false,
     unprocessableEntity: false,
     type: 'application/json',
     charset: 'utf-8',
     links: {},
     setEncoding: [Function: bound ],
     redirects: [],
     pipe: [Function] } }
2021-03-28T01:23:02.417Z [error]: { Error: Bad Request
    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: 400,
  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: 400,
        statusMessage: 'Bad Request',
        client: [Object],
        _consuming: true,
        _dumped: false,
        req: [Object],
        text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
        read: [Function] },
     request:
      Request {
        domain: null,
        _events: [Object],
        _eventsCount: 1,
        _maxListeners: undefined,
        _enableHttp2: false,
        _agent: false,
        _formData: null,
        method: 'POST',
        url: 'https://vanilla.topcoder-dev.com/api/v2/groups/869/members?access_token=...',
        _header: [Object],
        header: [Object],
        writable: true,
        _redirects: 0,
        _maxRedirects: 5,
        cookies: '',
        qs: {},
        _query: [],
        qsRaw: [],
        _redirectList: [],
        _streamRequest: false,
        _data: [Object],
        req: [Object],
        protocol: 'https:',
        host: 'vanilla.topcoder-dev.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: true,
        sendDate: false,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: 27,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'POST /api/v2/groups/869/members?access_token=... HTTP/1.1\r\nHost: vanilla.topcoder-dev.com\r\nAccept-Encoding: gzip, deflate\r\nContent-Type: application/json\r\nContent-Length: 27\r\nConnection: close\r\n\r\n',
        _onPendingData: [Function: noopPendingOutput],
        agent: [Object],
        socketPath: undefined,
        timeout: undefined,
        method: 'POST',
        path: '/api/v2/groups/869/members?access_token=...',
        _ended: true,
        res: [Object],
        aborted: undefined,
        timeoutCb: null,
        upgradeOrConnect: false,
        parser: null,
        maxHeadersCount: null,
        [Symbol(outHeadersKey)]: [Object] },
     text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
     body:
      { message: 'Don\'t have permissions to add a member to this group.',
        status: 400,
        description: null },
     files: undefined,
     buffered: true,
     headers:
      { date: 'Sun, 28 Mar 2021 01:23:02 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: 'Sun, 28 Mar 2021 01:23:02 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: 400,
     status: 400,
     statusType: 4,
     info: false,
     ok: false,
     redirect: false,
     clientError: true,
     serverError: false,
     error:
      { Error: cannot POST /api/v2/groups/869/members?access_token=... (400)
    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: 400,
        text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
        method: 'POST',
        path: '/api/v2/groups/869/members?access_token=...' },
     created: false,
     accepted: false,
     noContent: false,
     badRequest: true,
     unauthorized: false,
     notAcceptable: false,
     forbidden: false,
     notFound: false,
     unprocessableEntity: false,
     type: 'application/json',
     charset: 'utf-8',
     links: {},
     setEncoding: [Function: bound ],
     redirects: [],
     pipe: [Function] } }
2021-03-28T01:23:02.554Z [info]: Managing user for challengeID=9f7e1768-9954-4b71-bbbb-441b1b687c9a [action=invite, handle=TonyJ, projectRole="manager", challengeRoles=["Manager","Observer"]]...
2021-03-28T01:23:03.272Z [error]: { Error: Bad Request
    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: 400,
  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: 400,
        statusMessage: 'Bad Request',
        client: [Object],
        _consuming: true,
        _dumped: false,
        req: [Object],
        text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
        read: [Function] },
     request:
      Request {
        domain: null,
        _events: [Object],
        _eventsCount: 1,
        _maxListeners: undefined,
        _enableHttp2: false,
        _agent: false,
        _formData: null,
        method: 'POST',
        url: 'https://vanilla.topcoder-dev.com/api/v2/groups/869/members?access_token=...',
        _header: [Object],
        header: [Object],
        writable: true,
        _redirects: 0,
        _maxRedirects: 5,
        cookies: '',
        qs: {},
        _query: [],
        qsRaw: [],
        _redirectList: [],
        _streamRequest: false,
        _data: [Object],
        req: [Object],
        protocol: 'https:',
        host: 'vanilla.topcoder-dev.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: true,
        sendDate: false,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: 26,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'POST /api/v2/groups/869/members?access_token=... HTTP/1.1\r\nHost: vanilla.topcoder-dev.com\r\nAccept-Encoding: gzip, deflate\r\nContent-Type: application/json\r\nContent-Length: 26\r\nConnection: close\r\n\r\n',
        _onPendingData: [Function: noopPendingOutput],
        agent: [Object],
        socketPath: undefined,
        timeout: undefined,
        method: 'POST',
        path: '/api/v2/groups/869/members?access_token=...',
        _ended: true,
        res: [Object],
        aborted: undefined,
        timeoutCb: null,
        upgradeOrConnect: false,
        parser: null,
        maxHeadersCount: null,
        [Symbol(outHeadersKey)]: [Object] },
     text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
     body:
      { message: 'Don\'t have permissions to add a member to this group.',
        status: 400,
        description: null },
     files: undefined,
     buffered: true,
     headers:
      { date: 'Sun, 28 Mar 2021 01:23:03 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: 'Sun, 28 Mar 2021 01:23:03 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: 400,
     status: 400,
     statusType: 4,
     info: false,
     ok: false,
     redirect: false,
     clientError: true,
     serverError: false,
     error:
      { Error: cannot POST /api/v2/groups/869/members?access_token=... (400)
    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: 400,
        text: '{\n    "message": "Don\'t have permissions to add a member to this group.",\n    "status": 400,\n    "description": null\n}',
        method: 'POST',
        path: '/api/v2/groups/869/members?access_token=...' },
     created: false,
     accepted: false,
     noContent: false,
     badRequest: true,
     unauthorized: false,
     notAcceptable: false,
     forbidden: false,
     notFound: false,
     unprocessableEntity: false,
     type: 'application/json',
     charset: 'utf-8',
     links: {},
     setEncoding: [Function: bound ],
     redirects: [],
     pipe: [Function] } }
2021-03-28T01:23:04.770Z [info]: The 'Justin Test 4' category was created
2021-03-28T01:23:10.207Z [info]: The 'Code Documents' category was created
2021-03-28T01:23:10.389Z [info]: The 'Challenge Overview' discussion/announcement was created
2021-03-28T01:23:10.540Z [info]: The 'Please give us feedback on this challenge!' discussion/announcement was created
2021-03-28T01:23:15.957Z [info]: The 'Code Questions' category was created
2021-03-28T01:23:16.117Z [info]: The 'Welcome!' discussion/announcement was created
2021-03-28T01:23:16.117Z [info]: Managing user for challengeID=9f7e1768-9954-4b71-bbbb-441b1b687c9a 
@jmgasper
Copy link
Collaborator Author

Challenge https://www.topcoder.com/challenges/294ee0b9-6290-457d-bf09-fc3150d6cece has been created for this ticket.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator Author

Challenge https://www.topcoder.com/challenges/294ee0b9-6290-457d-bf09-fc3150d6cece has been assigned to obog.

This is an automated message for ghostar via Topcoder X

@atelomycterus
Copy link
Collaborator

atelomycterus commented Mar 28, 2021

@jmgasper In the initial Group plugin, we created groups with archived= false by default. We disallowed adding new members to a group with archived=true(it was implemented in November, 2020).

Now all groups are created with archived=true by default. So new members can't be added to archived groups. So the error messages are displayed in logs.

One solution is to allow a group owner add new members even to the archived group.
Group owner is user who created the group.
Please let me know if it's ok. I'll fix Groups plugin.

@jmgasper
Copy link
Collaborator Author

@atelomycterus - Yeah, let's make that change, thanks. We need to add the copilot and managers before the challenge launches.

@atelomycterus
Copy link
Collaborator

@jmgasper Fixed. Please apply PR topcoder-platform/forums-groups-plugin#73. Thanks!

Changes

Group Owner can add new members even to the archived group.

Testing

Challenge forum processor output:
image

@sdgun You can verify it as well from UI. All groups are created by TonyJ (a group owner) on DEV:
image

You can create a new challenge and check a list of the group members in a group page. Depending on the Topcoder project, users with the copilot\manager... roles must be added:

image

@jmgasper
Copy link
Collaborator Author

Payment task has been updated: https://www.topcoder.com/challenges/294ee0b9-6290-457d-bf09-fc3150d6cece
Payments Complete
Winner: obog
Copilot: ghostar
Challenge 294ee0b9-6290-457d-bf09-fc3150d6cece has been paid and closed.

This is an automated message for ghostar via Topcoder X

@sdgun
Copy link
Collaborator

sdgun commented Mar 30, 2021

@jmgasper
Copy link
Collaborator Author

@sdgun - I see forums for both of those now - can you recheck please? It may take a minute for everything to sync properly.

@sdgun
Copy link
Collaborator

sdgun commented Mar 30, 2021

@jmgasper Actually out of the 5 challenges I created I still see one without the forum link

https://challenges.topcoder-dev.com/projects/16804/challenges/a01efae7-5596-4c8b-8446-156982bb4ff7/view

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

3 participants