I am trying to update firebase to the lastest version and encountered an error. That pointed me to the functions-emulator having an issue:
$ npm install #google-cloud/functions-emulator
npm ERR! Unexpected end of JSON input while parsing near '..."retry-request":"^4.0'
This happens after the recent update on firebase. Am I doing something wrong or is this bug I should report?
Tried multiple solutions including a complete de-install of npm, node and even vsc. Updating npm, trying to install the cloud functions emulator specifically...always the same error in some dependency file.
Here's the error log
88 error Unexpected end of JSON input while parsing near '..."retry-request":"^4.0'
I was just looking to update firebase to the latest version. Now everything is broken :D
Any help is much appreciated.
Error occurred due to a corrupted file download (tried installing a firebase update on the train).
Solved with:
npm cache clean --force
Then re-installed package.
Related
I'm having a problem with the flutterfire configure command. I keep getting this error:
i try this
2: FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command and this enter link description here
and i did firebase logout then firebase login and this error is still the same what should i do?
I faced the same error: in my case it was just the outdated version of Node.js.
Updating Node to a version greater or equal than 14.8.0 solved the problem. Download the latest stable version from Node website for Windows or run
npm install -n g
for MacOs and Linux.
I have deployed Firebase functions in the past many times. For some reasons, recently (around 2-3 days) I am frequently getting error while deployment. I am using windows to release the code. When I tried with setting up the same project in my Linux system and Mac system the deployment works correctly. What may be the issue for the release from Windows environment.
The following is the issues getting while deployment.
! functions[payment(us-central1)]: Deployment error.
Function failed on loading user code. This is likely due to a bug in the user code. Error message: Error: please examine your function logs to see the error cause: https://cloud.google.com/functions/docs/monitoring/logging#viewing_logs. Additional troubleshooting documentation can be found at https://cloud.google.com/functions/docs/troubleshooting#logging. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.
Functions deploy had errors with the following functions:
admin
cancellation
cost
createStripeCharge
customer
driver
driverLiveTracking
generalSettings
notification
order
payment
To try redeploying those functions, run:
firebase deploy --only "functions:admin,functions:cancellation,functions:cost,functions:createStripeCharge,functions:customer,functions:driver,functions:driverLiveTracking,functions:generalSettings,functions:notification,functions:order,functions:payment"
To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
Following is the deployment command I am using for
"echo Deploying Functions && npm run lint && npm run build && firebase deploy --only functions"
Please share your knowledge over the issue.
Thanks.
I have resolved this issue. On building, I found that the node modules and lib functions are not replacing correctly with the new build. I have done a name changing previously and that are not reflecting in the new build.
Steps followed:
Removed node modules and lib files
Npm install
Npm run serve
And a new build is worked fine as well. I got the same issue using Jenkins build also. I just manually removed the same in server also.
You can find the issue by examining the actual logs. view them using this command
firebase functions:log
The specific issue will be visible there. I sometimes had error as simple as a missing packages in package.json
I'm having a hard time with firebase CLI,when I install it with npm, either locally in a projet or globally, and I call the command firebase it gives Segmentation fault with no further details.
I firs thought that the problem was with my version of Node since I was using 9.x, I moved back to 8.x versions, and reinstalled firebase with no success, I upgraded to 12.x, with no success too always same error.
I'm using NVM to handle my node versions properly, but still I can't find a fix for this problem.
nvm list gives this :
-> v8.11.3
v8.13.0
v12.3.0
system
When I run npm list firebase-tools it gives firebase-tools#7.9.0, I also tried uninstalling and reinstalling with no success .
I have cordova-plugin-firebase(1.1.3) and cordova-plugin-firebase-analytics(1.0.0) installed in my ionic project. But when I build, I get duplicate symbols error in Xcode like below:
ld:110 duplicate symbols for archetecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I had both plugins installed before and they both worked well. I need to use the crashlytics feature so I updated cordova-plugin-firebase to the newest version(1.1.3), but then I get this message on firebase console:
To see this data, make sure your app is using the Firebase Analytics
SDK and the latest version of Crashlytics.
So I updated cordova-plugin-firebase-analytics too(before I was using 0.11.0) and then the message on firebase console disapeared(but build failed), and now I'm getting duplicate symbols error. But if I remove analytics plugin, I get library not found for -lFirebaseCore error.
How can I remove duplicate symbols error?
I found out both plugins added firebase.core framework to my project, and that's why I was getting duplicate symbols error.
I removed cordova-plugin-firebase-analytics from package.json and config.xml, and THEN ran npm install, it stopped giving me a library not found for -lFirebaseCore error.
But now the version 1.1.3 of cordova-plugin-firebase is now deprecated because it had some problems implementing firebase features. I'm currently using cordova-plugin-firebase V2.0.1 and analytics is working just as I expected.
Firebase Cloud functions giving an error called.
Error: Server Error
The server encountered an error and could not complete your request.
Please try again in 30 seconds.
When I try to re-deploy, it gives following error.
Error setting up the execution environment for your function. Please try again after a few minutes.
What could be the reason? Is it following issue?
Sates: https://status.firebase.google.com/incident/Functions/18018
Yes there is an issue with Cloud Functions, as you can see from the link above
Investigating an issue with Functions
Incident began at 2018-03-09 03:30 (all times are US/Pacific).
Last update is this:
Mar 09, 2018 04:45
We are still investigating the issue with Cloud Functions execution. We will provide another status update as soon as possible.
https://status.firebase.google.com/incident/Functions/18018
After the issue is done, you will be able to deploy your functions again using the below:
firebase deploy --only functions
Edit:
I just deployed some functions and it is working now, just takes a bit of time.
I had the same issue and it was fixed after updating firebase-tools. I saw following on my console
Update available 7.0.0 → 7.8.1
Run npm i -g firebase-tools to update
Then i just changed node version and updated firebase tools
nvm use 11
npm upgrade firebase-tools -g
Sometimes switching environment will also help
firebase use dev
Sometimes when some node modules are not installed , the error you get will be like below
Deployment error.
Error setting up the execution environment for your function. Please try deploying again after a few minutes.
Make sure that all node modules are installed prior to deployment, I wasted almost 2 days and realised one node module was not installed .
I tried several different steps, including updating tools from firebase, using different node versions or dependencies on package.json. In the end, at firebase functions console, I cleared the log stack and tried to reach every deployment notification after executing firebase deploy. I found out one of my dependencies were moved from dependencies to devDependencies, which was causing
ERROR: (gcloud.beta.functions.deploy) OperationError: code=13, message=Error setting up the execution environment for your function. Please try again after a few minutes.
Solution:
Place back dependency on its place, moving from devDependencies into dependencies itself.
Update project dependencies with npm install
Re-deploy with firebase deploy