This repository was archived by the owner on Nov 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
This repository was archived by the owner on Nov 19, 2025. It is now read-only.
Runtime exception when using conformance checks #316
Copy link
Copy link
Closed
Description
Starting with the 20250402 release, I receive a runtime exception when using a conformance check proto file.
java.lang.RuntimeException: java.lang.IllegalStateException: Generated message class "com.google.javascript.jscomp.ConformanceConfig$LibraryLevelNonAllowlistedConformanceViolationsBehavior" missing method "valueOf".
at com.google.javascript.jscomp.CommandLineRunner.loadConformanceConfig(CommandLineRunner.java:2146)
at com.google.javascript.jscomp.CommandLineRunner.loadConformanceConfigs(CommandLineRunner.java:2123)
at com.google.javascript.jscomp.CommandLineRunner.createOptions(CommandLineRunner.java:1986)
at com.google.javascript.jscomp.AbstractCommandLineRunner.doRun(AbstractCommandLineRunner.java:1146)
at com.google.javascript.jscomp.AbstractCommandLineRunner.run(AbstractCommandLineRunner.java:524)
at com.google.javascript.jscomp.CommandLineRunner.main(CommandLineRunner.java:2280)
at java.base@21.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.IllegalStateException: Generated message class "com.google.javascript.jscomp.ConformanceConfig$LibraryLevelNonAllowlistedConformanceViolationsBehavior" missing method "valueOf".
at com.google.protobuf.GeneratedMessage.getMethodOrDie(GeneratedMessage.java:1950)
at com.google.protobuf.GeneratedMessage$FieldAccessorTable$SingularEnumFieldAccessor.<init>(GeneratedMessage.java:2879)
at com.google.protobuf.GeneratedMessage$FieldAccessorTable.ensureFieldAccessorsInitialized(GeneratedMessage.java:2090)
at com.google.javascript.jscomp.ConformanceConfig$Builder.internalGetFieldAccessorTable(ConformanceConfig.java:480)
at com.google.protobuf.GeneratedMessage$Builder.newBuilderForField(GeneratedMessage.java:607)
at com.google.protobuf.MessageReflection$BuilderAdapter.newMessageFieldInstance(MessageReflection.java:598)
at com.google.protobuf.MessageReflection$BuilderAdapter.newMergeTargetForField(MessageReflection.java:613)
at com.google.protobuf.TextFormat$Parser.consumeFieldValue(TextFormat.java:2254)
at com.google.protobuf.TextFormat$Parser.consumeFieldValues(TextFormat.java:2195)
at com.google.protobuf.TextFormat$Parser.mergeField(TextFormat.java:2104)
at com.google.protobuf.TextFormat$Parser.mergeField(TextFormat.java:1973)
at com.google.protobuf.TextFormat$Parser.merge(TextFormat.java:1960)
at com.google.protobuf.TextFormat$Parser.merge(TextFormat.java:1852)
at com.google.protobuf.TextFormat.merge(TextFormat.java:1645)
at com.google.javascript.jscomp.CommandLineRunner.loadConformanceConfig(CommandLineRunner.java:2144)
... 6 more
Caused by: java.lang.NoSuchMethodException: com.google.javascript.jscomp.ConformanceConfig$LibraryLevelNonAllowlistedConformanceViolationsBehavior.valueOf(com.google.protobuf.Descriptors$EnumValueDescriptor)
at java.base@21.0.2/java.lang.Class.checkMethod(DynamicHub.java:1075)
at java.base@21.0.2/java.lang.Class.getMethod(DynamicHub.java:1060)
at com.google.protobuf.GeneratedMessage.getMethodOrDie(GeneratedMessage.java:1947)
... 20 more
My conformance config is:
requirement: {
type: CUSTOM
java_class: 'com.google.javascript.jscomp.ConformanceRules$BanUnknownThis'
error_message: 'References to "this" that are typed as "unknown" are not allowed. See http://go/closure-js-conformance#unknownThis'
whitelist: 'node_modules/google-closure-library/closure/goog/base.js'
}
requirement: {
type: BANNED_NAME
value: 'console.log'
error_message: 'Calling console.log is forbidden. Use bannoWeb.console.log instead.'
whitelist: 'projects/banno-online/src/js/bannoweb.js'
whitelist: 'node_modules/google-closure-library/closure/goog/base.js'
whitelist: 'projects/banno-online/src/js/bootstrap.js'
whitelist: 'projects/banno-online/src/js/util/browser-detection.js'
}
requirement: {
type: BANNED_NAME
value: 'console.warn'
error_message: 'Calling console.warn is forbidden. Use bannoWeb.console.warn instead.'
whitelist: 'projects/banno-online/src/js/bannoweb.js'
whitelist: 'node_modules/google-closure-library/closure/goog/base.js'
whitelist: 'projects/banno-online/src/js/bootstrap.js'
}
requirement: {
type: BANNED_NAME
value: 'console.error'
error_message: 'Calling console.error is forbidden. Use bannoWeb.console.error instead.'
whitelist: 'projects/banno-online/src/js/bannoweb.js'
whitelist: 'node_modules/google-closure-library/closure/goog/base.js'
whitelist: 'projects/banno-online/src/js/bootstrap.js'
whitelist: 'node_modules/@jack-henry/web-component-router/lib/page.js'
whitelist: 'projects/banno-online/node_modules/@jack-henry/web-component-router/lib/page.js'
}
Metadata
Metadata
Assignees
Labels
No labels