jenkins-infra / uplink

A simple telemetry service for Jenkins instances.
https://uplink.jenkins.io/
GNU Affero General Public License v3.0
1 stars 2 forks source link

Export all of this type resulting in exception thrown #6

Closed rtyler closed 6 years ago

rtyler commented 6 years ago
error: TypeError: Cannot read property 'github' of undefined
    at Object.<anonymous> (/srv/uplink/build/hooks/authorize.js:13:42)
    at Generator.next (<anonymous>)
    at fulfilled (/srv/uplink/node_modules/tslib/tslib.js:104:62)
    at <anonymous>
error: Unhandled Rejection at: Promise 
rtyler commented 6 years ago

Hrm, it's like the JWT token isn't being passed or utilized for this route, but only in production :confused:

rtyler commented 6 years ago

So I believe we're getting through the feathers authenticate code, but the SELECT from "users" is consistent with pages that work

Working page: /dashboard

Executing (default): SELECT "id", "github", "githubId", "createdAt", "updatedAt" FROM "users" AS "users" WHERE "users"."id" = 1;
Executing (default): SELECT "id", "name", "type", "createdAt", "updatedAt" FROM "grants" AS "grants" WHERE "grants"."name" = 'rtyler' AND ("grants"."type" = NULL OR "grants"."type" = '*');
Executing (default): SELECT count(DISTINCT("events"."id")) AS "count" FROM "events" AS "events";
Executing (default): SELECT "id", "type", "correlator", "payload", "createdAt", "updatedAt" FROM "events" AS "events" ORDER BY "events"."createdAt" DESC LIMIT 25;

Broken page: /export/:field

Executing (default): SELECT "id", "github", "githubId", "createdAt", "updatedAt" FROM "users" AS "users" WHERE "users"."id" = 1;
error: TypeError: Cannot read property 'github' of undefined
    at Object.<anonymous> (/srv/uplink/build/hooks/authorize.js:13:42)
    at Generator.next (<anonymous>)
    at fulfilled (/srv/uplink/node_modules/tslib/tslib.js:104:62)
    at <anonymous>
error: Unhandled Rejection at: Promise