# ModuleSigner issue

**URL:** <https://forum.inductiveautomation.com/t/modulesigner-issue/96300>\
**Category:** Module Development\
**Created:** [September 23, 2024, 11:19am UTC](https://forum.inductiveautomation.com/t/modulesigner-issue/96300 "2024-09-23T11:19:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darren\_Steele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/darren_steele/32/55624_2.png) [@Darren\_Steele](https://forum.inductiveautomation.com/u/Darren_Steele)\
**Post date:** [September 23, 2024, 11:19am UTC](https://forum.inductiveautomation.com/t/modulesigner-issue/96300/1 "2024-09-23T11:19:20Z")

</div>

Hi all,

I'm trying to sign my build using gradle and for now am trying to sign it via command line:

`./gradlew :signModule --certAlias server --certFile ./cert.crt --certPassword xxx --keystoreFile keystore.jks --keystorePassword xxx`

but I keep getting a response of:

```python

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':signModule'.
> 'void com.inductiveautomation.ignitionsdk.ModuleSigner.<init>(java.security.PrivateKey, java.io.InputStream)'

```

The odd thing is if I plug all the same passwords and keystore and what not into the java signer

`module-signer-1.0.0-SNAPSHOT-jar-with-dependencies.jar`

then everything just works. I'll raise a similar issue on the ignition-module-tools/issues github page but I just wonder if anyone else has had these problems? I'm a bit stumped

---

<div class="post-metadata">

**Author:** ![Bill\_Liu](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@Bill\_Liu](https://forum.inductiveautomation.com/u/Bill_Liu)\
**Post date:** [October 7, 2024, 8:02pm UTC](https://forum.inductiveautomation.com/t/modulesigner-issue/96300/2 "2024-10-07T20:02:02Z")

</div>

Which version of Java/keytool are you using to create the .jks Key Store? There is a change to the Key Store in Java 22. I don't have the issue with Java 17.

---

<div class="post-metadata">

**Author:** ![Darren\_Steele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/darren_steele/32/55624_2.png) [@Darren\_Steele](https://forum.inductiveautomation.com/u/Darren_Steele)\
**Post date:** [October 12, 2024, 9:49am UTC](https://forum.inductiveautomation.com/t/modulesigner-issue/96300/3 "2024-10-12T09:49:48Z")

</div>

Thanks Bill - I changed over to Java17 and after a false start or two finally managed to get everything signing.

I've been out of Java for a few years - getting involved in this stuff has just reminded me what a complete mess the whole ecosystem is in ☹

Thanks though!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 12, 2024, 12:24pm UTC](https://forum.inductiveautomation.com/t/modulesigner-issue/96300/4 "2024-10-12T12:24:08Z")

</div>

You must not have been out doing web development then 😆

---

<div class="post-metadata">

**Author:** ![Darren\_Steele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/darren_steele/32/55624_2.png) [@Darren\_Steele](https://forum.inductiveautomation.com/u/Darren_Steele)\
**Post date:** [October 12, 2024, 3:02pm UTC](https://forum.inductiveautomation.com/t/modulesigner-issue/96300/5 "2024-10-12T15:02:42Z")

</div>

I take it all back. Tried building on my desktop machine, same repo, so same gradlew, same javac and java from open\_sdk\_17 - this build fails with the same private key issue.

Also, we have 3 modules, core - quality and ops. Core and Ops build and sign fine but quality gets the same error on both machines. Truly frustrating.

Maybe it's something in my .m2 cache - I'll keep hunting - but at least one machine can sign a gradle build 🙂

---

<div class="post-metadata">

**Author:** ![Darren\_Steele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/darren_steele/32/55624_2.png) [@Darren\_Steele](https://forum.inductiveautomation.com/u/Darren_Steele)\
**Post date:** [October 13, 2024, 11:31am UTC](https://forum.inductiveautomation.com/t/modulesigner-issue/96300/6 "2024-10-13T11:31:03Z")

</div>

Finally got to the bottom of all this. I rebuilt the module signer and the gradle module tool and installed them into my local .m2 repo. Now my build scripts reference my custom builds and everything signs perfectly. It may be something specific to my setup but there was definitely something screwy going on - and now everything just works....step slowly away from the code!

It may be worth bringing the module signer up to Java17 which seems to be where the example code currently is - @Kevin.Herron - your fingerprints seem to be all over the module signer. Is it worth doing do you think?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 13, 2024, 7:42pm UTC](https://forum.inductiveautomation.com/t/modulesigner-issue/96300/7 "2024-10-13T19:42:33Z")

</div>

I don't think the standalone module signer has anything to do with your issue at all. Aside from the fact that it already works on both JDK 11 and 17, a while back @Brian_Ray copy/pasted/updated module signer into the gradle module plugin source code, so there's no dependency or link to the standalone version.
