Maybe someone can help me , I am not very good in analyzing JS and XHR in the browser.
In Firefox The presign request
mywebsite/mycontroller/presign/s3/params?filename=splash.jpg&type=image%2Fjpeg returns a Json nearly instantly but in Chrome it takes invariably 20 seconds. Under Chrome Network/Timing of XHR request i see “stalled 20secs” but I still get the proper JSON in the end.
I have just noticed this behavior today ( because of Uppy taking ages to upload the original file to S3 ) and thought it was my mistake because I have asynced a lot of things and returns the Attachment and versions data through Actioncable.
But the problem actually looks to happen before asyncing promotion and versionning, and additional websockets is probably not the reason …
Here is my presign code:
set_rack_response PhotoUploader.presign_response(:cache, request.env)
def set_rack_response((status, headers, body))
self.status = status
self.response_body = body
(this happens in development, will investigate further if reproductible in production tomorrow)