Heroku + golang + mobiles => H13 errors? - heroku

On a golang service, I get some H13 (Heroku13 ?) errors these days ( max ~1% of requests ), but 100% of users calling the service are mobile apps.
Is it possible that if they lose connection it triggers an H13 error ?
Or is it only due to some of my code ?
Thx !

H13 means the APP code is having a problem.
Taking too long or bloating up memory.
( asked a Heroku guy :) )

Related

azure stageBlock onProgress event

I'm using the stageBlock method and the onProgress callback. I thought I had this working when I wrote this 9 months ago but I'm doubting myself now. The progress update is showing "loadedBytes" and it does not resemble what is actually going over the network. onProgress reports as all bytes "loaded" while the browser is still uploading the file via a network request. How do you monitor the network bytes while using this azure method?
await blockBlobClient.stageBlock(blockId, chunk, chunk.size, {
onProgress: e => {
console.log('onProgress loadedBytes: ' + e.loadedBytes);
},
abortSignal: abortControllerRef.current.signal,
});
I'm using version 12.1.1 of azure nodejs package...
I have just upgraded to version 12.3.0 and still have the same problem.
Edit
I have created a small repro here: https://github.com/philwindsor/az-progress-bug
Its a react app, clone it and run yarn install then yarn run.
Gif of problem:
I ended up raising an issue on github: https://github.com/Azure/azure-sdk-for-js/issues/13161 which I have now closed.
Turns out our company virus scanner (sohpos) is the cause of the problem. Once disabled the problem goes away!

I am getting the following error: [GraphQL error]: Message: Task

I am getting this error (using prisma and graphql), still after looking it up I have no clue what's going on.
Would anyone please help? Thank you!
[Network error]: Error: Task
slick.basic.BasicBackend$DatabaseDef$$anon$2#3a22bdca rejected from
slick.util.AsyncExecutor$$anon$2$$anon$1#cfc0ea7[Running, pool size =
1, active threads = 0, queued tasks = 1000, completed tasks = 497]
Error: Task slick.basic.BasicBackend$DatabaseDef$$anon$2#3a22bdca
rejected from
slick.util.AsyncExecutor$$anon$2$$anon$1#cfc0ea7[Running, pool size =
1, active threads = 0, queued tasks = 1000, completed tasks = 497]
Any other information I can provide to help debugging?
Are you using Prisma's demo servers, and is it working correctly now?
I experienced the exact same error yesterday, even the same completed tasks = 497. In my troubleshooting, the same error happened when 1) I tried to view the Prisma admin console, and 2) when I tried to pull down the schema from Prisma, so I figured the error was coming from something on Prisma's end and it was out of my control.
Today I tried the same things again and they're working correctly! Hopefully they are for you too.

Uncaught Error: Returned values aren't valid, did it run Out of Gas?

I'm listening to events of my deployed contract. Whenever a transaction gets completed and event is fired receiving the response causes following error:
Uncaught Error: Returned values aren't valid, did it run Out of Gas?
at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeParameters
(index.js:227)
at ABICoder.push../node_modules/web3-eth-abi/src/index.js.ABICoder.decodeLog
(index.js:277)
Web3 version: 1.0.0-beta36
Metamask version: 4.16.0
How to fix it?
Try the command truffle migrate --reset so that all the previous values are reset to their original value
Throws the same error when inside a transaction it generates different events with the same name and the same arguments. In my case, this was the Transfer event from ERC721 and ERC20. Renaming one of them solves this problem, but of course this isn't the right way.
This is a bug in web3js, discussed here.
And the following change fixes it (source):
patch-package
--- a/node_modules/web3-eth-abi/src/index.js
+++ b/node_modules/web3-eth-abi/src/index.js
## -280,7 +280,7 ## ABICoder.prototype.decodeLog = function (inputs, data, topics) {
var nonIndexedData = data;
- var notIndexedParams = (nonIndexedData) ? this.decodeParameters(notIndexedInputs, nonIndexedData) : [];
+ var notIndexedParams = (nonIndexedData && nonIndexedData !== '0x') ? this.decodeParameters(notIndexedInputs, nonIndexedData) : [];
var returnValue = new Result();
returnValue.__length__ = 0;
Edit: Also downgrading to web3-1.0.0.beta33 also fixes this issue too.
Before even checking your ABI or redeploying, check to make sure Metamask is connected to whichever network your contract is actually deployed too. I stepped away and while i was afk Metamask logged out, I guess I wasn't watching closely and I was connected to Ropsten when I working on localhost. Simple mistake, wasted an hour or so trying to figure it out. Hope this helps someone else out!
This happened to me on my react app.
I deployed to contract to Ropsten network, but metamask was using the Rinkeby aaccount. So make sure whichever network you deployed, metamask should be using account from that network.
The solution for me was changing of provider. With Infura the error is gone, but with Alchemy is still happening.
Please check your Metamask Login, This issue is generally populated when you are either log out of the Metamask or worse case you have 0 ether left at your account.
This can also happen when the MNEMONIC value from Ganache is different from the one you have in your truffle.js or truffle-config.js file.

Fix error "at=error code=H10 desc "app crashed" method = GET

I am getting an error in my heroku logs that I cannot figure out how to fix.
I read through a thread on stack overflow Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch). This seemed very similar to my problem.
I have developing my app with the express generator. So my bin folder holds the port information
var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
I know the process.env.PORT is necessary to open my heroku site. I initially assumed this would work well enough as my app.js only had a reference to express.
I could not get the page to open so I added the port information to my app.js file in addition to the bin folder.
app.set('port', (process.env.PORT || 3000));
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
I got this github page https://github.com/heroku/node-js-getting-started/blob/master/index.js#L16.
However, I am still getting the same error. I do not know where else to look. The only additional note I see with an error is
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch.
These seem to be targeting the same problem.
What else is your app doing?
Note that the error indicates you didn't bind to the socket within 60 seconds. I agree that your app.set('port', (process.env.PORT || 3000)); looks just fine.
Maybe it's something else - maybe you're making a web callout or something before it even gets to that point, and that's what's consuming the time?

How to refresh my HttpWebRequest

I'm creating a Windows Phone 7 app which allow to listen a web radio. But I also want to get the cover of the song and I want it to be refreshed every 3 minutes for example.
When I start debugging my app, I've no problem but I've no idea how to call back my code to refresh the cover.
Thanks a lot.
Aymeric.
I found a solution not really the one I looked for but my mates used a timer to refresh the same application for Android and iOS since there is no push notification from the server.
So I used this code
DispatcherTimer refreshTimer = new DispatcherTimer();
refreshTimer.Interval = TimeSpan.FromSeconds(30);
refreshTimer.Tick += new EventHandler(refreshTimer_Tick);
refreshTimer.Start();
Thank you all for the time you spent on this question.
Aymeric.

Resources