Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Error writing POST params

Discussion in 'Unity Ads & User Acquisition' started by Mr-Zhou, Jun 9, 2022.

  1. Mr-Zhou

    Mr-Zhou

    Joined:
    May 4, 2016
    Posts:
    26
    Ads request failed in mobile with below info:

    06-09 18:49:17.366: E/UnityAds(28274): com.unity3d.services.core.request.WebRequest.makeStreamRequest() (line:141) :: Error while writing POST params: Hostname publisher-config.unityads.unitychina.cn not verified:
    06-09 18:49:17.366: E/UnityAds(28274): certificate: sha1/vPIRNUn92BU3+F/nGpudbXmkRHE=
    06-09 18:49:17.366: E/UnityAds(28274): DN: CN=*.qcloudwzgj.com
    06-09 18:49:17.366: E/UnityAds(28274): subjectAltNames: [*.qcloudwzgj.com, qcloudwzgj.com]
    06-09 18:49:17.366: E/UnityAds(28274): com.unity3d.services.core.request.WebRequestRunnable.makeRequest() (line:70) :: Error completing request: Error writing POST params: Hostname publisher-config.unityads.unitychina.cn not verified:
    06-09 18:49:17.366: E/UnityAds(28274): certificate: sha1/vPIRNUn92BU3+F/nGpudbXmkRHE=
    06-09 18:49:17.366: E/UnityAds(28274): DN: CN=*.qcloudwzgj.com
    06-09 18:49:17.366: E/UnityAds(28274): subjectAltNames: [*.qcloudwzgj.com, qcloudwzgj.com]
     
  2. TengUnity3D

    TengUnity3D

    Unity Technologies

    Joined:
    Jun 10, 2022
    Posts:
    9
    Hello,
    It seems like your app has a configuration problem. We suggest you check the settings of your app and perhaps try this solution(https://stackoverflow.com/questions/41542435/android-retrofit-hostname-not-verified):

    1. Adding the URL to the network_security_config.xml file and placing it in the res/xml/ directory
    2. In the manifest file add the following attribute to the application tag
    <application ... android:networkSecurityConfig=“@xml/network_security_config” ..>
     
  3. Mr-Zhou

    Mr-Zhou

    Joined:
    May 4, 2016
    Posts:
    26
    Thanks for your reply, but I'm using Unity for development, not Android Studio, so my project doesn't have the file path which you said. it's not just my project, I downloaded other games from the Google Play Store , as long as it has Unity ads, will report this error. I'm in China, is the region causing the problem? Are Unity ads not showing in China?
     
  4. TengUnity3D

    TengUnity3D

    Unity Technologies

    Joined:
    Jun 10, 2022
    Posts:
    9
    Sorry for the delayed response. Firstly, Unity ads can be shown in China.
    Please check if you are in test mode. If you still have the same error in logcat, please provide more logs of the SDKs initialization and ads requests.

    If you have any more questions, feel free to ask.