-
Notifications
You must be signed in to change notification settings - Fork 991
Closed
Description
Operating System
Windows 10
Browser Version
Firefox 117.0.1 (64-bit
Firebase SDK Version
9.21.0
Firebase SDK Product:
Firestore
Describe your project's tooling
Angular app with electron.
Describe the problem
I was trying to run a transaction. The specific code is this
return runTransaction(this.firestore,async (transaction)=>{
let kotTokenNumber = (await transaction.get(doc(this.firestore,'business/'+this.dataProvider.businessId+'/settings/settings'))).data()['kitchenTokenNo'];
let orderTokenNumber = (await transaction.get(doc(this.firestore,'business/'+this.dataProvider.businessId+'/settings/settings'))).data()['orderTokenNo'];
transaction.update(doc(this.firestore,'business/'+this.dataProvider.businessId+'/settings/settings'),{kitchenTokenNo:increment(1),orderTokenNo:increment(1)});
return {kotTokenNumber,orderTokenNumber};
});this functions normally and correctly in a browser but when running it inside a electron application it fails.
and this is the error it throws
[2023-09-23T15:42:36.151Z] @firebase/firestore: Firestore (9.21.0): FIRESTORE (9.21.0) INTERNAL ASSERTION FAILED: Unexpected state
ABe @ main.017ae000de9fe4ff.js:462
error @ main.017ae000de9fe4ff.js:462
xl @ main.017ae000de9fe4ff.js:462
gr @ main.017ae000de9fe4ff.js:462
wr @ main.017ae000de9fe4ff.js:462
(anonymous) @ main.017ae000de9fe4ff.js:462
(anonymous) @ main.017ae000de9fe4ff.js:462
mee @ main.017ae000de9fe4ff.js:462
s @ main.017ae000de9fe4ff.js:462
invoke @ polyfills.b8c5491cd9d2f3fa.js:1
onInvoke @ main.017ae000de9fe4ff.js:462
invoke @ polyfills.b8c5491cd9d2f3fa.js:1
run @ polyfills.b8c5491cd9d2f3fa.js:1
(anonymous) @ polyfills.b8c5491cd9d2f3fa.js:1
invokeTask @ polyfills.b8c5491cd9d2f3fa.js:1
onInvokeTask @ main.017ae000de9fe4ff.js:462
invokeTask @ polyfills.b8c5491cd9d2f3fa.js:1
runTask @ polyfills.b8c5491cd9d2f3fa.js:1
_ @ polyfills.b8c5491cd9d2f3fa.js:1
processTicksAndRejections @ node:internal/process/task_queues:96
Promise.then (async)
q @ polyfills.b8c5491cd9d2f3fa.js:1
R @ polyfills.b8c5491cd9d2f3fa.js:1
scheduleTask @ polyfills.b8c5491cd9d2f3fa.js:1
onScheduleTask @ polyfills.b8c5491cd9d2f3fa.js:1
scheduleTask @ polyfills.b8c5491cd9d2f3fa.js:1
scheduleTask @ polyfills.b8c5491cd9d2f3fa.js:1
scheduleMicroTask @ polyfills.b8c5491cd9d2f3fa.js:1
ee @ polyfills.b8c5491cd9d2f3fa.js:1
z @ polyfills.b8c5491cd9d2f3fa.js:1
(anonymous) @ polyfills.b8c5491cd9d2f3fa.js:1
(anonymous) @ polyfills.b8c5491cd9d2f3fa.js:1
(anonymous) @ main.017ae000de9fe4ff.js:462
emit @ node:events:513
endReadableNT @ node:internal/streams/readable:1358
processTicksAndRejections @ node:internal/process/task_queues:83
Steps and code to reproduce issue
Create an angular project and then create a runTransaction function like mentioned here then build it and run it inside of electron application.