Hi,
I am currently developing a connector using AWS MediaPackage V2 across two different DMAs. After uploading a new version in one of the DMAs, I started getting the following error:
System.MissingMethodException: Method not found: 'Void Amazon.Runtime.ClientConfig.set_ServiceId(System.String)'.
at Amazon.MediaPackageV2.AmazonMediaPackageV2Config..ctor()
at Amazon.MediaPackageV2.AmazonMediaPackageV2Client..ctor(RegionEndpoint region)
at QAction.ChannelList.ReadData(Int32 assumeRole)
The Amazon.MediaPackageV2 NuGet package is installed in the DLL file on the server. Despite uploading the latest version as a .dmprotocol, the issue persists, and it is only happening in one DMA while the other works correctly. Do you have any recommendations on how I can approach this issue?
Hi,
I see that different versions of this NuGet package (AWSSDK.MediaPackageV2) use the same assembly version for the AWSSDK.MediaPackageV2.dll assembly: v 3.3.0.0.
I suspect that on the Agent where you experience the issue, the assembly of an older version of this NuGet package was loaded into the app domain of the SLScripting process.
The runtime of the .NET Framework will load assemblies on a on-needed basis.
In this case, at some point in time the AWSSDK.MediaPackageV2.dll assembly of a specific NuGet version would have been loaded into the app domain.
If you would later update the connector to use a newer version of that NuGet, the old assembly of the older NuGet version would still be used because they have the same assembly version (the runtime would see that it had already loaded version 3.3.0.0 into the app domain and use that older one).
Another reason could be that the Agent where you experience the issue is running another connector that also makes use of this NuGet package but a different version of that package.
You could verify whether the C:\Skyline DataMiner\ProtocolScripts\DllImport\awssdk.mediapackagev2 contains multiple subfolders for different versions.
To avoid the issue you experience, in this case only a single version of this package should used in your connectors (because they seem to have the same assembly version).
Note also that once an assembly is loaded in the app domain it cannot be unloaded. Only a restart of the process/DataMiner Agent would result in the older version to no longer be present in the app domain. (So when doing changes, you'll need to restart the process/Agent to make sure the old version of the assembly is no longer loaded in the app domain of SLScripting.)
Run-time assembly binding provides more background info on how assemblies are loaded.
Hi Blake,
What version of the package is present? Can you check the content of that assembly (using e.g. dotpeek) to verify whether that assembly indeed does not have that property defined?
Can you also verify whether the protocolScripts or files folder contains that assembly (as these are also used as hint paths during assembly resolving)? To see where the assembly is actually loaded from, you could use the Fusion log viewer tool (FUSLOGVW.exe).
Update: Gina and I synced our nuget versions, performed another DMA restart, and now the issue is gone. Thank you Pedro!
Hey Pedro, when looking at the folders, there is only one folder for that mediapackage nuget. However, there are other protocols using the same nuget, and those also broke (either because of that nuget, or another). When restarting the DMA or reuploading the protocol package, we didn’t see any improvements.