flow-cli icon indicating copy to clipboard operation
flow-cli copied to clipboard

Flow emulator cannot be started with custom emulator

Open sukantoraymond opened this issue 2 years ago • 4 comments

Problem

When emulator name is changed from "default" to something else, we get an error message saying “no default emulator account”. This means that currently flow cli users can’t start emulator with their custom emulator.

Steps to Reproduce

  • change the emulator name from “default” to something else
  • start emulator

Acceptance Criteria

Users should be able to start emulator with non default emulator.

sukantoraymond avatar Jun 10 '22 16:06 sukantoraymond

Was this fixed @sukantoraymond ?

devbugging avatar Jul 26 '22 17:07 devbugging

Do we want to support multiple emulators?

I always though it is some kind of default setting place, more like:

"emulator": {
 	    "defaultPort": 3569,
	    "defaultServiceAccount": "emulator-account2"
}

Actually default port doesn't make sense anymore, ( there is rest port , grpc port etc )

Maybe we can just add emulator launch option with an account:

flow emulator --service-account emulatorAccountX --rest-port 8888

Also it would be nice to have, on port clash, to listen on some empty random port. ( if we will run multiple emulators )

bluesign avatar Jul 30 '22 14:07 bluesign

Yes, this configuration was removed from flow.json and it will potentially be removed altogether if it won't be used. As we are adding some usage metrics we will be able to make better-informed decisions. What you wrote makes 100% sense as the next step in my mind. I don't think "other tools" should have configuration in flow.json, it should stay generic. We will be adding more and more tools into the CLI and it's better to isolate it from that and in that perspective emulator is also "another tool"

devbugging avatar Aug 01 '22 09:08 devbugging

Thanks for the feedback, will start working on this

sukantoraymond avatar Aug 01 '22 16:08 sukantoraymond

@sukantoraymond what is the status of this?

devbugging avatar Aug 23 '22 15:08 devbugging

Will put this in this sprint's backlog @sideninja

sukantoraymond avatar Aug 23 '22 15:08 sukantoraymond

@sideninja and I came to conclusion that we won't enable customizations on emulator through flow.json. Please see the PR thread for more inf.

sukantoraymond avatar Aug 24 '22 14:08 sukantoraymond