Unity-Technologies/Addressables-Sample

Error when using Addressables and AWS Mobile SDK for Unity

isfarca opened this issue · 3 comments

Forum entry: https://forum.unity.com/threads/error-when-using-addressables-and-aws-mobile-sdk-for-unity.697352/

Reproduce:

  1. Get AWS Mobile SDK from https://docs.aws.amazon.com/de_de/mobile/sdkforunity/developerguide/what-is-unity-plugin.html (Download ZIP file and Unzip this).
  2. Load any unity package from the unzipped ZIP file into Unity 2018.4 or higher, importing everything.
  3. Then install "Addressables" from the Package Manager. This results in an error, see screenshot (Error.jpg).

Info:
I "fixed" it by commenting out line 464 from the "Client.cs" script from the "Scriptable Build Pipeline" package (see Fix.jpg). The "Scriptable Build Pipeline" package is installed automatically when you install the "Addressables" package from the Package Manager.

Could you replace "InvalidDataException()" with something else? :)
Error
Fix

Hi @isfarca thanks for reporting this issue! Based on the forum thread, it seems like solution is to update the AWS SDK .NET Standard version to 2.0. I'll ask the ScriptableBuildPipeline team to see if they can give a more descriptive exception message.

Also for future bugs, I would recommend submitting a bug through the regular submission process https://unity3d.com/unity/qa/bug-reporting. This way issues like these can be more easily flagged in our system.

Spoke with the ScriptableBuildPipeline team. Seems like the issue is caused by the AWS SDK rather than the ScriptableBuildPipeline package itself, so it wouldn't make sense to modify the package.

Actually, I think this issue is due to a conflict of symbol between the AWS SDK and System.IO.InvalidDataException. AWS probably fixed it on their end as they were including the symbol that is now defined in system. I do not think there is anything for us to do. The message does not make sense as it is not the only error leading to this code path and it seems more like a compile error than execution error at package import rather than at package usage.

Okay thanks.