1

I just created my first DAML project and wrote a basic template. When I try to test it, getting following error: damlc: user error (Failed to start scenario service: BErrorClient (ClientIOError (GRPCIOBadStatusCode StatusUnknown (StatusDetails {unStatusDetails = "Stream removed"}))))

Below is my daml code (template)


    module Rent where
    
    template RentalAgreement
      with
        landlord : Party
        tenant : Party
        terms : Text 
      where
        signatory landlord

rentTest = scenario do
  
  p1 <- getParty "party 1"
  p2 <- getParty "party 2"
  
  submit p1 do 
    create RentalAgreement 
      with 
        landlord = p1; tenant = p2; terms = "sample"
  
  
  assert True

daml build command is successful.

Compiling first-daml to a DAR.
Created .daml\dist\first-daml-0.0.1.dar

daml test command is failed.

damlc: user error (Failed to start scenario service: BErrorClient (ClientIOError (GRPCIOBadStatusCode StatusUnknown (StatusDetails {unStatusDetails = "Stream removed"}))))
Jai
  • 27
  • 6

1 Answers1

0

daml test opens a separate gRPC server and connects to that. Based on the error, it looks like this connection isn’t working properly. Do you have some kind of firewall enabled that could block this?

Do you encounter the same issue in daml studio?

I tried reproducing this in SDK 1.6.0 but was unable to do so. It would be great if you could provide the SDK version and the operating system you are running this on.

gRPC will use the http_proxy and https_proxy environment variables. Try setting no_proxy=127.0.0.1 to disable it for the requests to localhost.

cocreature
  • 801
  • 5
  • 5
  • Yes, I'm getting same issue in daml studio also. I dont think it is firewall related as other members in my team are able to run this. I'm trying this with OS: Windows 10, SDK version of 1.6, Java version: 1.8.0_211 – Jai Oct 26 '20 at 13:37
  • @Jai hm could it be that you have some proxy active? gRPC respects the `https_proxy` and `http_proxy` environment variables so try unsetting those before running `daml test`. – cocreature Oct 26 '20 at 17:40
  • Thank you @cocreature. This seems to be problem with these proxy environment variables only. I removed those properties and tried it and test is successful. But now every daml command is taking more than a minute to complete. When I try to run `daml version` it waits for a minute then giving me result. :( – Jai Oct 28 '20 at 00:41
  • It looks like it is possible to disable the proxy just for certain hosts. Try leaving `https_proxy` and `http_proxy` untouched and set `no_proxy="127.0.0.1"`. – cocreature Oct 28 '20 at 10:17