client-sdk-unity icon indicating copy to clipboard operation
client-sdk-unity copied to clipboard

The Installation instructions appear to be broken for Mac.

Open farmerinatechstack opened this issue 3 months ago • 12 comments

Running the installation steps on the main repo and on the example both seem to be broken.

I'm on Unity 2022.3 and can't get a clean project going when attempting either of those. It's hard to report the exact issue because I'm getting 999+ errors in the console, but some are of the style:

  • The type or namespace name 'Google' could not be found (are you missing a using directive or an assembly reference?)
  • 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

farmerinatechstack avatar Oct 30 '25 01:10 farmerinatechstack

I've tried variants of the instructions as well and nothing seems to work. I'm also stuck on debugging because I'm not sure what the "template" or overall project structure should be.

farmerinatechstack avatar Oct 30 '25 01:10 farmerinatechstack

Hi, which operating system are you using?

s-hamdananwar avatar Oct 30 '25 03:10 s-hamdananwar

Hi, which operating system are you using?

Thanks for checking in! I've been on a Mac, so I'm wondering if that was the issue somehow. Today, I'm planning to try out on my Windows machine and see if that's a fix. In either case, I'm building for Android.

@s-hamdananwar Do any of those sets of instructions "just work" for you. That's what has me a bit lost here. I'm really just trying those basic steps and it's immediately complaining about missing references.

farmerinatechstack avatar Oct 30 '25 18:10 farmerinatechstack

I also investigated in the Slack and asked the AI there. I got the following:

I understand how frustrating those errors with 'Google.Protobuf' can be when installing the LiveKit Unity SDK. Don’t worry, I’m here to help you through it! Here are some friendly steps that usually do the trick:

  • Ensure Correct Google.Protobuf Version: The LiveKit Unity SDK already includes a precompiled Google.Protobuf.dll in its Runtime/Plugins folder. It’s best to remove any manually added Google.Protobuf packages and just rely on the one that comes bundled with the SDK.
  • Avoid Duplicate or Conflicting DLLs: Sometimes having multiple versions of Google.Protobuf.dll in your project, especially in the Plugins folder, can cause conflicts. Take a moment to check and remove any duplicates that aren’t part of the LiveKit SDK.
  • Use the Correct SDK Installation Method: To make sure everything is set up perfectly, try installing the SDK using the official Git URL as mentioned in the Unity WebGL quickstart. This helps include all necessary dependencies smoothly.
  • Verify SDK Integrity: It’s also good to confirm that the Google.Protobuf.dll included in the SDK is complete and intact. Since this file is tracked via Git LFS, you can verify its integrity using the sha256 hash found in the repository.

Following these steps usually clears up those errors. If you run into any bumps or have more questions, please don’t hesitate to reach out—I’m here to help!

I haven't been able to get unblocked with those tips though.

  • Google.Protobuf: There is a dll in the SDK. However, I haven't done further investigation on if it's broken or if there are competing DLLs.
    • That seems irrelevant since even the basic example won't work for me (not just my bigger project).
  • SDK Installation: I've also gotten stuck there. For example:
    • Cloning and opening the basic repos gets me these issues.
    • Using the package manager to import a local "client-sdk-unity" also leads to the issues.
    • I've tried various permutations of the instructions and all don't work, which makes me think there's something wrong in the packages or my system setup.

The last time I had this working was on 1.2.5, so I'll investigate that too. In the meantime, I'd love if anyone can confirm if the current installation "just works" for them and any additional details for that. Maybe I'm missing something.

farmerinatechstack avatar Oct 30 '25 18:10 farmerinatechstack

Tentative Update: It seems that there's a unique issue on Mac or my Mac setup.

Running the example project installation on my Windows machine did actually "just work" when I tried that right now.

I'm not sure why the same would have issues on my Mac, or even what to diagnose and share to help the repo related to that. If anyone has requests for information that I did not include above, let me know and I'll share.

farmerinatechstack avatar Oct 30 '25 22:10 farmerinatechstack

The following from the main Unity SDK instructions seems to "just work" on Windows as well:

Or you can import the git url https://github.com/livekit/client-sdk-unity.git from the package manager.

I didn't try the other methods, but that works. So now I have high confidence that the issue must be something about Mac or my Mac set up. I'm unblocked for now, but I'm keeping these here because I don't know how I or others would get the solution working on Mac.

farmerinatechstack avatar Oct 30 '25 23:10 farmerinatechstack

Thanks for reporting the issues. Let me follow the instructions and see what we can improve. Please stay tuned.

xianshijing-lk avatar Nov 03 '25 08:11 xianshijing-lk

I can confirm that this package doesn't seem to work on Mac. We have the same issue in our team: on Windows it works great, but on Mac we also get the 999+ errors.

tommy-vrelax avatar Nov 06 '25 11:11 tommy-vrelax

Yeah, it's odd. I don't know why one "just works" and the other "just doesn't work." Even more frustratingly, I'm not even sure where to look in order to try and diagnose that. I've just moved to using my Windows machine and that's fine, but I'm curious what's off here.

Do you have any ideas @xianshijing-lk or @tommy-vrelax ?

Thoughts that come to mind for me:

  • Is it something on the FFIs?
  • Is there something different about the Windows or Mac installations of Unity or the Android build process?

A final note is that I've certainly used my Windows machine more for Android development previously (particularly with VR headsets like Quest which are Android devices). As a result, it's possible that I have some system or Unity installation on my Windows machine that I do not have on my Mac.

farmerinatechstack avatar Nov 08 '25 00:11 farmerinatechstack

@farmerinatechstack that file is tracked by Git LFS. Are you sure you have LFS initialized on your Mac? If not, the DLL isn't actually being compiled by Unity, and the class references (e.g., Google.Protobuf) are missing. If you want to check if the DLL is actually recognized, you should read in the inspector under Type "managed" and not "native".

massimilianogaio avatar Nov 08 '25 13:11 massimilianogaio

@massimilianogaio That was it, thanks! I recently moved to a new machine and forgot to install LFS :)

tommy-vrelax avatar Nov 11 '25 13:11 tommy-vrelax

Sorry for replying late.

I encountered the same issue when using a local Git repo as a Unity package — the ./Runtime/Plugins/Google.Protobuf.dll file wasn’t downloaded. You can work around it by running: git lfs fetch --all git lfs pull or git lfs checkout -- Runtime/Plugins/Google.Protobuf.dll

We will update the README to make sure this problem will be covered.

xianshijing-lk avatar Nov 12 '25 05:11 xianshijing-lk