• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • android-signing-plugin
    • None
    • Jenkins 2.401
      android-signing-plugin 2.2.5

      After upgrading JDK in docker agent to jdk17, the androd signing step fails with error:

      [SignApksBuilder] signing APK SignApksBuilder-out/zipalign/app-release-unsigned-7554420109451956305.apk
      FATAL: Remote call on JNLP4-connect connection from _gateway/172.17.0.1:41772 failed
      java.lang.ExceptionInInitializerError: Exception java.lang.IllegalAccessError: class com.android.apksig.internal.apk.v1.V1SchemeSigner (in unnamed module @0xdd9a76c) cannot access class sun.security.x509.AlgorithmId (in module java.base) because module java.base does not export sun.security.x509 to unnamed module @0xdd9a76c [in thread "pool-1-thread-251 for JNLP4-connect connection to _gateway/172.17.0.1:50000 id=16696"]
          at com.android.apksig.internal.apk.v1.V1SchemeSigner.getSupportedAlgorithmId(V1SchemeSigner.java:625)
          at com.android.apksig.internal.apk.v1.V1SchemeSigner.<clinit>(V1SchemeSigner.java:541)
      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from _gateway/172.17.0.1:41772
              at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
              at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
              at hudson.remoting.Channel.call(Channel.java:1000)
              at hudson.FilePath.act(FilePath.java:1192)
              at hudson.FilePath.act(FilePath.java:1181)
              at org.jenkinsci.plugins.androidsigning.SignApksBuilder.perform(SignApksBuilder.java:359)
              at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
              at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
              at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
              at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
              at hudson.model.Build$BuildExecution.build(Build.java:199)
              at hudson.model.Build$BuildExecution.doRun(Build.java:164)
              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
              at hudson.model.Run.execute(Run.java:1900)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
              at hudson.model.ResourceController.execute(ResourceController.java:101)
              at hudson.model.Executor.run(Executor.java:442)
      Caused: java.lang.NoClassDefFoundError: Could not initialize class com.android.apksig.internal.apk.v1.V1SchemeSigner
          at com.android.apksig.DefaultApkSignerEngine.<init>(DefaultApkSignerEngine.java:149)
          at com.android.apksig.DefaultApkSignerEngine.<init>(DefaultApkSignerEngine.java:52)
          at com.android.apksig.DefaultApkSignerEngine$Builder.build(DefaultApkSignerEngine.java:902)
          at com.android.apksig.ApkSigner.sign(ApkSigner.java:260)
          at com.android.apksig.ApkSigner.sign(ApkSigner.java:179)
          at org.jenkinsci.plugins.androidsigning.SignApksBuilder$SignApkCallable.invoke(SignApksBuilder.java:510)
          at org.jenkinsci.plugins.androidsigning.SignApksBuilder$SignApkCallable.invoke(SignApksBuilder.java:464)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3578)
          at hudson.remoting.UserRequest.perform(UserRequest.java:211)
          at hudson.remoting.UserRequest.perform(UserRequest.java:54)
          at hudson.remoting.Request$2.run(Request.java:376)
          at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:121)
          at java.base/java.lang.Thread.run(Thread.java:833)
      Caused: java.io.IOException: Remote call on JNLP4-connect connection from _gateway/172.17.0.1:41772 failed
          at hudson.remoting.Channel.call(Channel.java:1004)
          at hudson.FilePath.act(FilePath.java:1192)
          at hudson.FilePath.act(FilePath.java:1181)
          at org.jenkinsci.plugins.androidsigning.SignApksBuilder.perform(SignApksBuilder.java:359)
          at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
          at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
          at hudson.model.Build$BuildExecution.build(Build.java:199)
          at hudson.model.Build$BuildExecution.doRun(Build.java:164)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
          at hudson.model.Run.execute(Run.java:1900)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:442)

       

      Then I tried to build the plugin's master branch with temurin jdk 17( on GitHub Actions actually: https://github.com/fcitx5-android/jenkins-android-signing-plugin/actions/runs/4771640436/jobs/8483688184 ), which yeilds following error:

      Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.1:javadoc (default) on project android-signing: An error has occurred in JavaDocs report generation: 
      Exit code: 1 - Loading source files for package org.jenkinsci.plugins.androidsigning...
      Constructing Javadoc information...
      /home/runner/work/jenkins-android-signing-plugin/jenkins-android-signing-plugin/src/main/java/org/jenkinsci/plugins/androidsigning/SignedApkMappingStrategy.java:3: error: package com.sun.org.apache.xpath.internal.operations is not visible
      import com.sun.org.apache.xpath.internal.operations.Bool;
                                              ^
        (package com.sun.org.apache.xpath.internal.operations is declared in module java.xml, which does not export it)
      Error: [ERROR] 1 errorCommand line was: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.6-10/x64/bin/javadoc @options @packagesRefer to the generated Javadoc files in '/home/runner/work/jenkins-android-signing-plugin/jenkins-android-signing-plugin/target/site/apidocs' dir.
      -> [Help 1]To see the full stack trace of the errors, re-run Maven with the -e switch.
      Re-run Maven using the -X switch to enable full debug logging.For more information about the errors and possible solutions, please read the following articles:
      [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

      Since the plugin's latest version 2.2.5 on its website ( https://plugins.jenkins.io/android-signing/ )  was released 6 years ago (2017-07-13), and there are some useful changes in the master branch, is it the time to have a new release?

          [JENKINS-71124] SignApksBuilder does not work with JDK 17

          Mark Waite added a comment -

          rocka I doubt that restjohn has any time to spend on the android signing plugin. In JENKINS-58310 Robert said:

          I have zero extra time to devote to this plugin at present. A pull request would be fantastic, though, if someone's organization needs this feature and would be willing to spend the development time as mine did when we had the requirement for this plugin.

          If your organization needs the android signing plugin, someone from your organization should adopt the plugin, modernize the plugin, and release a new version.

          Mark Waite added a comment - rocka I doubt that restjohn has any time to spend on the android signing plugin. In JENKINS-58310 Robert said: I have zero extra time to devote to this plugin at present. A pull request would be fantastic, though, if someone's organization needs this feature and would be willing to spend the development time as mine did when we had the requirement for this plugin. If your organization needs the android signing plugin, someone from your organization should adopt the plugin , modernize the plugin , and release a new version .

          markewaite I have it fixed, one test is not passing, trying to solve it. Could be possible to release the plugin with Java17 fix in the meantime and remove the test?

          Michael Nazzareno added a comment - markewaite I have it fixed, one test is not passing, trying to solve it. Could be possible to release the plugin with Java17 fix in the meantime and remove the test?

          Mark Waite added a comment -

          panicking I am not a maintainer of the android signing plugin. If you'd like to release the plugin, you'll need to adopt it.

          Mark Waite added a comment - panicking I am not a maintainer of the android signing plugin. If you'd like to release the plugin, you'll need to adopt it.

            panicking Michael Nazzareno
            rocka Rocket
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: