Giter Site home page Giter Site logo

Comments (6)

Fmstrat avatar Fmstrat commented on June 9, 2024

Just throwing a +1 on this since it took me forever to debug an issue in my app due to this. Thanks.

from cordova-http.

marcsolanadal avatar marcsolanadal commented on June 9, 2024

+1 I found what was the error thanks to this post.

from cordova-http.

yyfearth avatar yyfearth commented on June 9, 2024

+1 it looks like any kind of error on Android, it will return "500 / There was an error with the request"

from cordova-http.

allie-wake-up avatar allie-wake-up commented on June 9, 2024

This seems to work for me on Android for get and post requests. Is this specific to 401 errors or a specific version of android? Info here suggests that it is a 401 issue if your server is not responding with the correct headers: http://stackoverflow.com/questions/11810447/httpurlconnection-worked-fine-in-android-2-x-but-not-in-4-1-no-authentication-c

iOS does not currently return the message body correctly in the event of an error however.

from cordova-http.

Remicek avatar Remicek commented on June 9, 2024

I have the same problem as described here and on stackOverflow:
http://stackoverflow.com/questions/33230531/cordova-ssl-pinning-error-500-there-was-an-error-with-the-request

i am executing simplest possible GET request and i also get:
Cordova SSL pinning error 500: “There was an error with the request”

When i accept all certs, it is working.

EDIT:
When i changed CordovaHttpGet.java and other files when the message 'There was an error with the request' is sent to
this.respondWithError("There was an error with the request:" + e.getCause());
I get better debug info:

Initialize SSL Connection response error:  There was an error with the request:javax.net.ssl.SSLPeerUnverifiedException: Hostname xxx.xxx.xxx.xxx not verified:
    certificate: certhashhere
    DN: CN=domainName
    subjectAltNames: []

from cordova-http.

recaisinekli avatar recaisinekli commented on June 9, 2024

The problem is related to the IP address. You need to create a certificate with SubjectAltName (SAN) as described here if you are not using host name to send a request. You have to write the IP address as an alt_name. Otherwise you get a "Hostname xxx.xxx.xxx.xxx not verified" error.

from cordova-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.