Skip to content

[Bug] When I install Photon lib with Solana Unity SDK there is a WebSocketSharp duplicity error #83

Closed

Description

@mixmob-julio

Describe the bug
When I install Photon lib with Solana Unity SDK there is a WebSocketSharp duplicity error being triggered:

Assets\SolanaSDK\Runtime\codebase\SolanaMobileWalletAdapter.cs(92,28): error CS0121: The call is ambiguous between the following methods or properties: 'WebSocketSharp.Ext.IsNullOrEmpty(string)' and 'WebSocketSharp.Ext.IsNullOrEmpty(string)'

Happens that Photon has the same library being distributed with.
If I try to remove the duplicate dll from Solana folder...
image
... the Solana Unity SDK don't work, and shows follow error:
Assets\SolanaSDK\Runtime\codebase\SolanaMobileStack\MobileWalletAdapterWebSocket.cs(2,7): error CS0246: The type or namespace name 'NativeWebSocket' could not be found (are you missing a using directive or an assembly reference?)

To Reproduce

  • Install the Solana Unity SDK from the zip file downloaded from github.
  • Install Photon Quantum plugin from zip file downloaded from Photom website.
  • The lib duplicity error will be triggered.
  • Remove the NativeWebSocket.dll from Solana folder.
  • Now the "Type namespáce error" is triggered.

Expected behavior
I expect to remove the NativeWebSocket lib distributed with Solana SDK and use any generic NativeWebSocket lib already present in the project.

Screenshots
image

Desktop (please complete the following information):

  • Unity 2-21.3.12

Activity

  1. GabrielePicco commented on Apr 25, 2023

    @GabrielePicco
    Collaborator

    Hey @mixmob-julio , the NativeWebsocket lib is the cross platform wrapper, you should try to remove instead websocket-sharp-latest.dll

  2. mixmob-julio commented on Apr 25, 2023

    @mixmob-julio
    Author

    The duplicity happens with the NativeWebSocket.dll file which can be present/distributed in other packages/plugins like Photon. That's why I need to remove it.

    Should not the Solana SDK now be able to get the other dll reference and use it?

  3. GabrielePicco commented on Apr 25, 2023

    @GabrielePicco
    Collaborator

    From your issue seems that websocket-sharp-latest.dll is the one causing the issue, try to remove it.
    NativeWebSocket is a wrapper library we built. Do they have a NativeWebSocket.dll file in Photon lib?

    No unfortunately, dependency management is not straight forward in Unity.

  4. locked and limited conversation to collaborators on Apr 25, 2023
  5. converted this issue into a discussion #84 on Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions