1

After changes in Ionic App and Local Spring Boot Server, I see this error when switching to HTTPS instead of HTTP, when user tries to login:

[ERROR:ssl_client_socket_impl.cc(878)] handshake failed; returned -1, SSL error code 1, net_error -200

This is what I have tried so far:

  • Generated a Self-Signed Certificate, placed in Spring Boot Server and made changes in application.properties

  • Used the same certificate and placed in ionic android app.

  • Handled CORS in Spring Boot Server

  • Updated the network_security_config.xml to allow HTTPS requests.

  • Created a res/xml/network_security_config.xml file:

    <?xml version="1.0" encoding="utf-8"?>
    <network-security-config>
    <domain-config cleartextTrafficPermitted="false">
        <domain includeSubdomains="true">localhost</domain>
    </domain-config>
    </network-security-config>

In AndroidManifest.xml, reference this file:

    <application
    android:networkSecurityConfig="@xml/network_security_config"
    ... >
    </application>
  • updated the server url in Ionic App - using 10.0.2.2 as server address
  • Rebuild app in Android Studio and launched in emulator,

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.