[Closed] Getting error at runtime

I’m getting the following error after Initializing the Unity IAP system. What is the cause of this? Has anyone else run into this?

[Error] Couldn’t open /Applications/zzz.app/Contents/Plugins/unitypurchasing.bundle/Contents/MacOS/unitypurchasing, error: dlopen(/Applications/zzz.app/Contents/Plugins/unitypurchasing.bundle/Contents/MacOS/unitypurchasing, 2): no suitable image found. Did find:
/Applications/zzz.app/Contents/Plugins/unitypurchasing.bundle/Contents/MacOS/unitypurchasing: mach-o, but wrong architecture
(^ repeats 1 time)

[Exception] DllNotFoundException: /Applications/zzz.app/Contents/Plugins/unitypurchasing.bundle/Contents/MacOS/unitypurchasing
UnityEngine.Purchasing.OSXStoreBindings.SetUnityPurchasingCallback (UnityEngine.Purchasing.UnityPurchasingCallback AsyncCallback)
UnityEngine.Purchasing.AppleStoreImpl.SetNativeStore (INativeAppleStore apple)
UnityEngine.Purchasing.StandardPurchasingModule.InstantiateApple ()
UnityEngine.Purchasing.StandardPurchasingModule.InstantiateStore ()
UnityEngine.Purchasing.StandardPurchasingModule.Configure ()
UnityEngine.Purchasing.Extension.AbstractPurchasingModule.Configure (IPurchasingBinder binder)
UnityEngine.Purchasing.PurchasingFactory…ctor (IPurchasingModule first, UnityEngine.Purchasing.Extension.IPurchasingModule[ ] remainingModules)
UnityEngine.Purchasing.ConfigurationBuilder.Instance (IPurchasingModule first, UnityEngine.Purchasing.Extension.IPurchasingModule[ ] rest)

This line seems important:

Did find:
/Applications/zzz.app/Contents/Plugins/unitypurchasing.bundle/Contents/MacOS/unitypurchasing: mach-o, but wrong architecture

This bug is blocking the whole IAP system from working in our app. We are relying on Unity IAP heavily and need this resolved as soon as possible.

I have exactly the same error!
If I found a solution I will let you know.

Thanks, much appreciated.

Hi @_Daniel and @wouter_vugt ,

Sorry you both are experiencing this issue! This is one we haven’t heard of or seen ourselves before. Is this error happening in the editor? What editor and IAP builds are you using? Did you get the IAP package from the Services window in the Editor, or from the asset store? Can you please file a bug report with the issue and attach the project? This way we can try and reproduce it in our investigations. You can submit the bug report from the Unity Editor by going to Help → Report a Bug…

Once you’ve received the confirmation email for the bug report, post your bug ID so we can make sure to find it! Thanks

Hi Erika,

No, so far I’ve only noticed it at runtime on Mac OS X.

Unity 5.4.0p3
Unity Purchasing 1.8.1

Services window. Could that be the issue?

No, I keep my project locally, I never send it out anywhere. I believe this area should be cleared up some. If I send it to you, what are the implications? Who sees it, when do you delete it, do you distribute it, where is it going? All of these are unanswered questions.

Ive found out what the problem was for me.
When I switched to build for 64 and 32 bit it worked. When it was on default setting of x86 it didn’t.
So I made a succesfull build and publish of my app with IAP on macosx.

the error sais this
“unitypurchasing: mach-o, but wrong architecture”

change the architecture and it should work

1 Like

Hi there

If you submit a bug with your project it’s stored internally in QA bug database purely for reproduction’s sake. We do this with thousands of projects and we don’t use those projects for anything else but that purpose. When we’re unable to reproduce the bugs on our end this is a great help.Typically the tester (me), the support/developer (Erika) and the developer (the one who will eventually fix this) will see the bug and its content. Once the issue is resolved the bug is closed but all details are still there so nothing is deleted - simply archived.

If you’re not comfortable with this I recommend instead that you reproduce the failure in your project, select help>report a bug and in the reporting interface you can delete your project as an attachment and then submit. That way we get the logs, system type and can make use of our internal tools to attempt to find the root cause without your project.

Let me know if you have any other questions:)
Cecilie

1 Like

Hi @_Daniel

In addition to what Cecilie said above, to address your other questions:

Thank you for your information on when you’re experiencing the issue and editor/IAP versions and how you got the sdk. I believe most users are getting the sdk through the Services window, and we haven’t before gotten this issue reported, so I don’t think that’s necessarily the issue - those questions were really more to see if there were common threads between your and wouter_vugt’s set up that could hint at the issue, as well as to make sure our environment was set up correctly for trying to duplicate the issue.

Did wouter_vugt’s fix help with your issue as well?

On that note, Thanks @wouter_vugt for posting your solution, it is good to know that you were able to solve it, however we were still not able to duplicate the issue by trying different architecture builds. Could you give more information about where you made these changes? Perhaps some screenshots? Was this in the Editor’s build settings? Or somewhere in Xcode? Any additional information you could give so we could try and test/duplicate the issue and therefore fix if necessary would be very helpful!

I have been using Universal Architecture all along…

@Cecilie Thanks for the clarification.

Hi, currently we have reproduced the issue and have filled a report about it. You can see it through Issue Tracker:

Mine was set to Universal, should that work as well? Your issue tracker seems to only address 32 bit builds.

@tebandesade ,

Yes, it appears Unity IAP does not support 32 bit builds of Mac OS. We will update our docs to make a note of this.

@_Daniel ,

The issue looks to be related to 32 bit versions of Mac OS. When selecting Universal from the build settings, that creates a version of the app that supports 64bit and 32bit. So it will still be incompatible with Unity IAP, which only supports 64bit Mac OS.

If you change the Architecture setting, does this resolve your issue?

We have changed monetization strategies for our app and are no longer using In App Purchasing. Once I get back to a project that has IAP I will certainly let you know.