Skip to content
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

FIRESTORE (10.9.0) INTERNAL ASSERTION FAILED: Unexpected state #8189

Closed
kmorgan8588 opened this issue Apr 19, 2024 · 15 comments
Closed

FIRESTORE (10.9.0) INTERNAL ASSERTION FAILED: Unexpected state #8189

kmorgan8588 opened this issue Apr 19, 2024 · 15 comments

Comments

@kmorgan8588
Copy link

kmorgan8588 commented Apr 19, 2024

Operating System

Windows 10

Browser Version

Chrome 124

Firebase SDK Version

10.9.0

Firebase SDK Product:

Firestore

Describe your project's tooling

React application with Webpack

Describe the problem

Customer using our application in production attempted to update a document, and it failed with this error. We were able to parse the error stack seen below. Looks like the async_queue has already failed?

Stack trace:

../node_modules/.pnpm/@firebase+firestore@4.5.0_@firebase+app@0.9.29/node_modules/@firebase/firestore/src/util/assert.ts:40:8:null
../node_modules/.pnpm/@firebase+firestore@4.5.0_@firebase+app@0.9.29/node_modules/@firebase/firestore/src/util/async_queue_impl.ts:238:6:fail
../node_modules/.pnpm/@firebase+firestore@4.5.0_@firebase+app@0.9.29/node_modules/@firebase/firestore/src/util/async_queue_impl.ts:119:9:lu
../node_modules/.pnpm/@firebase+firestore@4.5.0_@firebase+app@0.9.29/node_modules/@firebase/firestore/src/util/async_queue_impl.ts:93:9:enqueue
../node_modules/.pnpm/@firebase+firestore@4.5.0_@firebase+app@0.9.29/node_modules/@firebase/firestore/src/util/async_queue.ts:193:20:enqueueAndForget
../node_modules/.pnpm/@firebase+firestore@4.5.0_@firebase+app@0.9.29/node_modules/@firebase/firestore/src/util/async_queue.ts:160:45:handleDelayElapsed

Steps and code to reproduce issue

Steps to reproduce: Unknown, we've seen these internal assertions occur in the past, but it's intermittent and not consistent to reproduce

@kmorgan8588 kmorgan8588 added new A new issue that hasn't be categoirzed as question, bug or feature request question labels Apr 19, 2024
@jbalidiong jbalidiong added needs-attention and removed new A new issue that hasn't be categoirzed as question, bug or feature request labels Apr 22, 2024
@cherylEnkidu
Copy link
Contributor

cherylEnkidu commented Apr 22, 2024

Hi,

If you run into this issue when you develop locally. Could you please enable the debug log for us to get more info of this failure?

Also, could you please try to downgrade your SDK version to 10.6.0 to see if that fix your problem?

@michaelAtCoalesce
Copy link

@cherylEnkidu - kyle and i are working on this together so i am responding on his behalf.

we cannot turn on debug logging for this, as we do not see it locally, and we do not have a recreate case. it happens very intermittently in production with customers (thus why we cannot turn on logging)

we are happy to try custom builds with specific logging for this issue if needed (maybe you can add some telemetry or logs right before the offending assert fires?)- but turning on all debug logging is a no-go for us.

@cherylEnkidu
Copy link
Contributor

Hi @michaelAtCoalesce ,

Thank you for the reply! Have you tried to downgrade the SDK version to 10.6.0? This version hasn't received any connectivity issue reports yet.

@google-oss-bot
Copy link
Contributor

Hey @kmorgan8588. 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!

@michaelAtCoalesce
Copy link

@cherylEnkidu we cannot downgrade at this time...

@mlahp7
Copy link

mlahp7 commented May 13, 2024

Hi,

If you run into this issue when you develop locally. Could you please enable the debug log for us to get more info of this failure?

Also, could you please try to downgrade your SDK version to 10.6.0 to see if that fix your problem?

Hello @cherylEnkidu,
We are also seeing this happen on Firestore (10.8.0) via Angularfire (17.0.1).
iPadOS Version: 17.3.1

Our only way of reproducing this error is by logging in and returning a few days later. After returning, any call to Firestore is met with the error:
[2024-05-13T14:03:25.474Z] @firebase/firestore:"Firestore (10.8.0): FIRESTORE (10.8.0) INTERNAL ASSERTION FAILED: Unexpected state"

We have enabled the debug log via the enableLogging(true) function found here:
import { enableLogging } from '@angular/fire/database';

I'm not sure if the function succeeded but here is a sample of what we received:

[Error] [2024-05-13T13:38:40.309Z]  @firebase/firestore: – "Firestore (10.8.0): FIRESTORE (10.8.0) INTERNAL ASSERTION FAILED: Unexpected state"
	defaultLogHandler (vendor.js:342310)
	error (vendor.js:342391)
	__PRIVATE_logError (vendor.js:26198)
	fail (vendor.js:26275)
	au (vendor.js:45192)
	enqueue (vendor.js:45105)
	enqueueAndForget (vendor.js:45090)
	(anonymous function) (vendor.js:40637)
	(anonymous function) (vendor.js:40612)
	mo (vendor.js:39963)
	(anonymous function) (vendor.js:40211:84)
	(anonymous function) (vendor.js:40160)
	ib (vendor.js:342913)
	C (vendor.js:342881)
	(anonymous function) (vendor.js:344640)
	qc (vendor.js:343511:130)
	rc (vendor.js:343386)
	(anonymous function) (vendor.js:343362)
	(anonymous function) (vendor.js:343303)
	ib (vendor.js:342913)
	C (vendor.js:342881)
	Ad (vendor.js:344041:131)
	(anonymous function) (vendor.js:344038)
	(anonymous function) (vendor.js:344035)
	od (vendor.js:343944)
	(anonymous function) (vendor.js:343910)
	onInvoke (vendor.js:253910)
	run (polyfills.js:369)
	(anonymous function) (polyfills.js:1444)
	onInvokeTask (vendor.js:253587)
	onInvokeTask (vendor.js:253899)
	runTask (polyfills.js:415)
	drainMicroTaskQueue (polyfills.js:782)
