https://linen.dev logo
#help
Title
# help
b

Benjamin MIXTE -BTWIN VILLAGE LILLE-

12/22/2023, 1:09 PM
Hello, We are using wiremock on google cloud run service. (with state extension v0.5.0) We get this error on one of our mock. wiremock.com.github.jknack.handlebars.HandlebarsException: inline@667d77e612: java.lang.IllegalArgumentException: json can not be null Is anybody already meet this error message ? And how can we solve it ? No trouble when wiremock runs on localhost.
d

Dirk Bolte

12/22/2023, 2:27 PM
can you run it again with verbose logging and also post a stacktrace?
can you also post the stub?
b

Benjamin MIXTE -BTWIN VILLAGE LILLE-

12/22/2023, 3:02 PM
We found the issue. We get error when wiremock search for the good mapping. sometimes $.workflow_id is not passed and the mapping failed "hasContext": "{{jsonPath (defaultIfEmpty request.body '{}') '$.workflow_id'}}-az2f" To fix the trouble we make test on request because this json is never null. "hasContext": "{{jsonPath request '$.body.workflow_id' default='null'}}-az2f"
d

Dirk Bolte

12/22/2023, 3:05 PM
I will check and see whether this error is in the state extension or below. Thanks for the isolation
just checked: the actual error is reported by jsonpath itself and intended, so it's not in the extension. Anyhow I opened https://github.com/wiremock/wiremock/issues/2546 with some background information and an initial analysis.
7 Views