Azure SignalR: HubException method does not exist

限于喜欢 提交于 2019-12-12 10:20:43

问题


I am finding we receive this error:

Failed to invoke 'CreateChatRequest' due to an error on the server. HubException: Method does not exist.
at _this.callbacks.<computed> (chat.min.js:2060)
at HubConnection.processIncomingData (chat.min.js:2154)
at WebSocketTransport.HubConnection.connection.onreceive (chat.min.js:1881)
at WebSocket.webSocket.onmessage (chat.min.js:3922)

The method does exist. The code does work, then after a while of testing, it returns this and won't stop.

What seems to temporarily fix the issue is restarting the Azure SigR service, but it comes back. This issue does not occur when targeting local SigR during development; it only happens against Azure SigR.

According to documentation, this seems to be a catchall error when something errors up on the server but, no exceptions are being logged. I've turned on detailed errors, but that didn't change the error coming back from the server. I've also tried catching the exception and sending back a HubException to see what is going on, but that didn't change the error message either.

TIA for any help.


回答1:


So the answer, for me, was that i'd checked in (to source control) my azure service's connection string, so other devs were also using this and pointing their versions of the API service at that azure service. So when i ran my code sometimes azure would hit my API service with the new method in and it would work, sometimes it would hit someone else's API service and so fail because their code didn't have the new method in.



来源:https://stackoverflow.com/questions/56023085/azure-signalr-hubexception-method-does-not-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!