POST to IPFS "add" returning HTTP 502 today (and 500 via curl)

I’ve been using uport-connect for about 6 months, and it calls https://ipfs.infura.io:5001/api/v0/add when doing a login. I used this tool just yesterday successfully. However, now in my browser it’s hanging for 10 minutes before I finally get an HTTP 502 with a response body of:

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>

Here’s a curl command for it, which gives me an HTTP 500:

curl -v 'https://ipfs.infura.io:5001/api/v0/add' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0' -H 'Accept: application/json' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: http://localhost:3001/' -H 'Content-Type: multipart/form-data; boundary=---------------------------742589033813838141826559250' -H 'Origin: http://localhost:3001' -H 'Connection: keep-alive' --data '-----------------------------742589033813838141826559250\
Content-Disposition: form-data; name="file"; filename="blob"\
Content-Type: application/octet-stream\
\
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NkstUiJ9.eyJpYXQiOjE1NjE5MDM2NDUsInN1YiI6ImRpZDpldGhyOjB4NjFlN2JhZTczOTQ2Y2RmOGVlMmVhN2VhOGZkM2FmY2RlZTk3MTIwYSIsImNsYWltIjp7Im5hbWUiOiJEZW1vQXBwIiwidXJsIjoiaHR0cDovL2xvY2FsaG9zdDozMDAxIn0sImlzcyI6ImRpZDpldGhyOjB4NjFlN2JhZTczOTQ2Y2RmOGVlMmVhN2VhOGZkM2FmY2RlZTk3MTIwYSJ9.qOS1Rx422FdGgfOY-3l3kHScr_SN9eglpFCTDl0-7WObj2x1Qk8-FYVHAcbgnnZkJ95enteEltUBNEOvJkT5TQA\
-----------------------------742589033813838141826559250--\
'

It’s now working for me.

Thanks for the update @trentlarson. Let us know if you encounter any issues again.

Hi,

I have the same problem, with ipfs-mini using addJSON(). Weird thing is that it seems to work for certain JSON data and not for others. Any clue?

Seems to be working consistently fine again.