XMLHttpRequest Error means only 2 things:--
1) You might not be sending the request to the proper API
2) You might be sending proper data to testing server from production product.
Fix CORS to resolve XMLHttpRequest Error
- https://firebase.google.com/docs/storage/web/download-files?authuser=0#cors_configuration