Closed etanshaul closed 1 year ago
Some notes from initial investigation.
From the IDE logs, --add-opens
is being issued from the appengine-plugins-core
library:
com.google.cloud.tools.appengine.operations.DevAppServerRunner - submitting command: /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/java --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.https=ALL-UNNAMED -Duse_jetty9_runtime=true -D--enable_all_permissions=true -Dappengine.sdk.root=/Users/.../google-cloud-sdk/platform/google_appengine/google/appengine/tools/java -cp /Users/.../google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/appengine-tools-api.jar com.google.appengine.tools.development.DevAppServerMain --address=localhost --port=8080 --allow_remote_shutdown --disable_update_check --no_java_agent /Users/...
A relevent PR that added this into the library from a while ago: https://github.com/GoogleCloudPlatform/appengine-plugins-core/pull/894/files
Still not clear what changed, or why java 8 isn't being recognized properly to omit these flags.
On closer look, the referenced PR above is introducing the --add-open
flags via:
if (!JAVA_SPECIFICATION_VERSION.value().equals("1.8")) {
// Due to JPMS restrictions, Java11 or later need more flags:
jvmArguments.add("--add-opens");
jvmArguments.add("java.base/java.net=ALL-UNNAMED");
jvmArguments.add("--add-opens");
jvmArguments.add("java.base/sun.net.www.protocol.http=ALL-UNNAMED");
jvmArguments.add("--add-opens");
jvmArguments.add("java.base/sun.net.www.protocol.https=ALL-UNNAMED");
}
Cloud Code picked up these changes with its last release. Apparently that code is not guarding properly and still adding the flags when using JDK8.
This was fixed in patch release 23.5.1. Please reopen if you encounter this issue again.
Since release
23.4.1
, running a local App Engine local emulator with a JDK8, leads to the following error:Current workarounds
22.3.3-22x