Skip to content
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

Error not surfaced properly #85

Closed
clehner opened this issue Mar 9, 2021 · 6 comments
Closed

Error not surfaced properly #85

clehner opened this issue Mar 9, 2021 · 6 comments

Comments

@clehner
Copy link

clehner commented Mar 9, 2021

See w3c/did-test-suite#34.

@tobie
Copy link
Owner

tobie commented Mar 9, 2021

Seems like an issue with the web service tasked to build respec files. It’s probably temporary. Have you tried again? You can force a rerun by editing the content of the pull request (not the actual code, just the content on the GitHub side. Just adding a line break is enough.

@clehner
Copy link
Author

clehner commented Mar 9, 2021

Hi @tobie, thanks for the instructions. I edited the PR text just now. It appears that PR Preview ran again, but it gets the same error.

@tobie
Copy link
Owner

tobie commented Mar 9, 2021

@deniak any idea what’s going on here?

@deniak
Copy link
Contributor

deniak commented Mar 9, 2021

This is an error coming from respec. @sidvishnoi, spec-generator is producing the following error while trying to process https://rawcdn.githack.com/spruceid/did-test-suite/7925112b59a2f92ee820d0afe03034e9f05af3c9/index.html?isPreview=true&publishDate=2021-03-09

{
    "error": "\n😭  Sorry, there was an error generating the HTML. Please report this issue!\nSpecification: https://rawcdn.githack.com/spruceid/did-test-suite/7925112b59a2f92ee820d0afe03034e9f05af3c9/index.html?isPreview=true&publishDate=2021-03-09\nReSpec version: 26.2.0\nFile a bug: https://github.com/w3c/respec/\nError: Error: Evaluation failed: TypeError: Cannot destructure property 'rsDocToDataURL' of '(intermediate value)' as it is undefined.\n    at evaluateHTML (__puppeteer_evaluation_script__:23:13)\n    at ExecutionContext._evaluateInternal (/u/spec-generator/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:218:19)\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)\n    at async ExecutionContext.evaluate (/u/spec-generator/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:107:16)\n    at async generateHTML (/u/spec-generator/node_modules/respec/tools/respecDocWriter.js:207:12)\n    at async toHTML (/u/spec-generator/node_modules/respec/tools/respecDocWriter.js:86:18)\n    at async Object.generate [as respec] (/u/spec-generator/generators/respec.js:13:40)\n    at async /u/spec-generator/server.js:89:44\n"
}

Do you know if it's a bug in respec or a misconfiguration?

@sidvishnoi
Copy link
Contributor

sidvishnoi commented Mar 9, 2021

https://pagecdn.io/lib/ace/1.4.5/ace.js is clashing with ReSpec unfortunately. Both ReSpec and Ace expose a global require() function. ReSpec uses it to import the exporter (rsDocToDataURL).

Workaround: Use ace no-conflict, which exposes ace.require instead of a global require:

    <script src=https://unpkg.com/[email protected]/src-min-noconflict/ace.js"
      <!-- integrity obtained from: https://unpkg.com/[email protected]/src-min-noconflict/ace.js?meta -->
      integrity="sha384-hrjkfJF+wiarMlNc/Nqv8RItRca1TOp8FBggbKsUJfRaKgioqs8qgKw6PIPMIpMV"
      crossorigin="anonymous"></script>

There's an open issue in ReSpec to avoid the global require (see https://github.com/w3c/respec/issues/3089), can't give a timeline for it though.

@tobie
Copy link
Owner

tobie commented Mar 11, 2021

Thanks folks. Closing.

@tobie tobie closed this as completed Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants