-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Exception: Error: The 'responseText' property is only available if 'responseType' is set to '' or 'text', but it is 'blob'. at XMLHttpRequest.get ... at XMLHttpRequest.remoteFunction] #20145
Comments
I forgot to tel that accessing my web app using Safari is working fine, the error is only with react native. |
I just tried also with the iOS and Android simulators (which shouldn't have so much problems to reach the app as the real device) but exactly the same error. |
I tried to remove the SSL mode of my backend app, and allow insecure connection, in the info.plist file of my app from Xcode, and I was able to reach the server. So it looks like there is an issue with the SSL/TLS certificate. Anyways the error I reported isn't correct and shouldn't be. |
Okay so I think I figured out what is this error So there is a real Network issue, which I don't know the real message. 😞 |
So updating the Before : var support = {
searchParams: 'URLSearchParams' in self,
iterable: 'Symbol' in self && 'iterator' in Symbol,
blob: 'FileReader' in self && 'Blob' in self && (function() {
try {
new Blob()
return true
} catch(e) {
return false
}
})(),
formData: 'FormData' in self,
arrayBuffer: 'ArrayBuffer' in self
} After : var support = {
searchParams: 'URLSearchParams' in self,
iterable: 'Symbol' in self && 'iterator' in Symbol,
blob: 'FileReader' in self && 'Blob' in self && false,
formData: 'FormData' in self,
arrayBuffer: 'ArrayBuffer' in self
} Now I need to figure out why do I have this error as I'm using a Let's Encrypt SSL certificate, working well in Safari on the iPhone, without installation it before. |
In this end, I made it so that my backend app acceptes non-HTTPS requests, and the mobile app to allow sending non-HTTPS request 🤦♂️ 😢. |
Environment
Description
I'm using
fetch
in order to call my local Rails app backend from my iPhone as the following :but it is always failing with the following :
I have added a
console.log
of thexhr
object from thewhatwg-fetch
package, fromfetch.js:442
, and it shows the followingresponseText
:I tried exactly the same but with
https://www.google.com
and no error, expected 200 response received.In order to avoid name resolution issues (I have a Dnsmasq instance on my Mac, and my iPhone is using my Mac as a DNS resolver), I tried with my IP address but same result.
Also in order to avoid SSL certificate issues (I have a self-sign for the development environment), I'm running an Nginx instance, accepting HTTP requests, redirecting to HTTPS, but still same error.
The text was updated successfully, but these errors were encountered: