w3c / did-test-suite

W3C DID Test Suite and Implementation Report

Home Page:https://w3c.github.io/did-test-suite/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read property 'ancestorTitles' of undefined

msporny opened this issue · comments

The latest builds are failing for some reason... looks like missing code and/or directories?

https://github.com/w3c/did-test-suite/runs/2859446148?check_suite_focus=true

Note: I've been getting sporadic errors from Github Actions today across a variety of unrelated projects. It might be that they're dealing with some new software release issues.

lerna ERR! npm run test-and-generate-report stderr:
(node:1780) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'ancestorTitles' of undefined
    at /home/runner/work/did-test-suite/did-test-suite/packages/did-core-test-server/services/sanitizeAllResults.js:6:60
    at Array.forEach (<anonymous>)
    at sanitizeAllResults (/home/runner/work/did-test-suite/did-test-suite/packages/did-core-test-server/services/sanitizeAllResults.js:4:14)
    at getReportResults (/home/runner/work/did-test-suite/did-test-suite/packages/did-core-test-server/services/getReportResults.js:37:23)
    at /home/runner/work/did-test-suite/did-test-suite/packages/did-core-test-server/report/generate-test-data.js:13:18
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1780) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:1780) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module './tmp/did-spec-test-run.latest.json'
Require stack:
- /home/runner/work/did-test-suite/did-test-suite/packages/did-core-test-server/report/generate-report.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/runner/work/did-test-suite/did-test-suite/packages/did-core-test-server/report/generate-report.js:12:23)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/did-test-suite/did-test-suite/packages/did-core-test-server/report/generate-report.js'
  ]
}

Look like a change set was merged that broke assumptions about file pathing.

Ignore this issue -- the issue was invalid JSON implementation files that I checked in. For whatever reason, when I ran the entire test suite locally, the files parsed just fine. However, when uploaded to CI, the invalid JSON caused the test suite to barf. No idea why it was working locally but not remotely. In any case, CI found this anomaly (hooray for CI!) and I'm fixing it now.

yes, I have noticed problems with JSON.parse failing on invalid JSON.

its surprising it does not fail to parse valid JSON-LD... @peacekeeper :trolling: