-
Notifications
You must be signed in to change notification settings - Fork 927
@firebase/firestore: Firestore (9.23.0): FIRESTORE (9.23.0) INTERNAL ASSERTION FAILED: Unexpected state #7712
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
Comments
The same works with karma: https://github.com/fkolar/firebase-karma When I added a console.log to the file that does the assert
The output is
|
Thanks for reporting @fkolar and for providing a reproduction repository. |
I wonder if you guys have any workaround in meanwhile. I dont really want to more all to Karma yet. |
@fkolar To clarify, I think what is happening is that your build is choosing the wrong entry point/bundle for the Firebase SDK when building for tests. E.g. it's using the node entry point instead of the browser entry point. I'm not familiar enough with your tool chain to advise you how to change this. |
Thanks @fkolar for the repros, by the way, they were very helpful. The one bit of info I can offer is that the Jest test grabs the Node CJS bundle ( As for how to get it, I managed to do so with a custom resolver: Add Create
This doesn't seem very robust, especially as it will affect all modules (including non-firebase ones) but basically you have to tinker with condition order until you make sure you're resolving to this condition for firestore:
As an aside, when I did that, I got past the error above but ran into a timeout error which may be something else, or just because I haven't got the emulator set up. |
You may also be able to use the |
Hey @fkolar. 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! |
This is great info, in meantime I am using Karma and all works well, but I will try to this resolver thing.. |
I was getting a similar error when using IndexDB persistence with Firestore. Just ended up disabling persistence and things are working for me. |
Operating System
Mac OS X 13.6
Browser Version
Headless
Firebase SDK Version
9.23
Firebase SDK Product:
Firestore
Describe your project's tooling
I am using Angular wth NX workspace that is running JEST to execute test. I am using @angular/fire 7.6.1
Describe the problem
I am unable to execute a test that is failing on
I saw many similar issues over here but unfortunatelly I have no idea how to fix it in this setup. One more thing that I need to say, when I run a test to create a document it works, but when I try to retrieve it this is where I get this error.
Steps and code to reproduce issue
I have created the repo to test. Please follow quict instruction in the REDME. Thank you
https://github.com/fkolar/firebase-test
The text was updated successfully, but these errors were encountered: