-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't load macOS plugin in Unity 2017.1 (libmono.0.dylib image not found) #219
Comments
At least their code works without any issue so it isn't a bug (perhaps, from their perspective). As you pointed out, however, libmono.0.dylib is placed differently, while it still contains an old linkage: $ otool -L /Applications/Unity/Unity.app/Contents/Frameworks/Mono/MonoEmbedRuntime/osx/libmono.0.dylib
/Applications/Unity/Unity.app/Contents/Frameworks/Mono/MonoEmbedRuntime/osx/libmono.0.dylib:
@executable_path/../Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) For now, the following whould be a simple coutermeasure: $ cd /Applications/Unity/Unity.app/Contents/Frameworks/
$ ln -s Mono/MonoEmbedRuntime . I'll add some note in README.md. |
Thanks. I also got a note from Unity QA that they've reproduced the bug locally and have sent it to their development team. |
Here's Unity's response:
Is there a way the webview plugin can be built without depending on the libmono lib? |
I've found the solution: #223. Could you please try the latest. |
Is there a way to create this symbolic link automatically during the import process (run the terminal code on pkg import)? I have a feeling I'm going to forget to run the bash commands every time I update Unity. It does work though. |
Have you tried the latest? With #223, you shouldn't need to make a symbolic link anymore. |
I just installed latest (by deleting old files, and reinstalling with the unity package). Now Unity hard crashes every time I load a scene with a webview. Note: I get the same behaviour also when I use the symbolic link strategy Unity Version: 2017.1.1f1 |
Are you creating the symbolic link via terminal? can you trace out the symlink to make sure it's going to the right location? I have the same version as you and OS X 10.12.6 and have had luck with the symlink fix |
Here are the last 20 or so lines of ~/Library/Logs/Unity/Editor.log Native extension for iOS target not found |
It would seem that the directory paths are still kind of broken?
Which isn't where the above library loads point to it would seem... Update: A reinstall of Unity makes the directory structure look a little more like the expected one in the logs, but it's still incorrect:
Here's the weird thing though right... Why should it be looking for WebView, WebView.dylib and other non-standard Unity files inside Unity.app? Do I perhaps have some project setting or something somewhere that is resolving the directories to the wrong place? Or is there a compile step somewhere that I am missing that generates out the files missing above and puts them inside Unity.app? |
More weirdness - when I build the project now, I get this:
So I don't know... I was using an old computer with an oooold version of Unity installed... And I updated it today to the newest version of Unity. But it feels like the installer isn't picking up on Mono pre-requisites or something? I'm not really sure, but now the whole project is unbuildable :/ |
It turns out if I go back to the editor and change the Player settings and turn Scripting Runtime Version to 3.5 from 4.6 this solves these problems. BUT it causes me problems in other ways (specifically with AesCryptoServiceProvider())... |
I've put an experimental support for 4.6: #248 . It cannot be merged to the master for now but enables to run with the 4.6 runtime. |
ありがとうございます! |
Ok I spent all day trying to get the 4.6 patch working with no success.. I have rolled back to master, and .NET 3.5 but the webview is still crashing... (The metal->OpenGL commit has been applied as have the symbolic link ones) I get no real clues in the log, just a hard OS crash every time it loads up. I've attached the OS generated crash report in case it gives any clues, but I'm really running out of leads to try with this... Here are the steps I am taking to get to this point:
Any help would be really appreciated, we've lost a couple of days with these issues... |
This part may delete unrelated files under Assets. As noted in #248 (comment), the following steps are better:
In your WebViewCrashReport.txt, the crash occurs when UnitySendCallMessage() is called:
in which any of arguments for UnitySendMessage() seems null. Was the game object with WebViewObject correctly initialized? As you might confirm, the sample app in the master branch works without any crash so there should be some differences causing the issue. If you can send me a minimum project that reproduces the issue, I'll investigate it. |
There's a few bits for me to chase up here, thanks for the help |
You were correct, there was a couple of application level bugs at this point that were causing this crash. Thanks so much for your support @KojiNakamaru |
That's good! |
I'm trying to upgrade from Unity 5.5.3p3 to 2017.1f03. The WebView plugin is not working in the Unity Editor when running on my macOS machine. I receive this error in the console:
One thing I've noticed is that Unity changed the location of the
libmono.0.dylib
file between 5.5 and 2017.1 (not sure about 5.6). Whereas before it was located inUnity.app/Contents/Frameworks/MonoEmbedRuntime/osx
, it's now inUnity.app/Contents/Frameworks/Mono/MonoEmbedRuntime/osx
, presumably to support the upgraded Mono engine work they're performing (there's also aMonoBleedingEdge
directory as a sibling to theMono
directory).I'm not sure if this is a Unity bug or something you can fix with your plugin but wanted to bring it up here. I'll also be filing a Unity bug just in case.
The text was updated successfully, but these errors were encountered: