Problems porting the CJR Gaming Photon Framework to v4, can anyone help me out???

edited April 22 in Photon Server
Hey Guys,

like my last post i have fixed some of the problems, but currently i have a massive problem with the InitResponse and InitRequest in the AUtoFac funtion of the CJR Gaming Framework. i have done some changes to the Original Framework, but that all runns correctly. My biggest Problem is the subserver Registration and Client Registration.

but i cant fidure out how i can fix that.

Short: i need some help with this...

If someone is familiar to the CJR Framework, or with autofac and can help me, it would be lovely if he comes on our Discord Server: https://discord.gg/P68ntR

And help me fix this Bugs.

Thx alot and i hope someone can help me out.

Greetings

BirnchenStudios

Best Answers

  • chvetsovchvetsov mod
    Accepted Answer
    Hi, @BirnchenStudios

    TBH, i 'm not familar with AutoFac, and do not really understadn what you trying to do there. But from exception stack i may see you are trying to consturct Peer using InitResponse. This does not work anymore. for S2S communication client side now creates peer and shoudl call its method Connect. then Peers method OnConnectionEstablished called if everything is ok and this method gets response from other side.

    InitResponse can not be parameter for you peer

    best,
    iluya
  • chvetsovchvetsov mod
    Accepted Answer
    hey, @BirnchenStudios

    you probably missed this part of my answer:
    >>>
    for S2S communication client side now creates peer and shoudl call its method Connect. then Peers method OnConnectionEstablished called if everything is ok and this method gets response from other side.
    <<<
    Server side peer can be created either using empty constructor or constructor with InitRequest.

    you may compare server sdk v3 and v4 and see how we refactored connection to master on GS.

    best,
    ilya

Answers

  • connected through discord.gg

    best,
    ilya
  • Hey chvetsov,

    2018-04-23 12:01:32,909 [11] ERROR Photon.SocketServer.Peers.ManagedPeer - Autofac.Core.DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = PhotonServerPeer (ReflectionActivator), Services = [Cardinal.Photon.Server.PhotonServerPeer], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Cardinal.Photon.Server.PhotonServerPeer' can be invoked with the available services and parameters:
    Cannot resolve parameter 'Photon.SocketServer.InitResponse initResponse' of constructor 'Void .ctor(Photon.SocketServer.InitResponse, Cardinal.Photon.Server.PhotonServerHandlerList, Cardinal.Photon.Application.PhotonApplication)'. (See inner exception for details.) ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Cardinal.Photon.Server.PhotonServerPeer' can be invoked with the available services and parameters:
    Cannot resolve parameter 'Photon.SocketServer.InitResponse initResponse' of constructor 'Void .ctor(Photon.SocketServer.InitResponse, Cardinal.Photon.Server.PhotonServerHandlerList, Cardinal.Photon.Application.PhotonApplication)'.
    bei Autofac.Core.Activators.Reflection.ReflectionActivator.GetValidConstructorBindings(IComponentContext context, IEnumerable1 parameters)
    bei Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters)
    bei Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
    --- Ende der internen Ausnahmestapelüberwachung ---
    bei Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable1 parameters)
    bei Autofac.Core.Resolving.InstanceLookup.Execute()
    bei Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable1 parameters)
    bei Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
    bei lambda_method(Closure , IRpcProtocol , IPhotonPeer )
    bei Cardinal.Photon.Application.PhotonPeerFactory.CreatePeer(InitRequest initRequest) in \Cardinal System\Cardinal.Photon\Application\PhotonPeerFactory.cs:Zeile 35.
    bei Cardinal.Photon.Application.PhotonApplication.CreatePeer(InitRequest initRequest) in \Cardinal System\Cardinal.Photon\Application\PhotonApplication.cs:Zeile 47.
    bei Photon.SocketServer.Peers.ManagedPeer.CreatePeerBase(InitRequest initRequest) in h:\svncontent\photon-socketserver-sdk_cloud\src\Photon.SocketServer\Peers\ManagedPeer.cs:Zeile 189.

    this is my complete error message

    https://we.tl/WTKCIN4nhJ <-- the wetransfer download link for the solution. in the main solution folder is the PhotonServer.config file
  • chvetsovchvetsov mod
    Accepted Answer
    Hi, @BirnchenStudios

    TBH, i 'm not familar with AutoFac, and do not really understadn what you trying to do there. But from exception stack i may see you are trying to consturct Peer using InitResponse. This does not work anymore. for S2S communication client side now creates peer and shoudl call its method Connect. then Peers method OnConnectionEstablished called if everything is ok and this method gets response from other side.

    InitResponse can not be parameter for you peer

    best,
    iluya
  • JohnTubeJohnTube mod
    edited April 24
    Hi @BirnchenStudios,

    I think this issue is solved already as you stated in the other thread right?
  • Hi @chvetsov ,

    thx for the answer, right in v 4 i would try to initialize the peer with InitResponse, while IRpcProtocol protocol and IPhotonPeer photonPeer are not running.

    But if you say InitResponse will not work, i must figure out how to do thet in the other way.

    Currently thx for your answer :)
    I will try another way, but if anyone hase translatet it from v3 to v4, please wrote to me :)

    Greetings

    Birnchen Studios
  • Hey @JohnTube ,

    sorry this first question was only a part of the completed Problem.
    After i have seen, that the problkem is bigger i have startet the new (Question) thread here...

    The Problem is currently not solved, but the question in the other thread is solved.
    But i dont find the button to close the other thread...

    Sorry for that.
    Greetings

    Birnchen Studios
  • chvetsovchvetsov mod
    Accepted Answer
    hey, @BirnchenStudios

    you probably missed this part of my answer:
    >>>
    for S2S communication client side now creates peer and shoudl call its method Connect. then Peers method OnConnectionEstablished called if everything is ok and this method gets response from other side.
    <<<
    Server side peer can be created either using empty constructor or constructor with InitRequest.

    you may compare server sdk v3 and v4 and see how we refactored connection to master on GS.

    best,
    ilya
  • Hey @chvetsov ,

    oh sorry, yes i missed this part...
    Currently i am a little bit stressed we will release the game end of May.
    I think after the release i have the time to try the porting again.

    I thinks its to big currently to make them in this short time, we have a complexity of 14 Subserver Systems who all connects to the main System, plus 4 Region Servers. Some systems connects from other Hardware Servers and i will not do anythink to crash them currently :cold_sweat: .

    I will thank you for the quick answers, i think i come back to you in June, if i have more problems. But with this informations in this thread and the porting informations from the other thread i think i can do that.

    Thx for the while :)

    Greetings

    Birnchen Studios
Sign In or Register to comment.