ScenarioBackendException - "Failed to create scenario context"

Mod note: As of SDK 1.5.0 Scenarios have been superseded by the more powerful Daml Script. We now recommend using that for all purposes. For more information, and to learn how to use Script please check out @Andreas’ post on our blog.

Recently we started seeing the following errors when running daml test

  ScenarioBackendException {scenarioNote = "Failed to create scenario context", scenarioBackendError
  = BErrorClient (ClientIOError (GRPCIOBadStatusCode StatusDeadlineExceeded (StatusDetails
  {unStatusDetails = "Deadline Exceeded"})))}

Thanks to @cocreature’s suggestion, we increased the grpc-timeout in the project’s daml.yaml file.

1 Like

Can you share a code example of what this change looks like in daml.yaml?

1 Like

The section in daml.yaml needs to look as follows:

scenario-service:
   grpc-timeout: 60

This sets the timeout to 60 seconds. Note that for most projects there is no need to modify this. This only becomes necessary once projects grow very large.

You can find more information on the fields that you can use in daml.yaml at https://docs.daml.com/tools/assistant.html#project-config-file-daml-yaml

2 Likes

A post was split to a new topic: Failed to create scenario context in ex-healthcare-claims-processing