datatheorem / TrustKit-Android

Easy SSL pinning validation and reporting for Android.
MIT License
585 stars 87 forks source link

Caused by: com.datatheorem.android.trustkit.config.ConfigurationException: Tried to pin an invalid domain: <mydomain.com> #90

Open mallikarjunch09 opened 3 years ago

mallikarjunch09 commented 3 years ago

Hi I'm getting below error while running my application.

2021-06-09 16:46:02.179 13796-13796/packagename E/AndroidRuntime: FATAL EXCEPTION: main Process: packagename, PID: 13796 java.lang.RuntimeException: Unable to create application packagename.Application: com.datatheorem.android.trustkit.config.ConfigurationException: Tried to pin an invalid domain: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6465) at android.app.ActivityThread.access$1300(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: com.datatheorem.android.trustkit.config.ConfigurationException: Tried to pin an invalid domain:

Android studio - 4.2.1 Android Gradle plugin verions - 4.2.1 Gradle version - 6.7.1 trustkit version - com.datatheorem.android.trustkit:trustkit:1.1.2

Could you please help me anybody ?

ben-j69 commented 3 years ago

Hello @mallikarjunch09 you should show your network_security_config.xml to have help.

mallikarjunch09 commented 3 years ago

Hi @ben-j69 please check network_security_config.xml file Please help me i'm struck with this since many days

<?xml version="1.0" encoding="utf-8"?>

domain name goes here KEY goes here KEY goes here https://overmind.datatheorem.com/trustkit/report domain name goes here KEY goes here KEY goes here KEY goes here KEY goes here https://overmind.datatheorem.com/trustkit/report
ben-j69 commented 3 years ago

@mallikarjunch09 if you read your error and your file this si crystal clear, you have invalid domain names like "domain name goes here". Just fix your config file.