Quantcast
Channel: Photon Server — Photon Engine
Viewing all articles
Browse latest Browse all 1557

MongoDB with custom plugin (Photon Server)

$
0
0
I tried to run MongoDB in my custom plugin, but it gives me following error. Can anybody help me with this?

System.IO.FileLoadException: Could not load file or assembly 'MongoDB.Driver.Legacy' or one of its dependencies. An argument was out of its legal range. (Exception from HRESULT: 0x80131502)
File name: 'MongoDB.Driver.Legacy' ---> System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
at System.String.Substring(Int32 startIndex, Int32 length)
at Photon.Hive.Plugin.PluginManager.OnAssemblyResolve(Object sender, ResolveEventArgs args) in d:\dev\photon-socketserver-sdk_cloud\src-server\Hive\PhotonHive\Plugin\PluginManager.cs:line 424
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.Type.GetType(String typeName)
at MongoDB.Driver.Core.Connections.ClientDocumentHelper.<CreateDriverDocument>g__IsLegacyLoaded|6_0()
at MongoDB.Driver.Core.Connections.ClientDocumentHelper.CreateDriverDocument(String driverVersion)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at MongoDB.Driver.Core.Connections.ClientDocumentHelper.CreateClientDocument(String applicationName)
at MongoDB.Driver.Core.Connections.ConnectionInitializer..ctor(String applicationName, IReadOnlyList`1 compressors)
at MongoDB.Driver.Core.Connections.BinaryConnectionFactory..ctor(ConnectionSettings settings, IStreamFactory streamFactory, IEventSubscriber eventSubscriber)
at MongoDB.Driver.Core.Configuration.ClusterBuilder.CreateConnectionPoolFactory()
at MongoDB.Driver.Core.Configuration.ClusterBuilder.CreateServerFactory()
at MongoDB.Driver.Core.Configuration.ClusterBuilder.CreateClusterFactory()
at MongoDB.Driver.ClusterRegistry.CreateCluster(ClusterKey clusterKey)
at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(ClusterKey clusterKey)
at MongoDB.Driver.MongoClient..ctor(MongoClientSettings settings)
at MyFirstPlugin.MyFirstPlugin.OnCreateGame(ICreateGameCallInfo info) in D:\Photon\Photon-OnPremise-Server-Plugin-SDK_v4-0-29-11263\src-server\Plugins\MyFirstPlugin\MyFirstPlugin.cs:line 23
at Photon.Hive.Plugin.PluginBase.Photon.Hive.Plugin.IGamePlugin.OnCreateGame(ICreateGameCallInfo info) in d:\dev\photon-socketserver-sdk_cloud\src-server\HivePlugin\PluginBase.cs:line 224


UnityEngine.Debug:Log(Object)
Extension:Log(Component, Object) (at Assets/Scripts/Extension.cs:9)
Connection:OnJoinRoomFailed(Int16, String) (at Assets/Scripts/Connection.cs:119)
Photon.Realtime.MatchMakingCallbacksContainer:OnJoinRoomFailed(Int16, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3974)
Photon.Realtime.LoadBalancingClient:CallbackRoomEnterFailed(OperationResponse) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2416)
Photon.Realtime.LoadBalancingClient:OnOperationResponse(OperationResponse) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2553)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:208)
Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:142)

Viewing all articles
Browse latest Browse all 1557

Trending Articles