I developed a PWA app using React which is protected by Azure B2C authentication and also has integration with application insight. When I debug the app in windows localhost, it launches fine without any issue. However, when I want to launch the app from Android Studio Emulator (2020 version) browser (Pixe_5_API_30) to connect to localhost using 10.0.2.2:3000 address (webapp running on port 3000 in localhost), the application keeps looping forever. I deployed the app into Azure static apps, and the deployed version of the application launces fine in emulator browser, only it keeps looping when trying to access on localhost.
I was able to connect to AVD DevTools and find that the app stuck at the step when it calls the https://dc.services.visualstudio.com/v2/track. Comparing it with windows localhost launch, the browser should call Azure B2C to download the openid-configuration for sign-in.
(https://b2ctenant_url/b2c_1a_signin/v2.0/.well-known/openid-configuration)
However for some reason emulator browser was not making that call and keeps looping forever. It makes multiple track request to https://dc.services.visualstudio.com/v2/track if I keep the app running for long.