Internal Compiler Error when trying to compile openpgp npm module
See original GitHub issuecurl -O https://unpkg.com/openpgp@4.0.0/dist/openpgp.js
npx google-closure-compiler --js=openpgp.js --js_output_file=out.js
yields a whole lot of warnings and errors and ultimately fails with
java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.
INTERNAL COMPILER ERROR.
Please report this problem.
null
Node(FUNCTION ): openpgp.js:38405:70
SymmetricallyEncrypted.prototype.encrypt = async function (algo, key) {
Parent(CALL): openpgp.js:38405:70
SymmetricallyEncrypted.prototype.encrypt = async function (algo, key) {
at java.lang.Throwable.<init>(Throwable.java:250)
at java.lang.Exception.<init>(Exception.java:54)
at java.lang.RuntimeException.<init>(RuntimeException.java:51)
at java.lang.IllegalStateException.<init>(IllegalStateException.java:44)
at com.google.common.base.Preconditions.checkState(Preconditions.java:491)
at com.google.javascript.jscomp.Es6RewriteGenerators$SingleGeneratorFunctionTranspiler$YieldFinder.shouldTraverse(Es6RewriteGenerators.java:1143)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:830)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverse(NodeTraversal.java:331)
at com.google.javascript.jscomp.NodeTraversal.traverse(NodeTraversal.java:341)
at com.google.javascript.jscomp.Es6RewriteGenerators$SingleGeneratorFunctionTranspiler.findYield(Es6RewriteGenerators.java:1128)
at com.google.javascript.jscomp.Es6RewriteGenerators$SingleGeneratorFunctionTranspiler.transpileYields(Es6RewriteGenerators.java:698)
at com.google.javascript.jscomp.Es6RewriteGenerators$SingleGeneratorFunctionTranspiler.transpileExpressionResult(Es6RewriteGenerators.java:573)
at com.google.javascript.jscomp.Es6RewriteGenerators$SingleGeneratorFunctionTranspiler.transpileStatement(Es6RewriteGenerators.java:474)
at com.google.javascript.jscomp.Es6RewriteGenerators$SingleGeneratorFunctionTranspiler.transpileStatement(Es6RewriteGenerators.java:442)
at com.google.javascript.jscomp.Es6RewriteGenerators$SingleGeneratorFunctionTranspiler.transpile(Es6RewriteGenerators.java:422)
at com.google.javascript.jscomp.Es6RewriteGenerators$GeneratorFunctionsTranspiler.visit(Es6RewriteGenerators.java:220)
at com.google.javascript.jscomp.NodeTraversal.handleFunction(NodeTraversal.java:811)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:825)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBlockScope(NodeTraversal.java:974)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:841)
at com.google.javascript.jscomp.NodeTraversal.traverseFunction(NodeTraversal.java:886)
at com.google.javascript.jscomp.NodeTraversal.handleFunction(NodeTraversal.java:809)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:825)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBlockScope(NodeTraversal.java:974)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:841)
at com.google.javascript.jscomp.NodeTraversal.traverseFunction(NodeTraversal.java:886)
at com.google.javascript.jscomp.NodeTraversal.handleFunction(NodeTraversal.java:809)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:825)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBlockScope(NodeTraversal.java:974)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:841)
at com.google.javascript.jscomp.NodeTraversal.traverseFunction(NodeTraversal.java:886)
at com.google.javascript.jscomp.NodeTraversal.handleFunction(NodeTraversal.java:809)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:825)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:843)
at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:959)
at com.google.javascript.jscomp.NodeTraversal.handleScript(NodeTraversal.java:797)
at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:822)
at com.google.javascript.jscomp.NodeTraversal.traverse(NodeTraversal.java:331)
at com.google.javascript.jscomp.NodeTraversal.traverse(NodeTraversal.java:341)
at com.google.javascript.jscomp.TranspilationPasses.processTranspile(TranspilationPasses.java:540)
at com.google.javascript.jscomp.Es6RewriteGenerators.process(Es6RewriteGenerators.java:120)
at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:307)
at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:230)
at com.google.javascript.jscomp.Compiler.check(Compiler.java:1056)
at com.google.javascript.jscomp.Compiler.performChecksAndTranspilation(Compiler.java:849)
at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:109)
at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:783)
at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:780)
at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:102)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:238)
Caused by: java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.
null
... 84 more
Caused by: java.lang.IllegalStateException
... 84 more
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to use openpgp.js on node.js (Cloudflare worker) - Error ...
This is a problem when using openpgp.js because it uses navigator to identify the userAgent and the number of cores available, unfortunately ...
Read more >openpgp - npm
OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.. Latest version: 5.5.0, last published: 3 ...
Read more >2012-June.txt - GCC, the GNU Compiler Collection
For example the compiler fails at: C-code: void fail(long long *v) { *v += 1; } Failure: fail.c: In function 'fail': fail.c:4:1: internal...
Read more >Bug listing with status RESOLVED with resolution TEST ...
... 2110 locks up while trying to install" status:RESOLVED resolution:TEST-REQUEST severity: ... Bug:57182 - "Internal Compiler Error during kernel compile" ...
Read more >Bug#923214: g++-mingw-w64: Internal compiler error when include ...
Hi, I was affected by this, too when compiling Gpg4win. Caused an error in Boost and the mentioned Qt error. I want to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Simplified repro:
Seems to be related to having the two different
await
s in one expression, as we rewriteawait
toyield
.https://closure-compiler-debugger.appspot.com/#input0%3D%250Aasync%2520function%2520SymmetricallyEncrypted_prototype_encrypt()%2520%257B%250A%250A%2520%2520this.encrypted%2520%253D%2520_crypto2.default.cfb.encrypt(%250A%2520%2520%2520%2520(await%2520_crypto2.default.getPrefixRandom())%252C%2520%250A%2520%2520%2520%2520(await%2520_webStreamTools2.default.readToEnd()))%253B%250A%257D%253B%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3Dtrue%26CHECK_TYPES%3Dtrue%26TRANSPILE%3Dtrue%26CLOSURE_PASS%3Dtrue%26PRESERVE_TYPE_ANNOTATIONS%3Dtrue%26PRETTY_PRINT%3Dtrue
Lets pick this up after the transpilation is moved after type checking.