I fixed CORS issue in Firefox by running ajax requests through background page (as proposed by Roman).
But fixing upload progress is more complicated, as current implementation won't work in Firefox because it doesn't support upload progress streaming (https://bugzilla.mozilla.org/show_bug.cgi?id=1387483, https://stackoverflow.com/a/69400632/3091318) and doesn't have plans for implementing. Also to make it work in Chrome we should support HTTP/2 on backend, and customers backends will need to support it too for showing progress.
Possible solution for now will be to use XMLHTTPRequest for requests which need upload progress, and fetch for other requests. And when there will be some solution which will work for both Chrome and Firefox - migrate to using fetch everywhere.
Mandatory migration to Manifest V3 in Chrome Web Store isn't planned yet (https://groups.google.com/a/chromium.org/g/chromium-extensions/c/zQ77HkGmK9E/m/HjaaCIG-BQAJ), probably next year, but can be postponed. So mentioned XMLHTTPRequest solution should work well for us for some time.
Originally posted by @sosnovsky in #5372 (comment)
But fixing upload progress is more complicated, as current implementation won't work in Firefox because it doesn't support upload progress streaming (https://bugzilla.mozilla.org/show_bug.cgi?id=1387483, https://stackoverflow.com/a/69400632/3091318) and doesn't have plans for implementing. Also to make it work in Chrome we should support HTTP/2 on backend, and customers backends will need to support it too for showing progress.
Possible solution for now will be to use
XMLHTTPRequestfor requests which need upload progress, andfetchfor other requests. And when there will be some solution which will work for both Chrome and Firefox - migrate to usingfetcheverywhere.Mandatory migration to Manifest V3 in Chrome Web Store isn't planned yet (https://groups.google.com/a/chromium.org/g/chromium-extensions/c/zQ77HkGmK9E/m/HjaaCIG-BQAJ), probably next year, but can be postponed. So mentioned
XMLHTTPRequestsolution should work well for us for some time.Originally posted by @sosnovsky in #5372 (comment)