[Error] [2024-05-13T13:38:40.310Z]  @firebase/firestore: – "Firestore (10.8.0): FIRESTORE (10.8.0) INTERNAL ASSERTION FAILED: Unexpected state"
	defaultLogHandler (vendor.js:342310)
	error (vendor.js:342391)
	__PRIVATE_logError (vendor.js:26198)
	fail (vendor.js:26275)
	au (vendor.js:45192)
	enqueue (vendor.js:45105)
	enqueueAndForget (vendor.js:45090)
	(anonymous function) (vendor.js:40637)
	(anonymous function) (vendor.js:40612)
	mo (vendor.js:39963)
	(anonymous function) (vendor.js:40211:84)
	(anonymous function) (vendor.js:40160)
	ib (vendor.js:342913)
	C (vendor.js:342881)
	(anonymous function) (vendor.js:344640)
	qc (vendor.js:343511:130)
	rc (vendor.js:343386)
	(anonymous function) (vendor.js:343362)
	(anonymous function) (vendor.js:343303)
	ib (vendor.js:342913)
	C (vendor.js:342881)
	Ad (vendor.js:344041:131)
	(anonymous function) (vendor.js:344038)
	(anonymous function) (vendor.js:344035)
	od (vendor.js:343944)
	(anonymous function) (vendor.js:343910)
	onInvoke (vendor.js:253910)
	run (polyfills.js:369)
	(anonymous function) (polyfills.js:1444)
	onInvokeTask (vendor.js:253587)
	onInvokeTask (vendor.js:253899)
	runTask (polyfills.js:415)
	drainMicroTaskQueue (polyfills.js:782)

@cherylEnkidu
Copy link
Contributor

Hi @kmorgan8588 @michaelAtCoalesce @mlahp7 ,

Could you please tried upgrade to version greater than 10.11.1 ?

@mlahp7
Copy link

mlahp7 commented May 14, 2024

Hi @kmorgan8588 @michaelAtCoalesce @mlahp7 ,

Could you please tried upgrade to version greater than 10.11.1 ?

Yes, it looks like AngularFire just released a version that updates the firebase dependency to ^10.12.0.
I'll report back when I've had a chance to make the changes

@luke-rogers
Copy link

Also seeing this issue. I'll attempt to capture some logs and update this ticket.

@cherylEnkidu What is it in version 10.12.0 that we might expect to resolve the issue?

@google-oss-bot
Copy link
Contributor

Hey @kmorgan8588. 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!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@kmorgan8588 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.

@michaelAtCoalesce
Copy link

lets reopen. we saw it again in 10.12.0


    FIRESTORE (10.12.0) INTERNAL ASSERTION FAILED: Unexpected state

      at fail (node_modules/.pnpm/@firebase+firestore@4.6.2_@firebase+app@0.10.3/node_modules/@firebase/firestore/src/util/assert.ts:40:9)
      at fail (node_modules/.pnpm/@firebase+firestore@4.6.2_@firebase+app@0.10.3/node_modules/@firebase/firestore/src/remote/serializer.ts:29:52)
      at PersistentListenStream.fromWatchChange [as onMessage] (node_modules/.pnpm/@firebase+firestore@4.6.2_@firebase+app@0.10.3/node_modules/@firebase/firestore/src/remote/persistent_stream.ts:650:25)
      at onMessage (node_modules/.pnpm/@firebase+firestore@4.6.2_@firebase+app@0.10.3/node_modules/@firebase/firestore/src/remote/persistent_stream.ts:525:21)
      at fn (node_modules/.pnpm/@firebase+firestore@4.6.2_@firebase+app@0.10.3/node_modules/@firebase/firestore/src/remote/persistent_stream.ts:578:18)
      at op (node_modules/.pnpm/@firebase+firestore@4.6.2_@firebase+app@0.10.3/node_modules/@firebase/firestore/src/util/async_queue_impl.ts:135:7)
      at op (node_modules/.pnpm/@firebase+firestore@4.6.2_@firebase+app@0.10.3/node_modules/@firebase/firestore/src/util/async_queue_impl.ts:186:14)

@MarkDuckworth MarkDuckworth reopened this May 30, 2024
@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@kmorgan8588 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.

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@kmorgan8588 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.

@cherylEnkidu
Copy link
Contributor

Hi @michaelAtCoalesce

INTERNAL ASSERTION FAILED: Unexpected state is a default message throws from SDK, from the stack trace, your application probably fails for a different reason. If you are still experiencing this, please open a new ticket and provide us the minimum repo code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants