You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cloud Firestore support is provided by the @google-cloud/firestore library. Therefore the easiest and most efficient way to get Firestore issues resolved is by directly reporting them at the nodejs-firestore GitHub repo.
If you still think the problem is related to the code in this repository, then read on.
For issues or feature requests related to the code in this repository
file a Github issue.
For general technical questions, post a question on StackOverflow
with the firebase tag.
For general Firebase discussion, use the firebase-talk
google group.
For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
Operating System version: macOS Ventura 13.0.1
Firebase SDK version: "firebase-admin": "^11.0.0"
Firebase Product: Firestore
Node.js version: v16.17.1
NPM version: 8.15.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
The firestore FieldValue.serverTimestamp() fails starting from v11.0.0 of firebase-admin sdk. It was working fine till v10.3.0.
Export the code sample from index.ts file
Start firebase auth, firestore and functions emulator with cmd npm run build && firebase emulators:start
From the emulator UI of auth create a new user
See crash in terminal
i functions: Beginning execution of "newUser"
⚠ functions: TypeError: Cannot read properties of undefined (reading 'serverTimestamp')
at /Users/omphatak/Work/5amClub/5amClub-Cloud-Functions/functions/lib/auto/newUser.js:8:47
at cloudFunction (/Users/omphatak/Work/5amClub/5amClub-Cloud-Functions/functions/node_modules/firebase-functions/lib/v1/cloud-functions.js:79:23)
at /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:516:16
at runFunction (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:504:15)
at runBackground (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:515:11)
at processBackground (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:499:11)
at /usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:690:27
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/firebase-tools/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/local/lib/node_modules/firebase-tools/node_modules/express/lib/router/route.js:137:13)
at next (/usr/local/lib/node_modules/firebase-tools/node_modules/express/lib/router/route.js:131:14)
⚠ Your functionwas killed because it raised an unhandled error.
Hi @OutdatedGuy , we have seeing reports of this issue occuring sometimes when using the global admin namespace. Importing the global admin namespace is deprecated and namespaces will be removed in the future. We recommend developers to use the new modular entry points to access the various APIs of the SDK, as opposed to using the global admin namespace.
@lahirumaramba I just ran into this issue as well after upgrading to version 11.x. I'm also using the global admin namespace.
Importing the global admin namespace is deprecated and namespaces will be removed in the future
Deprecated does not mean removed. Based on your comment, it sounds like importing from the admin namespace is broken with no plans on a fix. Is there any reason why dropping support for the admin namespace isn't included in the release notes as a breaking change? Otherwise, this issue should be reopened.
Looking at #1959, it seems like the v11 release notes should be updated to note that importing from the global admin namespace is now broken in subtle ways and affected users should read #1959 for more information.
[READ] Step 1: Are you in the right place?
Cloud Firestore support is provided by the
@google-cloud/firestore
library. Therefore the easiest and most efficient way to get Firestore issues resolved is by directly reporting them at the nodejs-firestore GitHub repo.If you still think the problem is related to the code in this repository, then read on.
file a Github issue.
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
macOS Ventura 13.0.1
"firebase-admin": "^11.0.0"
Firestore
v16.17.1
8.15.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
The firestore
FieldValue.serverTimestamp()
fails starting fromv11.0.0
of firebase-admin sdk. It was working fine tillv10.3.0
.index.ts
filenpm run build && firebase emulators:start
Relevant Code:
The text was updated successfully, but these errors were encountered: