Problem running Daml Script against Daml Hub

I’ve downloaded a participants.json file from the Daml Hub console and am running

daml script --dar .daml/dist/my-unsharable-dar.dar --participant-config=$HOME/Downloads/participants.json --json-api --output-file=out --script-name ProdScripts:do_some_stuff

I get an error in return:

Exception in thread "main" spray.json.JsonParser$ParsingException: Unexpected end-of-input at input index 0 (line 1, position 1), expected JSON Value:

^

	at spray.json.JsonParser.fail(JsonParser.scala:237)

SDK version I’m using is 1.8. Any ideas what’s going wrong?

1 Like

@chris.norris ran into the same issue and it was caused by the participants.json file referring to the new daml-hub.com url whereas the ledger was still on projectdabl.com. You could try changing the URL to the latter.

We are currently working on improving the error message to make this easier to figure out.

2 Likes

Spot on, that was the problem, thank you!

1 Like

Sorry about this! We’ll be pushing out a patch that should fix this file some time today; will notify this thread when this is done.

2 Likes

The fix has been pushed! participants.json now reflects the appropriate domain, so the file should be able to be used without modification.

4 Likes

Just a tip - there may be a lingering cache issue causing the wrong domain to still be included in participants.json on Daml Hub. If affected, perform a hard browser refresh (cmd+shift+r on macos/Chrome) and re-download.

3 Likes