Comments (4)
When I am trying to deploy functions locally
Using
firebase serve --only functions
I am getting following error. My PC's (MC) time is proper i.e I have set automatic date&time
✔ functions: helloWorld: http://localhost:5000/pingbuds-268a1/us-central1/helloWorld
✔ functions: getFaceBookUserData: http://localhost:5000/pingbuds-268a1/us-central1/getFaceBookUserData
info: User function triggered, starting execution
info:
getFaceBookUserData req.body = { facebookIdArray: ' ["102062727235361","12345678"]' }
error: FIREBASE WARNING: {"code":"app/invalid-credential","message":"Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: invalid_grant (Token has been expired or revoked.)". There are two likely causes: (1) your server time is not properly synced or (2) your certificate key file has been revoked. To solve (1), re-sync the time on your server. To solve (2), make sure the key ID for your key file is still present at https://console.firebase.google.com/iam-admin/serviceaccounts/project. If not, generate a new key file at https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk."}
from functions-samples.
Try upgrading your firebase-tools lib to the latest version, then call firebase logout
followed by firebase login
. If that doesn't help, reach out via our support/community channels.
from functions-samples.
@chiragpurohit71085 I had the same error message when running firebase experimental:functions:shell
I "solved" the issue by updating
npm install -g firebase-tools@latest
npm install --save firebase-functions@latest firebase-admin@latest firebase@latest
BUT: It seems that all write operations on the real time database are not executed. The function returns after a while with a timeout.
E.g.:
`
import { database as dbEvent } from "firebase-functions";
export default dbEvent.ref("/tariffs/removeHistory").onCreate((event: any) => {
const bikesHistoryRef = event.data.adminRef.parent.parent.child("bikesHistory");
return bikesHistoryRef.set(null);
});
`
Set never gets executed and function hangs until it runs into a timeout.
Strange thing is that it used to work before. This is why I have been trying with different firebase and node versions.
from functions-samples.
are you behind a firewall or proxy?
from functions-samples.
Related Issues (20)
- DisplayUnlockCaptcha
- [BUG] in sample:
- [DOCS] for sample: taskqueues-backup-images, it simply doesn't work with tasks_fn.on_task_dispatched function, only with http_fn.on_request function HOT 5
- onTaskDispatched when region is set the function don't deploy to the region in sample:
- [BUG] Some phone numbers do not receive OTP SMS messages with Firebase phone auth: HOT 5
- Problems with sending push notifications
- functions predeploy error: Command terminated with non-zero exit code 2 HOT 1
- functions predeploy error: Command terminated with non-zero exit code 2 HOT 1
- [DOCS] for sample: python callable functions
- How is this still a problem 2 years later? I am running into this now.
- [BUG] in sample: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/v2/providers/scheduler' is not defined HOT 1
- [BUG] in sample:
- [DOCS] for sample: auth-blocking-functions | Cannot extract event_type HOT 1
- [DOCS] for sample: monitor-cloud-logging
- [BUG] Firebase Functions Tasks: Firebase ID token has incorrect "aud" (audience) claim. HOT 2
- https_fn.HttpsError::message isn't really surfaced
- ##https://github.com/firebase/functions-samples/tree/d8ec6aa2263e5403b05a33b0a06e9340f6b4968e/quickstarts HOT 1
- Hey-c6fc3 ____firebase app HOT 1
- [BUG] in sample: taskqueues-backup-images HOT 1
- [DOCS] for sample:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from functions-samples.