Scripting modules and protobuf

I’m developing modules for Ignition 8.3.4 using IntelliJ 2025.2.1 at the moment. I’m having difficulties passing a dictionary/hashmap object as a parameter from the designer/client to the gateway. Dictionaries are flat, but may contain non-primitive types such as java.math.BigInteger and java.util.Date.

Serialization/deserialization seem to work fine, but there’s an “argument type mismatch” exception (or similar) in RpcRoutes before it gets to the implementation. According to the stack trace, it’s happening in RpcDelegate$DelegateRpcHandler.handle. My line numbers do not line up with the call stack, but I can at least hit breakpoints in the latter.

The primary problem is that IntelliJ is refusing to decompile the library with RpcRoutes when trying to step into it. When I search my set of external libraries, I don’t find any matching functions for the call stack. So, I’m likely missing something.

  1. What jar hosts com.inductiveautomation.ignition.gateway.rpc.RpcRoutes?

  2. Is there a best-practice preferred class to use for dictionary type param?

  3. The debugger tells me that it’s serializing the hashmaps as Collections$UnmodifiableMap. My params are all Hashmap. Might this be the issue?

What does your ProtoRpcSerializer look like?

ProtoRpcSerializer.newBuilder()  
  .addGsonAdapter(SqlValue.class, new SqlValueAdapter())
  .addGsonAdapter(java.math.BigInteger.class, new BigIntegerAdapter())
  .addProtoAdapter(Dataset.class,
                   DatasetProto.DatasetPB::parseFrom,
                   ds -> new DatasetSerializerPlus().toProtobufMessage(ds),
                   dsPB -> new DatasetSerializerPlus().fromProtobufMessage(dsPB))
  .build();

Are you calling pyToJava on your dictionaries?