Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Mediation Initialization Failed On Ios

Discussion in 'Unity Mediation' started by bariskaplan, Aug 29, 2022.

  1. bariskaplan

    bariskaplan

    Joined:
    Oct 15, 2013
    Posts:
    6
    Hello, I have some problems with mediation on ios. When running build on iphone, xcode output shows this "
    Initialization Failed: Unknown:Failed to sort tree! It is likely there is a missing required dependency:"

    How to handle this problem? There is no any info about this.

    Full log:
    Code (CSharp):
    1. Initializing...
    2. <Start>d__3:MoveNext()
    3. System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(TStateMachine&)
    4. M_Rewarded:Start()
    5.  
    6. Initialization Failed: Unknown:Failed to sort tree! It is likely there is a missing required dependency:
    7. {
    8.   "ordered": [
    9.     {
    10.       "packageHash": 265526080,
    11.       "packageProvider": "CorePackageInitializer",
    12.       "packageDependencies": []
    13.     },
    14.     {
    15.       "packageHash": 220961824,
    16.       "packageProvider": "MediationServiceInitializer",
    17.       "packageDependencies": [
    18.         {
    19.           "dependencyHash": 265726432,
    20.           "dependencyComponent": "IInstallationId",
    21.           "dependencyProvided": "true",
    22.           "dependencyOptional": "false"
    23.         },
    24.         {
    25.           "dependencyHash": 199317712,
    26.           "dependencyComponent": "IProjectConfiguration",
    27.           "dependencyProvided": "true",
    28.           "dependencyOptional": "false"
    29.         }
    30.       ]
    31.     }
    32.   ],
    33.   "packages": [
    34.     {
    35.       "packageHash": 220961824,
    36.       "packageProvider": "MediationServiceInitializer",
    37.       "packageDependencies": [
    38.         {
    39.           "dependencyHash": 265726432,
    40.           "dependencyComponent": "IInstallationId",
    41.           "dependencyProvided": "true",
    42.           "dependencyOptional": "false"
    43.         },
    44.         {
    45.           "dependencyHash": 199317712,
    46.           "dependencyComponent": "IProjectConfiguration",
    47.           "dependencyProvided": "true",
    48.           "dependencyOptional": "false"
    49.         }
    50.       ]
    51.     },
    52.     {
    53.       "packageHash": 220887792,
    54.       "packageProvider": "Ua2CoreInitializeCallback",
    55.       "packageDependencies": [
    56.         {
    57.           "dependencyHash": 265726432,
    58.           "dependencyComponent": "IInstallationId",
    59.           "dependencyProvided": "true",
    60.           "dependencyOptional": "false"
    61.         },
    62.         {
    63.           "dependencyHash": 221218192,
    64.           "dependencyComponent": "IEnvironments",
    65.           "dependencyProvided": "true",
    66.           "dependencyOptional": "false"
    67.         },
    68.         {
    69.           "dependencyHash": 199317712,
    70.           "dependencyComponent": "IProjectConfiguration",
    71.           "dependencyProvided": "true",
    72.           "dependencyOptional": "false"
    73.         },
    74.         {
    75.           "dependencyHash": 266190160,
    76.           "dependencyComponent": "IPlayerId",
    77.           "dependencyProvided": "false",
    78.           "dependencyOptional": "false"
    79.         }
    80.       ]
    81.     },
    82.     {
    83.       "packageHash": 265526080,
    84.       "packageProvider": "CorePackageInitializer",
    85.       "packageDependencies": []
    86.     },
    87.     {
    88.       "packageHash": 265320352,
    89.       "packageProvider": "CorePackageInitializer",
    90.       "packageDependencies": [
    91.         {
    92.           "dependencyHash": 199317712,
    93.           "dependencyComponent": "IProjectConfiguration",
    94.           "dependencyProvided": "true",
    95.           "dependencyOptional": "false"
    96.         },
    97.         {
    98.           "dependencyHash": 265726432,
    99.           "dependencyComponent": "IInstallationId",
    100.           "dependencyProvided": "true",
    101.           "dependencyOptional": "false"
    102.         },
    103.         {
    104.           "dependencyHash": 200053392,
    105.           "dependencyComponent": "IAccessToken",
    106.           "dependencyProvided": "false",
    107.           "dependencyOptional": "false"
    108.         },
    109.         {
    110.           "dependencyHash": 266190160,
    111.           "dependencyComponent": "IPlayerId",
    112.           "dependencyProvided": "false",
    113.           "dependencyOptional": "false"
    114.         }
    115.       ]
    116.     },
    117.     {
    118.       "packageHash": 265602176,
    119.       "packageProvider": "IapCoreInitializeCallback",
    120.       "packageDependencies": [
    121.         {
    122.           "dependencyHash": 220869920,
    123.           "dependencyComponent": "IMetricsFactory",
    124.           "dependencyProvided": "true",
    125.           "dependencyOptional": "false"
    126.         },
    127.         {
    128.           "dependencyHash": 220905056,
    129.           "dependencyComponent": "IDiagnosticsFactory",
    130.           "dependencyProvided": "true",
    131.           "dependencyOptional": "false"
    132.         }
    133.       ]
    134.     }
    135.   ],
    136.   "components": [
    137.     {
    138.       "componentHash": 265726432,
    139.       "component": "IInstallationId",
    140.       "componentPackageHash": 265526080,
    141.       "componentPackage": "CorePackageInitializer"
    142.     },
    143.     {
    144.       "componentHash": 199317712,
    145.       "component": "IProjectConfiguration",
    146.       "componentPackageHash": 265526080,
    147.       "componentPackage": "CorePackageInitializer"
    148.     },
    149.     {
    150.       "componentHash": 221218192,
    151.       "component": "IEnvironments",
    152.       "componentPackageHash": 265526080,
    153.       "componentPackage": "CorePackageInitializer"
    154.     },
    155.     {
    156.       "componentHash": 266190160,
    157.       "component": "IPlayerId",
    158.       "componentPackageHash": 0,
    159.       "componentPackage": "null"
    160.     },
    161.     {
    162.       "componentHash": 200053392,
    163.       "component": "IAccessToken",
    164.       "componentPackageHash": 0,
    165.       "componentPackage": "null"
    166.     },
    167.     {
    168.       "componentHash": 220869920,
    169.       "component": "IMetricsFactory",
    170.       "componentPackageHash": 265526080,
    171.       "componentPackage": "CorePackageInitializer"
    172.     },
    173.     {
    174.       "componentHash": 220905056,
    175.       "component": "IDiagnosticsFactory",
    176.       "componentPackageHash": 265526080,
    177.       "componentPackage": "CorePackageInitializer"
    178.     }
    179.   ]
    180. }
    181. Error: Component with hash[266190160] threw exception when sorting package[220887792][Ua2CoreInitializeCallback]
    182. M_Rewarded:InitializationFailed(Exception)
    183. <Start>d__3:MoveNext()
    184. System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(TStateMachine&)
    185. M_Rewarded:Start()
    186.  
    Here is my podfile:
    Code (CSharp):
    1. source 'https://cdn.cocoapods.org/'
    2. platform :ios, '12.0'
    3.  
    4. target 'UnityFramework' do
    5.   pod 'Protobuf'
    6.   pod 'UnityMediationAdmobAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    7.   pod 'UnityMediationAppLovinAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    8.   pod 'UnityMediationSdk', '~> 0.5.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    9.   pod 'UnityMediationUnityAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    10. end
    11. target 'Unity-iPhone' do
    12. end
    13.  
    14.  
    15.  
    16. use_frameworks!
    17.  
    18. post_install do |installer|
    19.   applicationTargets = [
    20.     'Pods-Unity-iPhone',
    21.   ]
    22.   libraryTargets = [
    23.     'Pods-UnityFramework',
    24.   ]
    25.  
    26.   embedded_targets = installer.aggregate_targets.select { |aggregate_target|
    27.     libraryTargets.include? aggregate_target.name
    28.   }
    29.   embedded_pod_targets = embedded_targets.flat_map { |embedded_target| embedded_target.pod_targets }
    30.   host_targets = installer.aggregate_targets.select { |aggregate_target|
    31.     applicationTargets.include? aggregate_target.name
    32.   }
    33.  
    34.   host_targets.each do |host_target|
    35.     host_target.xcconfigs.each do |config_name, config_file|
    36.       host_target.pod_targets.each do |pod_target|
    37.         if embedded_pod_targets.include? pod_target
    38.           pod_target.specs.each do |spec|
    39.             if spec.attributes_hash['ios'] != nil
    40.               frameworkPaths = spec.attributes_hash['ios']['vendored_frameworks']
    41.             else
    42.               frameworkPaths = spec.attributes_hash['vendored_frameworks']
    43.             end
    44.             if frameworkPaths != nil
    45.               frameworkNames = Array(frameworkPaths).map(&:to_s).map do |filename|
    46.                 extension = File.extname filename
    47.                 File.basename filename, extension
    48.               end
    49.               frameworkNames.each do |name|
    50.                 puts "Removing #{name} from OTHER_LDFLAGS of target #{host_target.name}"
    51.                 config_file.frameworks.delete(name)
    52.               end
    53.             end
    54.           end
    55.         end
    56.       end
    57.       xcconfig_path = host_target.xcconfig_path(config_name)
    58.       config_file.save_as(xcconfig_path)
    59.     end
    60.   end
    61. end
    62.  
    Code (CSharp):
    1. PODS:
    2.   - AppLovinSDK (11.4.3)
    3.   - Google-Mobile-Ads-SDK (9.9.0):
    4.     - GoogleAppMeasurement (< 10.0, >= 7.0)
    5.     - GoogleUserMessagingPlatform (>= 1.1)
    6.   - GoogleAppMeasurement (9.5.0):
    7.     - GoogleAppMeasurement/AdIdSupport (= 9.5.0)
    8.     - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    9.     - GoogleUtilities/MethodSwizzler (~> 7.7)
    10.     - GoogleUtilities/Network (~> 7.7)
    11.     - "GoogleUtilities/NSData+zlib (~> 7.7)"
    12.     - nanopb (< 2.30910.0, >= 2.30908.0)
    13.   - GoogleAppMeasurement/AdIdSupport (9.5.0):
    14.     - GoogleAppMeasurement/WithoutAdIdSupport (= 9.5.0)
    15.     - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    16.     - GoogleUtilities/MethodSwizzler (~> 7.7)
    17.     - GoogleUtilities/Network (~> 7.7)
    18.     - "GoogleUtilities/NSData+zlib (~> 7.7)"
    19.     - nanopb (< 2.30910.0, >= 2.30908.0)
    20.   - GoogleAppMeasurement/WithoutAdIdSupport (9.5.0):
    21.     - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    22.     - GoogleUtilities/MethodSwizzler (~> 7.7)
    23.     - GoogleUtilities/Network (~> 7.7)
    24.     - "GoogleUtilities/NSData+zlib (~> 7.7)"
    25.     - nanopb (< 2.30910.0, >= 2.30908.0)
    26.   - GoogleUserMessagingPlatform (2.0.0)
    27.   - GoogleUtilities/AppDelegateSwizzler (7.7.0):
    28.     - GoogleUtilities/Environment
    29.     - GoogleUtilities/Logger
    30.     - GoogleUtilities/Network
    31.   - GoogleUtilities/Environment (7.7.0):
    32.     - PromisesObjC (< 3.0, >= 1.2)
    33.   - GoogleUtilities/Logger (7.7.0):
    34.     - GoogleUtilities/Environment
    35.   - GoogleUtilities/MethodSwizzler (7.7.0):
    36.     - GoogleUtilities/Logger
    37.   - GoogleUtilities/Network (7.7.0):
    38.     - GoogleUtilities/Logger
    39.     - "GoogleUtilities/NSData+zlib"
    40.     - GoogleUtilities/Reachability
    41.   - "GoogleUtilities/NSData+zlib (7.7.0)"
    42.   - GoogleUtilities/Reachability (7.7.0):
    43.     - GoogleUtilities/Logger
    44.   - nanopb (2.30909.0):
    45.     - nanopb/decode (= 2.30909.0)
    46.     - nanopb/encode (= 2.30909.0)
    47.   - nanopb/decode (2.30909.0)
    48.   - nanopb/encode (2.30909.0)
    49.   - PromisesObjC (2.1.1)
    50.   - Protobuf (3.12.0)
    51.   - UnityAds (4.3.0)
    52.   - UnityMediationAdapter (3.0.1):
    53.     - UnityMediationLogging (~> 1.0)
    54.   - UnityMediationAdmobAdapter (1.0.0):
    55.     - Google-Mobile-Ads-SDK (~> 9.0)
    56.     - UnityMediationAdapter (~> 3.0)
    57.     - UnityMediationSdk (>= 0.5)
    58.   - UnityMediationAppLovinAdapter (1.0.0):
    59.     - AppLovinSDK (~> 11.0)
    60.     - UnityMediationAdapter (~> 3.0)
    61.     - UnityMediationSdk (>= 0.5)
    62.   - UnityMediationLogging (1.0.0)
    63.   - UnityMediationSdk (0.5.1):
    64.     - Protobuf (~> 3.12.0)
    65.     - UnityMediationAdapter (~> 3.0)
    66.     - UnityMediationLogging (~> 1.0)
    67.   - UnityMediationUnityAdapter (1.0.0):
    68.     - UnityAds (~> 4.1)
    69.     - UnityMediationAdapter (~> 3.0)
    70.     - UnityMediationSdk (>= 0.5)
    71.  
    72. DEPENDENCIES:
    73.   - Protobuf
    74.   - UnityMediationAdmobAdapter
    75.   - UnityMediationAppLovinAdapter
    76.   - UnityMediationSdk (~> 0.5.0)
    77.   - UnityMediationUnityAdapter
    78.  
    79. SPEC REPOS:
    80.   https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git:
    81.     - UnityMediationAdapter
    82.     - UnityMediationAdmobAdapter
    83.     - UnityMediationAppLovinAdapter
    84.     - UnityMediationLogging
    85.     - UnityMediationSdk
    86.     - UnityMediationUnityAdapter
    87.   trunk:
    88.     - AppLovinSDK
    89.     - Google-Mobile-Ads-SDK
    90.     - GoogleAppMeasurement
    91.     - GoogleUserMessagingPlatform
    92.     - GoogleUtilities
    93.     - nanopb
    94.     - PromisesObjC
    95.     - Protobuf
    96.     - UnityAds
    97.  
    98. SPEC CHECKSUMS:
    99.   AppLovinSDK: 221dfbdff620be0ff227ed5b018b97b1f3d15713
    100.   Google-Mobile-Ads-SDK: 8822993da940ab920bad131b5bffce7eb3f62c6a
    101.   GoogleAppMeasurement: 6ee231473fbd75c11221dfce489894334024eead
    102.   GoogleUserMessagingPlatform: ab890ce5f6620f293a21b6bdd82e416a2c73aeca
    103.   GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
    104.   nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
    105.   PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
    106.   Protobuf: 2793fcd0622a00b546c60e7cbbcc493e043e9bb9
    107.   UnityAds: 53f7a71da8a16b3eedb57d3930e672687939f643
    108.   UnityMediationAdapter: ea2a9f5510b4991ef981ea53469d32eeccd400a2
    109.   UnityMediationAdmobAdapter: 28db62b82f399a63acae77c3ab8e969c0561b433
    110.   UnityMediationAppLovinAdapter: a75f8426d06c71ded269e26ae31a8ca966d2df73
    111.   UnityMediationLogging: af0274f8b544950228abd302e793d5f43404b770
    112.   UnityMediationSdk: 44880c02548f05b0026a502440049c71159ce802
    113.   UnityMediationUnityAdapter: 4b0c00cc3d630507d86b8dd2d33517504ecc5f43
    114.  
    115. PODFILE CHECKSUM: 60aa919e392ce2d837afa41147a1dfb0780624b9
    116.  
    117. COCOAPODS: 1.11.3
    118.  

    Thanks in advance
     
unityunity