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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Closed] Getting error at runtime

Discussion in 'Unity IAP' started by User340, Aug 30, 2016.

Thread Status:
Not open for further replies.
  1. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    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)
     
  2. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    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.
     
  3. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    128
    I have exactly the same error!
    If I found a solution I will let you know.
     
  4. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Thanks, much appreciated.
     
  5. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    413
    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
     
  6. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    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.
     
  7. wouter_vugt

    wouter_vugt

    Joined:
    Feb 25, 2015
    Posts:
    128
    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
     
    erika_d likes this.
  8. Cecilie

    Cecilie

    Unity Technologies

    Joined:
    Jul 6, 2012
    Posts:
    83
    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
     
    erika_d likes this.
  9. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    413
    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!
     
  10. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    I have been using Universal Architecture all along...

    @Cecilie Thanks for the clarification.
     
  11. tebandesade

    tebandesade

    Unity Technologies

    Joined:
    Oct 15, 2014
    Posts:
    3
  12. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Mine was set to Universal, should that work as well? Your issue tracker seems to only address 32 bit builds.
     
  13. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @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?
     
    Last edited: Oct 14, 2016
  14. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    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.
     
Thread Status:
Not open for further replies.