net::ERR_CONNECTION_RESET on ipfs.add

POST net::ERR_CONNECTION_RESET on ipfa.add()
Sample snippet:
Using CDN
App.ipfs = window.IpfsHttpClient.create({ host: “”, port: “5001”})
const reader = new FileReader();
reader.onloadend = function() {
var buffer = require(‘buffer’);
const buf = buffer.Buffer.from(reader.result) // Convert data into buffer
App.ipfs.add(buf, (err, result) => { // Upload buffer to IPFS
if(err) {
console.log(typeof result[0].hash)
console.log("Hash: " + result[0].hash)
let url =${result[0].hash}
console.log(Url --> ${url})

hi @shriram_ravi, are you consistently getting this error ?

It’s almost consistent on every restart of my client app. 3 out of 4 times. I would like to know what this error “net::ERR_CONNECTION_RESET” suggests.

I’m assuming you get this in the browser console ? net::ERR_CONNECTION_RESET is a generic error that indicates a network issue due to various reasons, caching, proxy, some dependent services not available yet, etc.
Try to add some extra loggers and pinpoint the exact code lines that throw the error.