gree / gree/unity-webview

Can't load macOS plugin in Unity 2017.1 (libmono.0.dylib image not found)

Open
#219 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C++
Stars
2.7k
Forks
734
Avg merge
11h 39m
Merged PRs (30d)
1

Description

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:

Couldn't open /Users/adam/dev/game/Client/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView, error: dlopen(/Users/adam/dev/game/Client/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView, 2): Library not loaded: @executable_path/../Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib
  Referenced from: /Users/adam/dev/game/Client/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView
  Reason: image not found

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 in Unity.app/Contents/Frameworks/MonoEmbedRuntime/osx, it's now in Unity.app/Contents/Frameworks/Mono/MonoEmbedRuntime/osx, presumably to support the upgraded Mono engine work they're performing (there's also a MonoBleedingEdge directory as a sibling to the Mono 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the WebView.bundle loading path shown in the error and compare its referenced MonoEmbedRuntime location with the Unity 5.5 and 2017.1 framework paths described in the report. Reproduce the editor load on macOS with Unity 2017.1f03, then determine whether the plugin or Unity owns the path mismatch. Done means the WebView plugin loads without the libmono.0.dylib error, or the issue is confirmed as a Unity bug.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, objective-c, unity
Domain
desktop-dev, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.