-
Notifications
You must be signed in to change notification settings - Fork 885
-
Notifications
You must be signed in to change notification settings - Fork 885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service database is not available with firebase 10.13 #8450
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @GabrielRalph, could you please try changing the versions from Firebase requires all the services being used to be the exact same version, and it seems that if we don't specify the patch version, it uses different versions for app and database, which causes this error. Locally, it was using version |
Hey @GabrielRalph. 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! |
Operating System
Mac OS
Environment (if applicable)
Chrome
Firebase SDK Version
10.133
Firebase SDK Product(s)
Auth, Database
Project Tooling
Vanila Javascript, VS Code Live Server
Detailed Problem Description
I have tried to retrieve the database object using the getDatabase method from "https://www.gstatic.com/firebasejs/10.13/firebase-database.js".
When the function is called it throws an error "Error: Service database is not available".
Down grading to the last version 10.12.5 fixes this bug, so I assume it was associated with the newest release.
Steps and code to reproduce issue
import {initializeApp} from 'https://www.gstatic.com/firebasejs/10.13/firebase-app.js'
import {getAuth as _getAuth, signInWithRedirect as _signInWithRedirect, GoogleAuthProvider, onAuthStateChanged as _onAuthStateChange} from 'https://www.gstatic.com/firebasejs/10.13/firebase-auth.js'
import {getDatabase as _getDatabase, child, push, ref as _ref, update, get, onValue, onChildAdded, onChildChanged, onChildRemoved, set, off} from "https://www.gstatic.com/firebasejs/10.13/firebase-database.js"
// Include this script in a html document and the error should occur
const CONFIG = {...}
const App = initializeApp(CONFIG);
const Database = _getDatabase(App);
const Auth = _getAuth();
export function getApp() {return App}
export function getDatabase() {return Database}
export function getAuth() {return Auth}
export function ref(path) {return _ref(Database, path)}
export function signInWithRedirect(provider) {return _signInWithRedirect(Auth, provider)}
export function onAuthStateChanged(callback) {return _onAuthStateChange(Auth, callback)}
export {child, push, update, get, onValue, onChildAdded, onChildChanged, onChildRemoved, set, off, GoogleAuthProvider}
The text was updated successfully, but these errors were encountered: