[Solved] Unity IAP - " Could not load type 'UnityEngine.VR.VRSettings' from assembly 'Stores'."

After update to UnityIAP 1.14.1, Error on my android device " Could not load type ‘UnityEngine.VR.VRSettings’ from assembly ‘Stores’."

I delete plugins/UnityChannel, UnityPurchasing folder and reimporting UnityIAP from service tab again and again, but i had got same error.

Should I check “Build Setting - XR Setting”??

  1. I did create new project and Import UnityIAP from service tab.
  2. Build “IAP Demo” scene only, Available items initialize succeed on android device.(from debug log).
  3. Select item → click buy button → I had got this error.

TypeLoadException: Could not load type ‘UnityEngine.VR.VRSettings’ from assembly ‘Stores’.

E/Unity (15780): at UnityEngine.Purchasing.JSONStore.Purchase (UnityEngine.Purchasing.ProductDefinition product, System.String developerPayload) [0x00000] in :0

E/Unity (15780): at UnityEngine.Purchasing.PurchasingManager.InitiatePurchase (UnityEngine.Purchasing.Product product, System.String developerPayload) [0x00048] in /Users/justing/development/unity1/Extensions/UnityPurchasing/Runtime/Purchasing/PurchasingManager.cs:60

E/Unity (15780): at IAPDemo.m__2 () [0x00067] in D:\work\Unity3d\Test03\Assets\Plugins\UnityPurchasing\script\IAPDemo.cs:602

E/Unity (15780): at UnityEngine.Events.InvokableCall.Invoke () [0x00017] in /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent.cs:165

E/Unity (15780): at UnityEngine.Events.UnityEvent.Invoke () [0x00024] in /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:58

E/Unity (15780): at UnityEngine.UI.Button.Press () [0x0002d] in C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\Button.

I’m using aws-sdk, facebook-sdk, JSONObject plugins.
Unity3d version is 2017.2.0f3.

How can i solve this error?
Or How can i got old versions of Unity IAP?
Thanks.

I’ve got the same problem. Deleted and reimported IAP several times, nothing helps.

1 Like

I will check with the IAP team here, and will reply when I have additional information later today.

Are you setting Virtual Reality Supported in Player Settings? If so, what SDK are you loading?

I did not setting any virtual reality support. My project is just casual mobile game.
Loading SDK is Facebook-SDK(Not audienceNetworkSDK), and
AWS-SDK.(CognitoIdentity, CognitoSync, DynamoDB, Lambda, MobileAnalytics, S3, SNS)

I did test full version of my project and
empty version. (Delete files/folder/plugins of my project and Build Only IAP Demo.unity Scene.)

And I always got console message “Project GPM data does not exist. Creating new object.”.

This is my plugins file list.

D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\filelist.txt
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\iOS
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\libsqlite3.so
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\x86_64
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\AndroidManifest.xml
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\animated-vector-drawable-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\appcompat-v7-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\aws-unity-sns-gcm-helper.jar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\cardview-v7-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\customtabs-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\libsqlite3.so
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\play-services-gcm-9.2.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\play-services-iid-9.2.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-annotations-25.3.1.jar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-compat-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-core-ui-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-core-utils-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-fragment-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-media-compat-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-v4-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\support-vector-drawable-25.3.1.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\unitynotification.jar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-hdpi
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-mdpi
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xhdpi
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xxhdpi
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xxxhdpi
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable\notify_icon_big.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable\notify_icon_small.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-hdpi\notify_icon_small.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-mdpi\notify_icon_small.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xhdpi\notify_icon_small.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xxhdpi\notify_icon_small.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\Android\res\drawable-xxxhdpi\notify_icon_small.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\iOS\Info.plist
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\iOS\IOSVersion.mm
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\iOS\ViewController.mm
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\Android
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\ChannelPurchase.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\UnityStore.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\Android\UnityChannel.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\AppStoreSettings.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor\AppStoreModel.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor\AppStoreOnboardApi.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor\AppStoreSettingsEditor.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityChannel\XiaomiSupport\Editor\XiaomiPackageNameExtension.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Changelog.md
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Editor
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Icons
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Resources
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\scenes
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\winrt
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Apple
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Editor.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Facebook
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Purchasing.Common.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Security
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Stores.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\AmazonAppStore.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\CloudMoolah.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\common.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\GoogleAIDL.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\GooglePlay.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Android\SamsungApps.aar
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Apple\Apple.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Apple\live
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Apple\live\Apple.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Facebook\FacebookStore.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Facebook\live
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Facebook\live\FacebookStore.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Security\live
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Security\Security.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Security\live\Security.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen\libTizenStore.so
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen\live
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen\Tizen.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\Tizen\live\Tizen.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\Info.plist
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\MacOS
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\Resources
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\MacOS\unitypurchasing
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\Resources\en.lproj
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Bin\unitypurchasing.bundle\Contents\Resources\en.lproj\InfoPlist.strings
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Editor\AppleIncRootCertificate.cer
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Editor\IAPButtonEditor.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Editor\IAPGeneratedCredentials.cs.template
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Icons\LinkBlack.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Icons\LinkWhite.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Icons\UnityEngine.Purchasing.IAPButtonIcon.png
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS\UnityEarlyTransactionObserver.h
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS\UnityEarlyTransactionObserver.mm
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS\UnityPurchasing.h
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\iOS\UnityPurchasing.m
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Resources\BillingMode.json
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\Resources\UIFakeStoreCanvas.prefab
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\scenes\IAP Demo.unity
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\ComboBox.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\Demo
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\IAPButton.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\IAPConfigurationHelper.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\IAPDemo.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\IAPListener.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\link.xml
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\PurchasingCheck.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\script\Demo\DemoInventory.cs
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\winrt\live
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\winrt\winrt.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\UnityPurchasing\winrt\live\winrt.dll
D:\work\Unity3d\Puzzle_Work\Assets\Plugins\x86_64\sqlite3.dll

I also have PlayServicesResolver folder.(Google.IOSResolver.dll…)
Thanks.

@tech_aqua Understood, we are continuing to investigate here.

I did test Unity IAP - Android - Target google play and Target Amazon.
Unity purchase succeeded at Target Amazon.
But same error at Target google play.

Do you get this error on a brand new/empty project, with only IAP enabled and not other assets/plugins? We believe it may be a conflict with another asset, and this information would be helpful for us to reproduce.

In my case this bug appears in empty project with iap only(on Unity 2017).
Right now i have rebuild my project on Unity 5.5.0.f3 and everything seems ok so far.

@NVSarge What version of 2017 and is this on Windows or Mac?

Windows 10, 2017.2

@NVSarge Yes, that is the configuration that I have here, and don’t see the issue. Any other configuration option that you might be aware of? Other software installed that might be relevant?

Don’t have any idea, configuration seems to be simple, and i don’t use any relevant thirdparty tools in this project.
I’ll try to make a clean reinstall of Unity and check.

Also, please list the options when you install Unity, and attempt to recreate with a new/empty project with IAP added only. Also, let us know if you’ve installed Android Studio and which Android version(s).

In my case empty project with iap only.
Windows 7, android_sdk, jdk 1.8.0_25(foldername), ndk-r10(foldername).
Not installed android studio.

I did completely uninstall Unity 2017.2.0f3, and reinstalled with Android Build Support, iOS Build Support.
Create new empty project and import IAP from service tab, Build IAP Demo.unity scene only without AndroidManifest.xml.
After i got same error, I tried Install UnitySetup-Vuforia-AR-Support-for-Editor-2017.2.0f3,
But I got same error.

I did install Unity 2017.1.2p2, all problem is solved.
IAP also working good.
I had mac build problem “Fatal error in Unity CIL Linker” on 2017.2.0f3,
Build succeeded on 2017.1.2p2.

All problem is solved and everything ok.

Reinstalled clean Unity 2017.2 with android support - same VR error.
Reinstalled 2017.1 with same configuration, even with IAP plugins from 2017.2 in project - iap works ok.

This issue is happening for me as well :confused: