The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

On M1 mac, Fusion always fails with: DllNotFoundException: nanosockets assembly:<unknown

Bersaelor
2022-02-19 18:47:40

I tried following the Fusion 100 tutorial as well as download and run the Tanknarog sample.

Unfortunately for both Fusion fails when trying to start it directly in the Unity Editor [ 2021.2.11f1 M1 Silicon].

For the sample scene it only fails after I tap Host or Join i.e. when Fusion starts with

Comments

krim
2022-02-21 07:56:53

Fusion is not yet compatible with M1, I've been told on the fusion discord.

Bersaelor
2022-02-21 21:00:11

Yeah @JohnTube already answered in https://forum.photonengine.com/discussion/comment/59248#Comment_59248 too.

It does wotk with Intel-Unity and Rosetta, but Intel Unity is really slow at compiling scripts ...

ramonmelo
2022-03-31 06:15:55

Hi @Bersaelor ,

Fusion now supports Apple M1 Processors, please, download the latest SDK.

--

Ramon Melo

Photon Fusion Team

Bersaelor
2022-04-08 16:44:26

@ramonmelo thank you for the update!

So when using the Fusion 100 sample project as a basis, I removed the P``hoton folder and imported the latest nightly build from the SDK&Releases section (Photon-Fusion-1.1.0-RC-Nightly-449).

When I run the app and click the scene I get the following error:

On Unity 2021.2.19f1-apple-silicon.

Maybe the next error message is more helpful:

ramonmelo
2022-04-11 08:09:53

Hi @Bersaelor ,

Please check if the right DLL is included in the build. You will find two versions of the NanoSockets lib included in the SDK here Assets\Photon\Fusion\Plugins\NanoSockets\macOS , one for the Apple M1 and one for the Intel MacBooks, make sure the right one is included on your build using the Import Settings panel.

--

Ramon Melo

Photon Fusion Team

Bersaelor
2022-04-11 08:11:43

Thank you @ramonmelo , I actually found out last night from https://forum.photonengine.com/discussion/comment/59909#Comment_59909 .

Didn't know about that import-platform-setting !

herra_lehtiniemi
2022-05-16 10:06:00

@ramonmelo I'm having this issue as well, but it now only occurs in build. I was able to fix it for the Editor with these settings:

But when I build, I get the same error again:

Like shown in the first screencap, I have checked the "Standalone". I'm running an M1 and I have disabled Intel nanosockets. I double checked that the build runs as type "Apple" (it's Universal so it shouldn't try to access Intel nanosockets).

Any ideas on why this occurs on build-only are welcomed!

Running Unity 2022.2.0a13 with

ramonmelo
2022-05-17 17:51:05

Hi @herra_lehtiniemi ,

  • If you set it to build for both (Intel 64 + Apple), how does that goes? Same result?

  • Which Unity version are you using?

--

Ramon Melo

Photon Fusion Team

yufu
2022-05-25 01:57:59

Same errors:

DoubleHitGames
2022-05-29 15:48:40

MAC BUILD : NANOSOCKETS DLL NOT FOUND

Unity Verstion: 2021.3.1f1

-

Fusion SDK 1.1.0 RC Nightly Build 491

-

Hello guys, im reading the doc 100 of fusion and i looking for at the photon forum too. But i cant solve this problema with dll not found of the nanosocket. The doc and the forum cant helpme with this. Currently i can execute my project at editor mode and i can build this project too. But when i execute my mac build, the photons cant connect as Host, or client or any... The error message is send to me:

  • I have already performed the processes indicated in the documentation to:

    • Assets\Photon\Fusion\Plugins\NanoSockets\macOS\Intel\libnanosockets.dylib: Editor and Standalone unCheckd at importsettings.
  • Assets\Photon\Fusion\Plugins\NanoSockets\macOS\AppleSilicon\libnanosockets.dylib: - Editor and standAlone checked at importSettings. (CPU = AppleSilicon). (edited)

I Maked a short video of Dlls configuration:

****

But not yet.

Lee_Probert
2022-06-05 20:36:18

I can confirm all of the above ... the DLLNotFoundException error happens in the build version only (connects in the editor) ... the plugin is set up correctly but it doesn't read it. I am using Unity 2021.3.1f1

This is so disappointing.

Lee_Probert
2022-06-05 21:07:07

Just found the solution! You need to set the plugin CPU type to Any CPU. Use the Silicon plugin and disable the Intel one (as instructions above), but make sure you set the CPU type to Any CPU. That solved it for me. Runs in IDE and Build configuration.

Grae
2022-06-18 04:31:47

Lee_Probert 2022-06-05T21:07:07+00:00

Just found the solution! You need to set the plugin CPU type to `Any CPU`. Use the Silicon plugin and disable the Intel one (as instructions above), but make sure you set the CPU type to `Any CPU`. That solved it for me. Runs in IDE and Build configuration.

Had the same problem, tried both 2021.3.1f1 and 2022.1.5f. It doesn't seem to play nicely when building for Apple Silicon, can confirm that switching 'Any CPU' also fixed my problem, thanks for sharing your solution!

yucelz
2022-06-23 19:35:11

Everybody has pointed out the Apple Silicon option, but you may have the Intel version of MAC.

1- ) Check which version of Processor type do you have in your MAC

2-) If you Processor Apple Silicon then;

a- - Assets\Photon\Fusion\Plugins\NanoSockets\macOS\Intel\libnanosockets.dylib: Editor and Standalone unchecked at import settings.

Assets\Photon\Fusion\Plugins\NanoSockets\macOS\AppleSilicon\libnanosockets.dylib: - Editor and standAlone checked at importSettings

b- If you Processor Intel then;

Assets\Photon\Fusion\Plugins\NanoSockets\macOS\AppleSilicon\libnanosockets.dylib: - Editor and standAlone unchecked at importSettings

Assets\Photon\Fusion\Plugins\NanoSockets\macOS\Intel\libnanosockets.dylib: Editor and Standalone checked at import settings.

3-) File-> Build Setting -> Architecture -> Select Intel 64-bit OR ...OR... Apple Silicon.

Dee
2022-07-19 02:38:05

Hi,

I'm having the same issue but on Windows - with IDE only. Build version is fine.

I was trying to reimport and correct the nanosockets dll but not yet resolve this issue.

Unity version is 2021.3.1f1

nuClide
2022-09-09 19:59:54

Workaround

Unity 2022.1.14f1

macOS Monterey 12.5.1 (Intel CPU)

Fusion SDK 1.1.2 Nightly 573

Same error on a dedicated server build.

I tried everything and nothing worked. Even tried to download NanoSockets from git, but Fusion SDK refuses to work with it. Then I've noticed that it tries to find a dll in the Contents folder, as if I was building an .app folder and not just an executable console application... So, I manually created the whole path (/Contents/Frameworks/MonoEmbedRuntime/osx/) in the dedicated server target folder and copied there the libnanosockets.dylibfile from Assets/Photon/Fusion/Plugins/NanoSockets/macOSand... that actually worked, the server launched and I was able to connect and start a game. I guess this could be a workaround now, but wish this was fixed.

apippofr
2022-10-25 07:50:44

nuClide 2022-09-09T19:59:54+00:00

Workaround

Unity 2022.1.14f1

macOS Monterey 12.5.1 (Intel CPU)

Fusion SDK 1.1.2 Nightly 573

Same error on a dedicated server build.

I tried everything and nothing worked. Even tried to download NanoSockets from git, but Fusion SDK refuses to work with it. Then I've noticed that it tries to find a dll in the Contents folder, as if I was building an .app folder and not just an executable console application... So, I manually created the whole path (/Contents/Frameworks/MonoEmbedRuntime/osx/) in the dedicated server target folder and copied there the libnanosockets.dylib file from Assets/Photon/Fusion/Plugins/NanoSockets/macOS and... that actually worked, the server launched and I was able to connect and start a game. I guess this could be a workaround now, but wish this was fixed.

I tried the workaround but the app still cant find the nanosockets, can you elaborate more about the folder path? thanks

update 1:

i tried with empty project, Contents folder need to be located in the same folder with the executable. It worked !

but somehow it still not working in the real project, maybe there is some miss configurations messing with library lookup path. at least there is hope to make the server build work. Thanks !

update 2:

it seems like the error only happens in il2cpp scripting backend, the empty project i tested was using mono after i rebuild it with il2cpp the same error happened. still no idea how to fix it

babyfish0226
2023-02-08 14:47:30

It's work in iOS but not work in tvOS. Anything news ? thanks.

Update:

Finally i found the solution. Go to /Photon/Fusion/Plugins/NanoSockets/NanoSockets/Dynamic and click NanoSocket.dll and check the tvOS in import Settings. Then it work.

babyfish0226
2023-02-09 16:18:02

babyfish0226 2023-02-08T14:47:30+00:00

It's work in iOS but not work in tvOS. Anything news ? thanks.

Update:

Finally i found the solution. Go to /Photon/Fusion/Plugins/NanoSockets/NanoSockets/Dynamic and click NanoSocket.dll and check the tvOS in import Settings. Then it work.

Update2:

I can build the xcode project that unity export normally but the fusion network funciotns all not work that game run on my Apple TV.

babyfish0226
2023-02-09 16:20:57

babyfish0226 2023-02-08T14:47:30+00:00

It's work in iOS but not work in tvOS. Anything news ? thanks.

Update:

Finally i found the solution. Go to /Photon/Fusion/Plugins/NanoSockets/NanoSockets/Dynamic and click NanoSocket.dll and check the tvOS in import Settings. Then it work.

Update2:

Now i can build xcode project that unity export normally but all fusion network functions not work that run my game on Apple TV.

babyfish0226
2023-02-10 14:14:13

babyfish0226 2023-02-08T14:47:30+00:00

It's work in iOS but not work in tvOS. Anything news ? thanks.

Update:

Finally i found the solution. Go to /Photon/Fusion/Plugins/NanoSockets/NanoSockets/Dynamic and click NanoSocket.dll and check the tvOS in import Settings. Then it work.

update3:

I downloaded the nanosocket source code from GitHub and used CMake and ios-cmake to build the new libnanosocket_static.a for tvOS. Finally, I put the libnanosocket_static.a file into Unity and everything worked fine. Thanks, God.

Tobias
2023-02-13 11:03:52

Glad you found a solution.

As far as I can see, build  585 should have tvOS support. Let us know if you still need your own lib beyond that version.

babyfish0226
2023-02-19 02:24:19

Tobias 2023-02-13T11:03:52+00:00

Glad you found a solution.

As far as I can see, build  585 should have tvOS support. Let us know if you still need your own lib beyond that version.

I found that version of Fusion SDK 1.1.5 F2 Build 643 has added the tvOS library. Thank you!

Z060049
2023-04-01 07:36:42

Hi All

I am still having this problem. I am using Dedicated Server on M1 Macbook. Any idea how to fix it?

I am following dedicated server tutorial here https://doc.photonengine.com/fusion/current/technical-samples/dedicated-server/fusion-dedicated-server

Here is my error (I believe)

For LibnanoSocketConfig, this is what i am using

Z060049
2023-04-01 07:44:55

nuClide 2022-09-09T19:59:54+00:00

Workaround

Unity 2022.1.14f1

macOS Monterey 12.5.1 (Intel CPU)

Fusion SDK 1.1.2 Nightly 573

Same error on a dedicated server build.

I tried everything and nothing worked. Even tried to download NanoSockets from git, but Fusion SDK refuses to work with it. Then I've noticed that it tries to find a dll in the Contents folder, as if I was building an .app folder and not just an executable console application... So, I manually created the whole path (/Contents/Frameworks/MonoEmbedRuntime/osx/) in the dedicated server target folder and copied there the libnanosockets.dylib file from Assets/Photon/Fusion/Plugins/NanoSockets/macOS and... that actually worked, the server launched and I was able to connect and start a game. I guess this could be a workaround now, but wish this was fixed.

I need to try this! Thank you

Back to top