I had to change the base url specified in App.razor file to all lowercase to get the error fixed. Also I noticed that the url's letter case should also be lower case else the error is seen again.
<base href="/myapp/" />
The post Blazor Server - the circuit failed to initialize helped me.