In step 4 after
firebase emulators:start --project=demo-friendlychat-android
I got an error in the ui log same as this.
It seems like people had been having this issue, and a viable fix was provided here.
This could be adopted instead of the originally provided code to start the emulator.