-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🐛 [cloud_firestore_web]: Uncaught (in promise) unimplemented when using loadBundle #9140
Comments
@rohansohonee This looks similar to #7722. |
@darshankawar it occurs both locally and on deployed server. In my error I do not have the "invalid argument" being shown as described in the issue you referenced. |
Thanks for the update. Can you provide minimal reproducible code sample that triggers this error ? |
@darshankawar it is producible with the example https://firebase.flutter.dev/docs/firestore/usage/#data-bundles |
Looking at the example, the data bundle is being converted from
Can you provide I am guessing the error could be due to the way web js sdk is handling the conversion. I see a similar issue in their repo: firebase/firebase-js-sdk#5838 |
@darshankawar It can be produced from the sample I provided in #9114 So you can inspect the response. |
Thanks. Using the code sample provided in linked issue, I am able to replicate the error mentioned. A similar issue was raised upstream : firebase/firebase-js-sdk#5838 Also related : #7722 |
Also faced this issue after upgrading to JS v9
|
I've just tested this, and the exception does occur. However, it still bundles the data. I've also tested this using a purely JS implementation like so: import { initializeApp } from 'firebase/app';
import { getFirestore, loadBundle } from 'firebase/firestore';
const firebaseConfig = {
apiKey: "AIzaSyAgUhHU8wSJgO5MVNy95tMT07NEjzMOfz0",
authDomain: "react-native-firebase-testing.firebaseapp.com",
databaseURL: "https://react-native-firebase-testing.firebaseio.com",
projectId: "react-native-firebase-testing",
storageBucket: "react-native-firebase-testing.appspot.com",
messagingSenderId: "448618578101",
appId: "1:448618578101:web:f9978594cf6fc210ac3efc",
measurementId: "G-9DTMXSP12B"
}
var app = initializeApp(firebaseConfig);
var firestore = getFirestore(app);
async function loadBundleFunc(){
// bundle I've created and hosted on a local node server:
var response = await fetch('http://localhost:3000/bundle');
var data = await response.arrayBuffer();
var loadBundleTask = await loadBundle(firestore, data);
console.log('loadBundleTask', loadBundleTask); // loadBundleTask {taskState: 'Success', documentsLoaded: 3, bytesLoaded: 1465, totalDocuments: 3, totalBytes: '1465'}
}
loadBundleFunc(); and I still got that exception in my browser: I believe this error is coming from the |
This issue has now been fixed upstream in the native Firebase web JS SDK. See here: firebase/firebase-js-sdk#5838 |
Bug report
When using the
loadBundle
on web, the browser dev tool's console window displays the following error message:Expected behavior
Should not throw any errors.
Additional Context
There are no errors shown in IDE(Android Studio) console. The errors are only being shown in the browsers console log.
Flutter doctor
Click To Expand
Flutter dependencies
Only depending on firebase dependencies to produce this issue.
Added certain overrides because of
firebase_core_web
issue with version 1.7.0 as mentioned here: #9132The text was updated successfully, but these errors were encountered: