Webhooks with GameSparks

Hi, Im trying to setup webhooks with GameSparks I have my url setup like this:

https://preview.gamesparks.net/callback/286806FRSf6P/photonHook/LPXRvTNnut3n20N1RTDgEfsJ13zaxjL5/?path=GameCreate?

The problem is in unity Im getting errors for example:
OnEvent: Event 251: {(Byte)218=(String)Failed to forward request to https://preview.gamesparks.net/callback/286806FRSf6P/lBdmFptAC0V2wjxYFqGYlUScSYA7W3P9/?path=GameCreate? : 'Expectation Failed' httpcode=417 webstatus=7 response='', HttpQueueResult=5., (Byte)254=(Int32)0}

I managed to setup webhooks with BrainCloud but now I want to move to GameSparks but I have tried everything, not sure what Im missing.

Any ideas?

Thanks

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited November 2016
    Hi @hjupter,

    After googling the reason behind a 417 HTTP Code:

    This may be related to a constraint from GameSparks (or a proxy between Photon servers and GameSparks) which does not accept/support the HTTP Header "Expect" with value "100-Continue", hence the reason/name of the error "Expectation Failed".

    Do you confirm that all Photon webhooks fail?

    We will investigate this further and get back to you.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Please try setting from dashboard in webhooks config "CustomHttpHeaders" to:
    {'Expect':''} and then test again after few minutes.
  • Hi, thanks reply, Ill try this right away, I will let you know if it works.
  • It did not work, and yes all webhooks fail:

    {(Byte)218=(String)Failed to forward request to https://preview.gamesparks.net/callback/286806FRSf6P/lBdmFptAC0V2wjxYFqGYlUScSYA7W3P9/?path=GameProperties? : 'Expectation Failed' httpcode=417 webstatus=7 response='', HttpQueueResult=5., (Byte)254=(Int32)0}
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited November 2016
    OK. We are looking into this.
    This is the first report of such issue. We will update our webhooks plugins for this matter but it will take some time before it goes public/live.
    If this is a roadblock for you, I suggest you temporarily work with another service or add a man in the middle (proxy/forwarder) that removes the "Expect" header then forwards the request to GameSparks' Cloud Code callbacks.
    I've tried runscope and it solves this issue.
  • Great. How long do think this is going to take? I guess I can wait hopefully is not too much.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hey @hjupter,

    This could take a while so for now we do recommend using runscope (or any other HTTP "proxy") as a workaround. It should be easy to setup.
    I have also contacted GameSparks and we will decide how to proceed next based on their reply.
  • hjupter
    hjupter ✭✭
    edited February 2017
    Hi @JohnTube ,

    Any news on this?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @hjupter,

    I apologize about the delay.
    No news yet.
    We are working on this currently.
    Thank you for your patience and understanding.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @hjupter,

    It seems GameSparks now supports Expect:100-Continue HTTP header.
    Please confirm.
  • Hi @JohnTube ,

    You are right it is working now :smiley:

    Thank you!