Unity Ads SDK 4.4.1 not working on Android

4.4.0 works perfect, but 4.4.1 always failed to on initialize!

10-14 19:13:03.444 24522 24522 D UnityAds: com.unity3d.services.ads.UnityAdsImplementation.initialize() (line:63) :: ENTERED METHOD
10-14 19:13:03.445 24522 24522 D UnityAds: com.unity3d.services.UnityServices.initialize() (line:35) :: ENTERED METHOD
10-14 19:13:03.455 24522 24522 I UnityAds: com.unity3d.services.UnityServices.initialize() (line:117) :: Initializing Unity Services 4.4.1 (4410) with game id 4958355 in test mode
10-14 19:13:03.461 24522 24522 D UnityAds: com.unity3d.services.core.configuration.EnvironmentCheck.testProGuard() (line:24) :: Unity Ads ProGuard check OK
10-14 19:13:03.505 24522 24522 D UnityAds: com.unity3d.services.core.cache.CacheDirectory.createNoMediaFile() (line:139) :: Using existing .nomedia file
10-14 19:13:03.506 24522 24522 D UnityAds: com.unity3d.services.core.cache.CacheDirectory.getCacheDirectory() (line:46) :: Unity Ads is using external cache directory: /storage/emulated/0/Android/data/org.godotengine.ads/cache/UnityAdsCache
10-14 19:13:03.506 24522 24522 D UnityAds: com.unity3d.services.core.configuration.EnvironmentCheck.testCacheDirectory() (line:46) :: Unity Ads cache directory check OK
10-14 19:13:03.506 24522 24522 I UnityAds: com.unity3d.services.UnityServices.initialize() (line:137) :: Unity Services environment check OK
10-14 19:13:03.522 24522 24583 D UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateLoadConfigFile.execute() (line:178) :: Unity Ads init: Loading Config File Parameters
10-14 19:13:03.529 24522 24583 D UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateReset.execute() (line:215) :: Unity Ads init: starting init
10-14 19:13:03.534 24522 24583 D UnityAds: com.unity3d.services.core.cache.CacheDirectory.createNoMediaFile() (line:139) :: Using existing .nomedia file
10-14 19:13:03.534 24522 24583 D UnityAds: com.unity3d.services.core.cache.CacheDirectory.getCacheDirectory() (line:46) :: Unity Ads is using external cache directory: /storage/emulated/0/Android/data/org.godotengine.ads/cache/UnityAdsCache
10-14 19:13:03.535 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics.setConfiguration() (line:40) :: Metrics will not be sent from the device for this session
10-14 19:13:03.535 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_initialization_started’, value=‘null’, tags=null}, Metric{name=‘native_loadconfigfile_state’, value=‘10’, tags={wv_retry=0, c_retry=0}}] was skipped from being sent
10-14 19:13:03.564 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_reset_state’, value=‘34’, tags={wv_retry=0, c_retry=0}}] was skipped from being sent
10-14 19:13:03.564 24522 24583 D UnityAds: com.unity3d.services.ads.configuration.AdsModuleConfiguration.initModuleState() (line:45) :: Unity Ads init: checking for ad blockers
10-14 19:13:03.573 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_initmodules_state’, value=‘9’, tags={wv_retry=0, c_retry=0}}] was skipped from being sent
10-14 19:13:03.574 24522 24583 I UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateConfig.execute() (line:341) :: Unity Ads init: load configuration from https://configv2.unityads.unitychina.cn/webview/4.4.1/release/config.json
10-14 19:13:03.583 24522 24583 D UnityAds: com.unity3d.services.core.misc.Utilities.writeFile() (line:129) :: Wrote file: /data/user/0/org.godotengine.ads/files/UnityAdsStorage-private-data.json
10-14 19:13:03.589 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_device_info_collection_latency’, value=‘9’, tags=null}] was skipped from being sent
10-14 19:13:03.589 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_device_info_compression_latency’, value=‘1’, tags=null}] was skipped from being sent
10-14 19:13:03.589 24522 24583 D UnityAds: com.unity3d.services.core.configuration.ConfigurationRequestFactory.getWebRequest() (line:50) :: Requesting configuration with: https://configv2.unityads.unitychina.cn/webview/4.4.1/release/config.json
10-14 19:13:03.593 24522 24583 D UnityAds: com.unity3d.services.core.request.WebRequest.getHttpUrlConnectionWithHeaders() (line:283) :: Setting header: Content-Encoding=gzip
10-14 19:13:04.809 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_privacy_resolution_request_latency_failure’, value=‘1219’, tags=null}] was skipped from being sent
10-14 19:13:04.810 24522 24583 W UnityAds: com.unity3d.services.core.configuration.PrivacyConfigurationLoader$1.onError() (line:32) :: Couldn’t fetch privacy configuration: Privacy request failed with code: 405
10-14 19:13:05.261 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_device_info_collection_latency’, value=‘440’, tags=null}] was skipped from being sent
10-14 19:13:05.262 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_device_info_compression_latency’, value=‘2’, tags=null}] was skipped from being sent
10-14 19:13:05.262 24522 24583 D UnityAds: com.unity3d.services.core.configuration.ConfigurationRequestFactory.getWebRequest() (line:50) :: Requesting configuration with: https://configv2.unityads.unitychina.cn/webview/4.4.1/release/config.json
10-14 19:13:05.263 24522 24583 D UnityAds: com.unity3d.services.core.request.WebRequest.getHttpUrlConnectionWithHeaders() (line:283) :: Setting header: Content-Encoding=gzip
10-14 19:13:06.241 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_emergency_switch_off’, value=‘null’, tags=null}] was skipped from being sent
10-14 19:13:06.455 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_device_info_collection_latency’, value=‘205’, tags=null}] was skipped from being sent
10-14 19:13:06.455 24522 24583 D UnityAds: com.unity3d.services.core.request.metrics.SDKMetrics$NullInstance.sendMetrics() (line:101) :: Metrics: [Metric{name=‘native_device_info_compression_latency’, value=‘2’, tags=null}] was skipped from being sent
10-14 19:13:06.455 24522 24583 D UnityAds: com.unity3d.services.core.configuration.ConfigurationRequestFactory.getWebRequest() (line:50) :: Requesting configuration with: https://configv2.unityads.unitychina.cn/webview/4.4.1/release/config.json
10-14 19:13:06.456 24522 24583 D UnityAds: com.unity3d.services.core.request.WebRequest.getHttpUrlConnectionWithHeaders() (line:283) :: Setting header: Content-Encoding=gzip
10-14 19:13:07.470 24522 24583 D UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateRetry.execute() (line:733) :: Unity Ads init: retrying in 10000 milliseconds

1 Like

yes SDK is not installed. should look into this matter urgently. I’m using 2020.3.34f1 and I have a similar problem.

After some debugging, I tracing to a narrow clue, if UnityAdsWebViewConfiguration.json is exists(downloaded by 4.4.0 or manually copy the file to cache folder), 4.4.1 works fine.

it must be something wrong with the file download or related backend services bug for downloading the file

I added it at the end of my project and it stopped working. I had to transfer my project to a new project.

please write the path you copied UnityAdsWebViewConfiguration.json on it. thank you for helping

Just re-tested on this issue, everything works fine for now, the issue is gone!