I just added Cloud Functions to an older project that I have had for a a couple of yrs now. I get a Deployment complete! message and I get the responsea inside the Log console but the Hello World console.log statements do not appear. In the same file I added my own functions which successfully work but console.log statements are printed there. The odd thing is inside one of my newer projects the console.log statements from the same code below successfully prints.
I checked the google upkeep and everything is working fine on their end.
const functions = require('firebase-functions');
exports.helloWorld = functions.https.onRequest((request, response) => {
functions.logger.info("Hello logs!", {structuredData: true});
console.log("Hello Again!!!");
response.send("Hello from Firebase!");
});
To update to the latest version in terminal run: $ sudo npm install -g firebase-tools
I reached out to the Firebase team and this was their response:
I've read your description in detail and it seems like the issue is
caused by some ingestion delay for some regions in Cloud Logging which
is handled by GCP (for more details please check the GCP
Dashboard).
However, a similar problem was previously reported in a Github
issue, and apparently it was only happening with old versions of
the Firebase CLI tools, so my recommendation is to update this command
line interface to the latest version (v9.6.1) and redeploy the
functions once again , this will allow to validate if the function is
storing the logs correctly. Also you can try to update the npm
libraries used in order to keep everything in the latest versions.
You can check your version of firebase in terminal: $ firebase --version
Cloud Functions interface has changed the past years.
Not sure that has impacted the logs aggregation, but it's possible.
Redeploy your function, without code update to update it
Related
I am trying to display docs stored in repository created by backstage io component on backstage-io /docs page UI, but when I am trying to access the docs I am getting the following error
Building a newer version of this documentation failed. Error: "Failed to generate docs from C:\\Users\\Admin\\AppData\\Local\\Temp\\backstage-enprxk into C:\\Users\\Admin\\AppData\\Local\\Temp\\techdocs-tmp-W6iVab; caused by Error: Docker container returned a non-zero exit code (1)"
Files in my repository
docs folder only having index.md
and mkdocs.yml have
nav:
Home: index.md
I was getting similar issues working on a local POC of Backstage. The biggest problem was that I needed to install pip, python, mkdocs, and mkdocs-techdocs-core (i.e. pip3 install mkdocs-techdocs-core). If you have done that and then followed everything in this documentation, then it should start working. Hope that helps. I spent a couple of days trying to get past these types of errors.
For me the above issue is fixed by using below as it was not working inside my container in kubernetes.
I changed app-config.yaml -
techdocs:
builder: 'local' # Alternatives - 'external'
generator:
runIn: 'local' // changed from docker to local here
I got an error when I built a typewritten code with an error. I have developed a Twilio plugin. After resaving, nothing changed, the error was also in the console and it was necessary to restart the run command
Want to share here to save someone time
.twilio-cli/node_modules/#k88/typescript-compile-error-formatter/dist/
I updated twilio-cli (#twilio-labs/plugin-flex) from 4.3.0 -> 4.3.4 and everything started working
Instructions for updating
I was trying to follow this tutorial:
https://docs.opensea.io/docs/1-structuring-your-smart-contract
And even found this extremely helpful YouTube video to guide me:
https://www.youtube.com/watch?v=lbXcvRx0o3Y&ab_channel=DanViau
But I've encountered a problem after installing and setting up everything I needed. The problem occured when I tried to deploy the contracts using this bash command:
truffle deploy --network rinkeby
The error message I got is:
Error: There was a timeout while attempting to connect to the network.
Check to see that your provider is valid.
If you have a slow internet connection, try configuring a longer timeout in your Truffle config. Use the networks[networkName].networkCheckTimeout property to do this.
at Timeout._onTimeout (C:\Users\alonb\.nvm\versions\node\v12.22.5\bin\node_modules\truffle\build\webpack:\packages\provider\index.js:56:1)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
It's not caused by slow internet connection - I know that because I have tried executing this command on 3 different WiFi connections, one at 200 Mb/s rate.
I have tried to change the truffle-config.js file and add a longer timeout threshold (like suggested here), but the only thing that changed was that the error message took much longer to appear.
Technical info - I'm using Git Bash, npm version 6.14.14, nvm version 0.38.0, node version 12.22.5.
Any suggestions? I'm lost.
Alon
I also ran into this error when following the same tutorial.
I use Alchemy (not Infura), and the issue was my API_KEY.
In other tutorials I've followed, the scripts require the full alchemy API Key (ex. "https://eth-rinkeby.alchemyapi.io/v2/<random-key>").
So, when I was following this tutorial, that is what I supplied. And, I ran into the error you reported.
But when I reviewed the truffle.js script provided by the tutorial authors, I found this:
const rinkebyNodeUrl = isInfura
? "https://rinkeby.infura.io/v3/" + NODE_API_KEY
: "https://eth-rinkeby.alchemyapi.io/v2/" + NODE_API_KEY;
Thus, the script was producing:
rinkebyNodeUrl = https://eth-rinkeby.alchemyapi.io/v2/https://eth-rinkeby.alchemyapi.io/v2/<**random-key**>
...which is clearly wrong.
Thus, ensuring I set my API_KEY environment variable only to random-key and not https://eth-rinkeby.alchemyapi.io/v2/https://eth-rinkeby.alchemyapi.io/v2/<random-key>, my contract deployed successfully.
Also, make sure you have enough ETH in your wallet on the Rinkeby network. Faucets always seem to work for a little while then stop working, so do some Google searches to find one that is currently functional.
The solution is incredibly easy -
Instead of using just the relevant part of the Alchemy key:
40Oo3XScVabXXXX8sePUEp9tb90gXXXX
I used the whole URL:
https://eth-rinkeby.alchemyapi.io/v2/40Oo3XScVabXXXX8sePUEp9tb90gXXXX
I had the same experience but when using hardhat not truffle.My internet connection was ok,try switching from Git bash to terminal(CMD).Use a completely new terminal avoid Gitbash and powershell.
Remove the function wrapper from provider inside the network configuration.
ropsten_infura: {
provider: new HDWalletProvider({
mnemonic: {
phrase: mnemonic
},
providerOrUrl: `https://ropsten.infura.io/v3/${project_id}`,
addressIndex
}),
network_id: 3
}
The rinkbery network has been decommissioned. Use Goerli or Sepolia network. Update your truffle config add a section for goerli in networks. E.g
goerli: {
provider: () =>
new HDWalletProvider(
mnemonic,
`https://goerli.infura.io/v3/${INFURAKEY}`
),
network_id: 5, // goerli's id
gas: 4500000, //
gasPrice: 10000000000,
}
The run the command
truffle deploy --network goerli
I was trying to configure the hybridauth library so that I can use the the google + and the facebook sign in. But it keeps me giving a fatal error:
Fatal error: require(): Failed opening required 'Facebook\Facebook.php' (include_path='.:/var/www/magilla/lib:/var/www/magilla/models') in /var/www/magilla/lib/RPC/Util.php on line 168
I followed each and every step of their documentation. I have used the
composer to install the library. The library version is 2.9 and the
facebook graph sdk, the most recent version of github
READ EDIT*2 for a proper solution instead
I am encountering the same issue and I suppose you install hybridauth the same way as I did, which is running composer require hybridauth/hybridauth on your project root folder.
I solved this by running composer install within the hybridauth
directory where its composer.json exist, that will install facebook
sdk within the hybridauth directory where the autoload.php is being
load by the script (I personally feel like it is more like a hack than
a proper solution... but I have a feeling that the hybridauth
developer expect you to clone then run the composer install instead of
composer requiring it...I maybe wrong as I just start using composer
as well)
*EDIT check out the issue on their github, there is a bug where the vendor path is being replaced by one in their code, it also mention it is being fixed in later commit. I am new to composer as well so I don't know how to specific the commit for it to update to... if you know how to do it let me know as well
*EDIT*2 alright, I updated to 2.9.3-dev and it seems to solve the issue without generating any new one, I also use that for google and twitter and those are fine too. To update, edit your composer.json to this
"require": {
"hybridauth/hybridauth": "^2.9-dev"
}
then run composer update on your command prompt, things should work as long as you require the composer autoload.php for your script
I used the build instructions from this link
centos install docs
It seemed to install fine. I ran hhvm --version
HipHop VM 3.5.0-dev+2014.12.11 (rel)
Compiler: heads/master-0-g546087bf1b0560c4a9e254fcad46a9212e42ccc2
Repo schema: cf1780b3cc3857e091e924935ae6267e9794de9c
Extension API: 20140829
So following the bootstrapping docs I create a directory with 2 files (test.php and .hhconfig)
I added the following code to test.php
<?hh
function f(): int {
return 'not an int';
}
f();
In this directory i run hh_client and the following message appears for a long time 20-30mins+. Is this normal? I tried using a docker container with hhvm already and installed and got the same behavior.
This might be a known problem: can you do killall -9 hh_server; export USER=$(logname) before trying again? If that fixes it, you've hit an issue I just fixed this week in https://github.com/facebook/hhvm/commit/53b4d9b1ad7ccf99ef7b80d5d673f1578c9791c8. That fix should be in the latest nightly build, so if you update your build, that might fix it too.
If not, it sounds like you've set it up correctly. Please file a bug at https://github.com/facebook/hhvm/issues and I'll work with you on looking into it. StackOverflow isn't really the right forum for debugging like this.