firebase-cpp-sdk
firebase-cpp-sdk copied to clipboard
[Bug] Auth Emulator Support Doesn't Seem To Work On Windows
[REQUIRED] Please fill in the following fields:
- Pre-built SDK from the website or open-source from this repo: open source from the repo
- Firebase C++ SDK version: ~11.3.0
- Problematic Firebase Component: Auth (but worried about other emulators)
- Other Firebase Components in use: Firestore, Functions
- Platform you are using the C++ SDK on: Windows
- Platform you are targeting: desktop
[REQUIRED] Please describe the issue here:
I've set the environment variable USE_AUTH_EMULATOR in my power shell and I'm attempting to run an application that embeds the Firebase SDK into it. I see my test code correctly read out the value of USE_AUTH_EMULATOR from the environment so I do believe the program is picking up the correct environment values, but I don't see requests made to my local emulators, no logs are generated on the emulator side, and signing into an account that has been stored in the emulation environment also fails.
Steps to reproduce:
- run
$env:USE_AUTH_EMULATOR = "true" - run the application that uses the Firebase SDK
What happened? How can we make the problem occur? The application continued to use the regularly configured Firebase environment in the cloud, and not the emulators.
If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.
Relevant Code:
https://github.com/thebrowsercompany/firebase-cpp-sdk/blob/dece3ca27997a620098eaf1734011869228b5a44/auth/src/desktop/rpcs/auth_request.cc#L96-L116
@brianmichel I'd like to have two more information about your setup
- What's the port of your auth emulator, the default one we are using is 9099, and if your emulator is starting in another port, you can use AUTH_EMULATOR_PORT variable to set it.
- What's. the firewall setup in your machine. Wondering if the call is blocked by the firewall.
Thanks.
What's the port of your auth emulator, the default one we are using is 9099, and if your emulator is starting in another port, you can use AUTH_EMULATOR_PORT variable to set it.
We're using the default port of 9099, I'm just using firebase emulators:start to kick off the emulators which seems to use the default port you have mentioned.
What's. the firewall setup in your machine. Wondering if the call is blocked by the firewall.
I just have a standard Windows firewall running, I can try turning it off and see what happens, if you think that's advisable. Typically Windows will prompt for network access which I believe I've granted since I see my OpenJDK instance allowed to make TCP and UDP connections
, but let me know if there's a better way to check if the emulators have the appropriate access through the firewall.
Hey @cynthiajoan any thoughts here?
Hmmm, can you provide a minimum repro project, or try to use the testapp https://github.com/firebase/quickstart-cpp/tree/main/auth/testapp to repro the problem?
Hmmm, can you provide a minimum repro project, or try to use the testapp https://github.com/firebase/quickstart-cpp/tree/main/auth/testapp to repro the problem?
I'll give the test app a try!
Hey @brianmichel. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@brianmichel if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.