"WebException: The request was aborted: The request was canceled." in Mono

xleon

Posted on
Dec 25 2018

I´ve checked my Xamarin app and I´m not using System.Net.HttpWebRequest anywhere, so Raygun client is the only bit using it.

I get some crash reports for unhandled exceptions like the following:

Class name System.Net.WebException Message The request was aborted: The request was canceled.

and the vague StackTrace: System.Net.HttpWebRequest.MyGetResponseAsync() in <7af4945ef43b4f32a07e4126137c609e>:0

Googling a bit, I saw this may happen when the call produces a timeout. However looking at Raygun client code it seams like the exceptions are handled correctly.

There´s a potential related issue with Mono runtime: https://github.com/mono/mono/issues/10719

Anyway I think Raygun client should never produce an unhandled exception.

1) Are you aware of this issue?
2) How would I work around the issue?

Thanks in advance


Mitchell

Raygun

Posted on
Jan 28 2019

Hi xleon,

Thank you for bringing this to our attention. We were not aware of this issue. After some quick investigation there may be an issue with Mono and unhandled task exceptions (https://github.com/mono/mono/issues/10488). Can you please let us know which version of mono you are using?

Regards, Mitchell.


xleon

Posted on
Jan 28 2019

Hi Mitchell, thanks for your answer.

Our builds are using Mono 5.16.0. As I can read on your link, the issue seams to be fixed on Mono 5.18. I´m not quite sure at the moment if I can upgrade the build to use mono 5.18 (need more research).

More info:

  • this happens on Android and iOS.
  • the issue is getting quite serious (please see attached screenshot)

Regards, Diego.


xleon

Posted on
Jan 29 2019

I´ve just found out the current xamarin pre-release is using mono 5.18: https://github.com/xamarin/xamarin-android/releases/tag/xamarin-android-9.1.103.7

I´ll try that version when it´s out of "pre" and will let you know if that fixed the problem so you can close this ticket later on.

Thank you


Mitchell

Raygun

Posted on
Jan 29 2019

Hi xleon,

I also noticed you are using an older versions of our Xamarin providers. I would recomend updating them to the latest versions found here.

https://www.nuget.org/packages/Mindscape.Raygun4Net.Xamarin.Android/

https://www.nuget.org/packages/Mindscape.Raygun4Net.Xamarin.iOS.Unified/

We have recently moved the Xamarin providers out of the main Raygun4Net NuGet package and into their own packages. This was to allow us to provide faster and clearer updates to these providers.

Let us know how you get on.

Regards, Mitchell.


Reply