Help me, I’m making app about online users count but something wrong. When I opened app, It showed a notification “For a custom firebase host you must first set your authentication server before using authentication features”. You can see codes, objects here
The error message you’re encountering, “For a custom Firebase host you must first set your authentication server before using authentication features,” suggests that there might be an issue with your Firebase configuration related to authentication. It seems like you’re trying to use Firebase authentication features, but your configuration might not be set up correctly.
Here are some steps you can take to troubleshoot and resolve this issue:
Check Firebase Console: Make sure you have properly set up Firebase Authentication in the Firebase Console for your project.
API Key and Configuration: Double-check that you’ve integrated the correct Firebase API key and configuration settings in your app. These settings are necessary for authentication to work properly.
Authentication Provider: Ensure you’ve configured at least one authentication provider (e.g., Email/Password, Google, Facebook) in your Firebase project. This allows users to authenticate using different methods.
Authentication Server: The error message mentions an “authentication server.” Verify that you’ve set up the authentication domain or server properly in your Firebase settings. It might be related to your custom Firebase host.
Network Connection: Make sure your device has an active internet connection. Firebase authentication requires a network connection to work.
Firebase Initialization: Check that you’re initializing Firebase correctly in your app. You should have code that looks like this (usually in the onCreate method of your main activity):
FirebaseApp.initializeApp(this);
Library Versions: Ensure that you’re using compatible versions of the Firebase SDK and other related libraries. Mismatched library versions can sometimes lead to unexpected behavior.
Review Your Code: Double-check your code where you’re trying to use Firebase Authentication features. Make sure you’re correctly handling authentication-related calls and errors.
Documentation: Refer to the Firebase Authentication documentation for your chosen platform (Android or iOS) to ensure you’re following the correct integration steps.
If you’re still facing issues after checking the above steps, it might be helpful to share relevant parts of your code (without sensitive information) so that I can provide more specific guidance.