Benedicht / BestHTTP-Issues

Issue tracking repo for the Best HTTP and all related Unity plugins.
https://assetstore.unity.com/publishers/4137
12 stars 1 forks source link

SSE error after receving first message #183

Closed kenofori closed 10 months ago

kenofori commented 10 months ago

Here is the error stack after opening SSE connection and receiving message

Request Finished with Error! System.NullReferenceException: Object reference not set to an instance of an object
  at Best.HTTP.Hosts.Connections.HTTP2.HTTP2Response.ProcessData (Best.HTTP.Shared.PlatformSupport.Memory.BufferSegment payload) [0x00069] in .\Packages\com.tivadar.best.http\Runtime\HTTP\Hosts\Connections\HTTP2\HTTP2Response.cs:106 
  at Best.HTTP.Hosts.Connections.HTTP2.HTTP2Stream.ProcessIncomingDATAFrame (Best.HTTP.Hosts.Connections.HTTP2.HTTP2FrameHeaderAndPayload& frame) [0x00054] in .\Packages\com.tivadar.best.http\Runtime\HTTP\Hosts\Connections\HTTP2\HTTP2Stream.cs:388 
  at Best.HTTP.Hosts.Connections.HTTP2.HTTP2Stream.ProcessIncomingFrames (System.Collections.Generic.List`1[T] outgoingFrames) [0x002c0] in .\Packages\com.tivadar.best.http\Runtime\HTTP\Hosts\Connections\HTTP2\HTTP2Stream.cs:332 
  at Best.HTTP.Hosts.Connections.HTTP2.HTTP2Stream.AddFrame (Best.HTTP.Hosts.Connections.HTTP2.HTTP2FrameHeaderAndPayload frame, System.Collections.Generic.List`1[T] outgoingFrames) [0x0000e] in .\Packages\com.tivadar.best.http\Runtime\HTTP\Hosts\Connections\HTTP2\HTTP2Stream.cs:204 
  at Best.HTTP.Hosts.Connections.HTTP2.HTTP2ContentConsumer.RunHandler () [0x0042f] in .\Packages\com.tivadar.best.http\Runtime\HTTP\Hosts\Connections\HTTP2\HTTP2ContentConsumer.cs:249 

Best.ServerSentEvents.EventSource:CallOnError (string,string) (at ./Packages/com.tivadar.best.serversentevents/Runtime/EventSource.cs:391)
Best.ServerSentEvents.EventSource:OnRequestFinished (Best.HTTP.HTTPRequest,Best.HTTP.HTTPResponse) (at ./Packages/com.tivadar.best.serversentevents/Runtime/EventSource.cs:533)
Best.HTTP.Hosts.Connections.RequestEventHelper:HandleRequestStateChange (Best.HTTP.Hosts.Connections.RequestEventInfo) (at ./Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/RequestEvents.cs:530)
Best.HTTP.Hosts.Connections.RequestEventHelper:ProcessQueue () (at ./Packages/com.tivadar.best.http/Runtime/HTTP/Hosts/Connections/RequestEvents.cs:428)
Best.HTTP.Shared.HTTPManager:OnUpdate () (at ./Packages/com.tivadar.best.http/Runtime/Shared/HTTPManager.cs:266)
Best.HTTP.Shared.HTTPUpdateDelegator:CallOnUpdate () (at ./Packages/com.tivadar.best.http/Runtime/Shared/HTTPUpdateDelegator.cs:273)
Best.HTTP.Shared.HTTPUpdateDelegator:Update () (at ./Packages/com.tivadar.best.http/Runtime/Shared/HTTPUpdateDelegator.cs:263)
Benedicht commented 10 months ago

Thanks for the report! Where/what server do you connect to? It seems that the server sent a Content-Encoding header, but its value isn't supported.

Benedicht commented 10 months ago

Would it be possible to record diagnostic logs by going through the steps here: https://github.com/Benedicht/BestHTTP-Issues?tab=readme-ov-file#-reporting-bugs