Prior a week from today, I had code that was working fine on Firebase Cloud Functions.
I've tried numerous solution to debug the problem but have run into this wall every time my code is activated:
{"errors":[{"code":20,"message":"Authentification key is not active"}
{"code":21,"message":"No permission for this authentication key"}]}
One solution had changed this error code into another:
{"error":{"code":403,"message":"Identity Toolkit API has not been used in project xxxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project=xxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.","errors":[{"message":"Identity Toolkit API has not been used in project 818729994826 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/identitytoolkit.googleapis.com/overview?project=xxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.","domain":"usageLimits","reason":"accessNotConfigured","extendedHelp":"https://console.developers.google.com"}],"status":"PERMISSION_DENIED"}}
Which leads me to believe that this is authenticated related even though the code is hosted in a Google domain which I assume should be automatically authenticated.
Okay. I found the source of my error and the log response is not from Google but from my own code.
I am working in a team and it is without my knowing that one of my member of my team made some changes (unfortunately this is the environment I am working on so no git or mention what changes is happening).
Procedures to come to this conclusion is akin to disabling one plug-in at a time in Wordpress.
I broke my code apart in pieces and ran them and they ran perfectly fine. Until I came across a code that was talking to api and therefore spitting out this error.
Hope that helps anyone going through some big unknown in error debugging. Also, probably a nice caveat to learn unit testing.
Related
No longer able to deploy cloud function via "firebase deploy" command - receiving error: "HTTP Error: 503, The service is currently unavailable"
I previously had a single function deployed and working until a slight modification was causing an authentication error, so I temporarily deleted it until I had time to fix the error.
So a couple days pass, I modify the original code (just added a bit of code relating to service account credentials, didn't even modify the actual function) and tried to re-deploy it (using 'firebase deploy') however it's throwing the following error: "HTTP Error: 503, The service is currently unavailable".
I thought maybe the service is currently down, but Firebase Status Dashboard shows all services are green and noone else seems to be complaining about this error at the moment. I've tried reinstalling/updating firebase-tools and even reverting the functions index.js code back to what it had been when I last successfully deployed, but same error every time. I don't think it has anything to do with the code on my end, but perhaps some weird bug relating to my account/api/authentication.
I've submitted a tech support question on firebase and am awaiting response, but thought I'd try my luck here as well.
Any suggestions?
After some back and forth with firebase technical support, turns out it is some strange bug on their server end (in relation to this particular project) as I'm able to deploy the same functions no problem to other projects. It may have been "triggered" initially by hitting a function invocation quota when I was having issues with one of the functions in the past (an issue which somehow caused the function to be repeatedly called until I realized and deleted it 2 days after). However the project should no longer be limited and I still am unable to deploy any functions on that particular project.
The issue has been handed onto their engineers and hopefully will have it resolved on their end soon.
We are setting up a new version of our app and we are switching from the legacy (v4) GTM SDKs to using the v5 mobile Google Tag Manager via Firebase.
On Thursday and Friday morning I ran some extensive tests on our tracking setup on Android and found a number of bugs in the GTM setup. I fixed them and then republished the app around mid-day on Friday.
On Monday morning (yesterday) I ran some additional tests and none of the fixes that I made worked, in the sense that the data that reached Google Analytics (the ultimate endpoint) showed the same errors from the previous round of testing.
My only conclusion is that the container didn't automatically update over the weekend (according to this, it should update every twelve hours).
I am pretty certain that this is the problem because some of the fixes included updating lookup table variables (we don't pass event category / event action as parameters from the app, these are mapped via two separate lookup tables), and the event category / action values were unchanged in GA in the second round of testing, even though they had been altered in GTM in between.
The documentation is a bit vague on exactly how the update process works - is there a way to debug exactly how to set up GTM in the app to ensure that it will automatically update when the container is republished in the GTM UI?
OK, the answer was pretty simple in the end, but as far as I can tell this is written nowhere in the documentation.
So, all you have to do is not rename the JSON file that you download from the GTM web interface - that's it! Our Android devs had renamed the different versions as gtm_dev.json, gtm_test.json, gtm_prod.json, etc, and this caused the automatic update to fail. That's it!
So if you are googling this error, double-check that your JSON file in the app has not been renamed.
Update: The problems passed for a while, but then returned with a vengeance since yesterday. Deploys now really take forever and always fail with Server Error. connect ETIMEDOUT or Upload Error: Cannot read property 'response' of undefined or something else.
After experimenting with connecting via a US location using HideMyAss I found that that completely resolved my issues though! Note that this issue not only occurs when deploying from our office in Amsterdam, but also from our office in Rotterdam. In the meanwhile I have also heard from more people experiencing issues with other Google services.
I have replied to the related Firebase Support email with this information and hope they will look into it. In the meanwhile I guess I'll have to keep on using HideMyAss..
--
Deploying Functions has been taking increasingly longer times after adding more of them. Occasionally at first, but recently for some periods every time I try to $ firebase deploy --only functions one of the functions being deployed at random fails with:
⚠ functions[foo]: Deploy Error: Failure in the
execution environment
When I try again an hour or so later it deploys without a problem (still takes 2 minutes to deploy which seems a little slow).
Perhaps the deploy process is timing out; it always fails after a long time, never quickly.
Perhaps my location outside of America is resulting in latency related issues in the deployment process? Doesn't seem very likely though..
I'm also looking into Firebase Functions logging "Function execution took 60002 ms, finished with status: 'timeout'" and other performance issues, so I wonder if these are all related.
PS: I also reported this to https://firebase.google.com/support/ but the last report I made there is still un-answered after 15 days, so I'm going to go ahead and post it here as well. I included a firebase-debug.log with that report, but rather not publicly sharing that here (not sure if there any tokens in there etc).
Also having issues
I have been having similar issues today and I am deploying from the United States.
For example a function will fail showing these two errors:
Deploy Error: Failure in the execution environment
Error: Functions did not deploy properly.
I found that once when this happened it was because my internet connection was dropping and then totally dropped during a firebase deploy.
Then again it happened because I was trying to deploy at the exact same time that at lot of my cloud functions happened to kick off doing stuff on their servers.
Once the cloud function had failed, then even when my internet resumed and my functions weren't busily running, it would not let me redeploy to get the jammed function running again. No matter what the broken copy of it was stuck in their servers with the tag:
Failure in execution environment
My Solution
I found that once you have a problem like that you can actually rename the function. On the next deploy it will effectively delete the old broken function and reload it as a working copy with the new name.
I would think if your project required it to have the same name you could do this process one more time, deleting the copy with the new name and restoring the copy with the name you needed. Or even block commenting out the function to delete it on the first deploy and then uncommenting it on another deploy to reinstall it.
How that helps you
I'm hoping that if you are still having issues from the Netherlands it is helpful to know that it may be a slow connection issue or a busy server issue. As I have found these two things to cause problems for me from within the States.
Also my solution of deleting and redeploying the function might help to speed up a deploy if the issue is with a copy that is on their servers. It would be interesting to know if that helps because even though the function looks ok on the server maybe it had issues during the previous deploy that are jamming up future deploys.
Sorry for the late response to this, hopefully you are no longer having these issues with firebase (I hate firebase btw, always issues like this).
I have created my first meteor app today and am kind of stuck. Everything works extremely well on localhost:3000, very responsive etc. It is a simple task app, where users can post tasks to a feed that displays all tasks an then claim those tasks, removing them from the general feed and putting them into their personal feed. But when I deploy it to a meteor.com server, everything breaks.
This is the js file
https://github.com/valentin-zambelli/brokenjs/blob/master/mvp.js
Accounts.ui.config({
passwordSignupFields: "USERNAME_ONLY"
});
gets ignored and whenever I try to post a new task the page reloads, getting stuck on app.meteor.com/?text=some+new+task and doesnt display the task in the general taskfeed.
I have removed the insecure and autopublish package. Is there anything I am missing here? It kind of seems as if it uses an older, broken build. I also get the ReferenceError: Can't find variable: require when deploying, but I can't really figure out where this is coming from.
I hope someone can help me.
Ok, it was an insanely stupid mistake on my part: The mongodb was still in an older state and caused a conflict. If you have problems deploying your meteor app try
meteor deploy myapp.meteor.com -- delete
This will delete all resources on the server, including the database. Then do a simple
meteor deploy myapp.meteor.com
I'm fairly new to web service development, and I am really confused about how ASP.Net Development Server synchronizes with code during debug mode. When I make changes to my service, I cannot figure out how to propigate those changes so that my client can "see" them (I've been able to synchronize through a stumbling series of publishing the service, viewing the service in browser, etc... but I have a feeling there's a more reliable system than my random ritual).
Here are the symptoms I'm seeing: After I've made a change to the code behind my service (Service1.svc.cs), started the application through the debugger and attached the debugger to the WebDev.WebServer.exe process as well, my latest changes are not executed, and my breakpoints are not hit (they have the message that
"The source code is different from the original version."
What really baffles me, though, is that when the ASP.Net Development Server notification pops up in my system tray, its physical path points to my project folder, so I don't understand how it could be looking at anything but my current code files.
I do not like to play with knives but the only thing that worked for me involves editing the .csproj file itself. So, unload the project file, edit it by cutting and pasting the three asp.net files so that they are together in the ItemGroup. However, sometimes it is necessary to go further as explained here: http://carnotaurus.tumblr.com/post/4130422114/visual-studio-debugging-issue-with-files-of-the-same - Also, I give a list of other proposed solutions that did not work for me. I hope it helps.