[solved] PUN+ Android builds crash on device with Unity 4.3

Dear PUN+ team members,

We tested PUN+ today with the latest unity with this scenario:
User wants to host a room enters room name -> createroom gets called and the app crashes.

Could you please check what could be happening?

With kind regards,



  • Hey,
    From the log, it looks like the import of PUN+ into your project is not complete:
    "Unable to find 'PhotonSocketPlugin'"

    Please try to re-import cleanly. Or in doubt, import to a new, empty project and try to export and run the demos. If you get that working, you could strip the demos from the project and copy it into yours.
  • Hi,

    i'm having the exact same error even after reimporting PUN+ (1.24) into a clean scene.
    Before updating to Unity4.3 everything worked.

    Would be great to get some help on this issue
  • I can reproduce the issue in Unity 4.3.
    I am sure this is a new issue, so I think we should both raise a bug report to Unity about this to raise awareness of this.
    I will also reach out to some developers and see if I can get the proper contact for this.

    Update: I reported this as bug Case 576484
  • Pachel, Belkar, Janla: Please let us know which devices you test on, the OS you build on and the Android SDK version, if you can.

    I can reproduce the issue but my counterpart at Unity Technologies can't, yet. So the question is why does this happens at all.
    Also in the news: Unity 4.2. builds run fine on my devices. If you are in a hurry to test or release for devices, 4.2 might be a workaround.
  • Hi again Tobias, I'm building on a Windows 7 computer, later I can try on MacOS (Mavericks), my Android SDK is apparently fully updated through the manager, but not sure where the actual version is, maybe 22.3?

    The phones I used are a Htc desire HD (Android 2.3.5), the second one is a strange one, Dapeng A9230+ (Android 4.0.3) and the third one it's a Htc Desire S (Android 2.3.5).

    If you need any other data, please, let me know, thanks!

    EDIT: Just tried building with my Mac and still doesn't work.

    11-19 21:05:03.492: E/Unity(29601): Unable to find 'PhotonSocketPlugin'
  • Hi,

    thanks for looking into this! I've already downgraded to Unity 4.2 and it works again.

    Concerning the infos you need:
    Built on Windows 7
    Phone: GT-I9100 (Galaxy 2) Android 4.1.2

    Also tried it on a Mac on the same Phone and a Nexus 10 with the same error, but i can't access the OS details now, sorry.

    Hope that helps!
    All the best,
  • Thanks for the replies and info. Janla, if you can check your Nexus' OS version anytime, let me know.
    I forwarded it and will keep you up to date.

    One idea I just had: What are the paths of the projects you export? Does it have a space in? Maybe it's related to path handling?
  • Could be, will test it as soon as I get home ^^
  • Just tried placing the project on c:\ but didn't work.
  • I tried something similar without effect.
    Now I sent my project to Unity and with that the error can be reproduced. That's good news as they can properly test it now and Unity is on it.
  • Then we can only wait for Unity3D to release an update, thanks for your efforts and informing us :)
  • A short follow up on the current state of this bug from Unity:
    "... the bug is still not fixed, but it was marked as necessary to fix. So if nothing will change, it will be fixed with the next minor update that we will release."
    Sounds good to me. I will get an update when the bug is fixed and will let you know, too.
  • At least seams they are fixing it soon ^^
  • Updated to 4.3.1, keeps crashing :(
  • They couldn't promise a fix for 4.3.1. I can try and bug some people about the state as I didn't get any news for a while now.
  • I got this info:
    It looks like we found the regression. I'm not sure this applies to your case but just in case.

    The problem is that arbitrary native and mono threads are using the wrong java class loader which makes the library lookup fail. Basically in 4.3.0 all plugin libraries have to be loaded by the main thread.

    I'm working on a fix for this but in the mean time if possible try loading your libraries using the unity main thread. You may still see warnings in the log but they should be harmless as long as the library is already loaded.

    What exactly triggers loading the library? When I do the DLLImport? When I use any of the functions in the native lib for the first time?
  • Maybe smth like
    Assembly assem = Assembly.LoadFrom("nameOfDLL.dll") ?
  • As far as I can see, Assembly.LoadFrom() only loads managed assemblies and not native libraries.
    I tried to call the native lib's methods from within Update() but that didn't change anything here. Mailed Unity again.
  • Ok, keep us updated :D
  • I just got mail that a fix was tested successfully.
    The next update of Unity 4.3 should include it!
  • Great news!
    Thanks for the info update :)
  • 4.3.2 , problem NOT fixed.
  • It seems Unity 4.3.2 was an unusually quick fix for something else.
    I asked Unity and got this info:
    Originally it [Fix for case 576484] was planned to be included in the 4.3.2, however a very serious issue popped out - people are not able to submit any application to the Mac App Store anymore. Therefore we had to address it as soon as possible and it was decided to dedicate the 4.3.2 to that.

    As it can be seen from the 4.3.2 release notes, there is only one fix and it is "Disable WebCam support in MacStandalone as it was using newly-deprecated APIs, which made publishing to the Mac App Store impossible. Web Cam support in mac standalone will come back in a future release.".

    So all bug fixes that were planned for 4.3.2 are now pushed to 4.3.3 minor update.

    I am sorry this got delayed but can't do much.
    I'll test 4.3.3 as soon as it's available.
  • I see. Thanks for the update, seems we have to keep waiting.
  • I'm glad I finally released my app using 4.2, could not wait that long.

    As always, thanks for the info Tobias :)
  • I can confirm PUN+ is working on Android in Unity 4.3.3 beta :D I thought I would have to wait weeks before they released 4.3.3, but apparently they have already fixed it in the beta.

    Thanks, Andreas.
  • Where can I find Unity 4.3.3 beta?
  • You can't access the Unity beta easily. It's a closed group, sorry.
    The release shouldn't take much longer.
  • nathan2819 wrote:
    Where can I find Unity 4.3.3 beta?

    If you contact Unity Support and ask for the beta - I'm sure they'll give you acces :)

  • Unity 4.3.3 is out, and the Android problem is fixed. I confirmed this myself.