WindowsDevicePortalWrapper icon indicating copy to clipboard operation
WindowsDevicePortalWrapper copied to clipboard

Frequent hangs on web request using Creators Update (build 15031)

Open dotMorten opened this issue 9 years ago • 8 comments

I'm experiencing A LOT of requests hanging on build 15031 when using UWP. I would say about 25-50% of all the requests will hang at the GetAsync/PostAsync calls and never return. I don't see multiple threads from my code, so I doubt this is a deadlock caused by the API. When switching to the Anniversary Update on the same PC, the problem completely disappears.

Can anyone else confirm this ? I can also share a dump.

@WilliamsJason @hpsin @davidkline-ms @riverar

dotMorten avatar Feb 19 '17 17:02 dotMorten

I can confirm this. However it happens only if I connect the devices with my network at home. It's completely fine for the network I use at work.

It's definitely an API issue, but I can only relate this to network connectivity. Not the OS itself.

bkaankose avatar Feb 19 '17 17:02 bkaankose

Thanks for the heads up - are you saying this is specific to the Wrapper, or to the underlying Windows APIs? I'd assume the underlying APIs. Could you point me towards a minimized repro?

hpsin avatar Feb 19 '17 21:02 hpsin

The repro app is the UWP Sample app. I haven't observed it elsewhere, however I never use the WinRT HttpClient, but just the .NET one (although deeper down that is now the same thing). I'm guessing it's not specific to this library, but perhaps specific to some of the security stuff that is added on to it.

Here's a link to a dump. It doesn't show much in the portal wrapper library, so I think this dump is more useful for the team that owns the Http stack and have the symbols for that: https://1drv.ms/u/s!AloD15qMqjnvyct1fJM7ufSh3D23cQ

dotMorten avatar Feb 22 '17 16:02 dotMorten

Hey @dotMorten , are you still hitting this? We haven't heard of this from anyone else and the responsible team internally can't repro it.

hpsin avatar Apr 19 '17 23:04 hpsin

I'm having this problem as well, did it ever get resolved? If it would help I could probably create a small exe that causes it.

danhi avatar Apr 28 '17 22:04 danhi

@danhi, @dotMorten, Are you seeing it on build 15063 (the released Creators Edition)? I use the wrapper daily and have yet to see the issue reported.

david-c-kline avatar Apr 28 '17 22:04 david-c-kline

If so, a small repro would be extremely helpful. As would knowing what device types to which you are connecting.

Thanks! David

david-c-kline avatar Apr 28 '17 22:04 david-c-kline

So, the problem that one of my user reports is with the code below. I can’t repro it myself. I haven’t updated to the Creators Update yet, but I do have a VirtualBox with the Creators Update, and it doesn’t cause the problem. So, I haven’t ruled out something with this users system yet, but after seeing the other post, it seemed like the same issue.

If the code doesn’t tell you anything, I’ll create a small exe that does just this, send it to my user and see if it still hangs on his system, and if so, point you to it.

   Dim myReq As HttpWebRequest

    Dim myResp As HttpWebResponse

    Dim receiveStream As Stream

    Dim bm As Bitmap = Nothing



    Try

        myReq = CType(WebRequest.Create(url), HttpWebRequest)

        myReq.Method = "GET"

        myResp = CType(myReq.GetResponse(), HttpWebResponse)

        receiveStream = myResp.GetResponseStream()



        bm = New Bitmap(receiveStream)

        myResp.Close()

    Catch webEx As WebException

        If webEx.Message.Contains("(408") Then

            LogError("The server session timed out, please refresh the link and try again.")

        End If

        If webEx.Message.Contains("(403") Then

            LogStatus("The server does not allow direct access to this image.  If using GetVideoArt, use context menu to cut and paste image.")

        End If

        If webEx.Message.Contains("(404") Then

            LogStatus("The file " & url & " does not exist.")

        End If

        Return Nothing

    Catch tae As Threading.ThreadAbortException

        ' this is OK

        Return Nothing

    Catch ex As Exception

        'LogError("Error retrieving cover art: " & ex.Message)

        Return Nothing

    End Try

From: David Kline [mailto:[email protected]] Sent: Friday, April 28, 2017 3:39 PM To: Microsoft/WindowsDevicePortalWrapper [email protected] Cc: Dan Hinsley [email protected]; Mention [email protected] Subject: Re: [Microsoft/WindowsDevicePortalWrapper] Frequent hangs on web request using Creators Update (build 15031) (#221)

@danhi https://github.com/danhi , @dotMorten https://github.com/dotMorten , Are you seeing it on build 15063 (the released Creators Edition)? I use the wrapper daily and have yet to see the issue reported.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/WindowsDevicePortalWrapper/issues/221#issuecomment-298122448 , or mute the thread https://github.com/notifications/unsubscribe-auth/ADM-tYg4mgPW9qf9MeqqBnEsZ5njC7d_ks5r0mqOgaJpZM4MFhTS . https://github.com/notifications/beacon/ADM-tVlkgbTEHBOY0qZecf1pqqyuTEi0ks5r0mqOgaJpZM4MFhTS.gif

danhi avatar Apr 28 '17 23:04 danhi