Comments (8)
Anyone know if this is still happening?
from hockeysdk-xamarin.
This is for me. On both Android and iOS. Due the way ReactiveUI works this can happen quite often for certain situations.
from hockeysdk-xamarin.
Hi @rdavisau and others - sorry for the delay. We are looking at ways to improve this behavior in the future - to make sure we do the right thing, we need your input.
One thing that will be hard for the SDK to figure out will be whether an exception would lead to a crash - it can't really figure that out for itself.
We appreciate your time and hope you can provide more samples as to when this issue occurs and how you currently work around it.
Of course, we also encourage participation through PRs on this 😊
Thanks, Mat
from hockeysdk-xamarin.
I'm actually finding out our apps are crashing for a lot of customers while it shouldn't. This happens all the time in the following scenario:
We're using Refit and Akavache for REST calls and caching. Refit wraps HttpClient SendAsync calls into IObservable sequences so we can use them more easily with Akavache or Rx in general.
The SendAsync calls work with Task's which contains the Exception if there is any, and in the Rx context this is converted to OnError handling in the subscription.
In our situation it seems as if Exceptions occurring this way, and handled through an Observable are seen by Hockey as uncaught exceptions and it brings the whole app down.
I'll try to write a simple example app which demonstrates this problem later this week if possible. Currently I need to pull Hockey from all our apps because it's more hurting than helping, and I have no clue how to work around it consistently.
from hockeysdk-xamarin.
Hi Matthias and everyone - here's what i've found from investigating. This is a simple reproduction on the issue on iOS. As it is, the app crashes after the unawaited Task.Run
call. However, if you comment out the SetupHockeyApp
line the app does not crash.
The crash is caused by these lines in the HockeyApp SDKs. Not observing an exception that occurs in a task does not actually result in termination of a .NET4.5+ app, so I don't think it's correct behaviour for HockeyApp to do that by default. The main issue with this is that if any library you depend on happens to internally allow an exception within a Task to go unhandled - e.g. for a 'fire and forget' scenario - it is impossible to catch, and including HockeyApp will result in crashes where there otherwise would be none.
I think a reasonable solution is to make this behaviour configurable, and disabled by default. This means that HockeyApp matches the .NET platform, but allows users to get this behaviour if they want. I've taken a shot at it and will open a PR. I tested it on iOS and toggling the parameter gave me control over whether or not the app was affected by the unobserved task exceptions as expected. I'm not precious about the approach so you can take the PR or just use it as inspiration.
@Qonstrukt, it might be worth you pulling the branch and testing your app against a build from it given you have a good 'real world' scenario to test against!
from hockeysdk-xamarin.
Thanks @Qonstrukt for your input and thanks @rdavisau for providing the insight and PR - I will have a look at this later today.
from hockeysdk-xamarin.
Thanks @rdavisau, your version fixes this for us. 👍
from hockeysdk-xamarin.
We just released 4.1.1 which comes with a fix for this! Thx @rdavisau and @Qonstrukt! =)
from hockeysdk-xamarin.
Related Issues (20)
- Manual Feedback sending stopped working HOT 1
- ShowFeedbackActivity Java File and Uri HOT 5
- 5.1.x crashes on manager.StartManager() in iOS app extension HOT 1
- Samples : Android manifest HOT 2
- Issues using UpdateManager HOT 1
- FATAL EXCEPTION: AsyncTask #1 - java.lang.RuntimeException: An error occurred while executing doInBackground() HOT 1
- HockeyApp support for Xamarin.Mac or Xamarin.Forms Mac HOT 1
- Thread.nativeCreate java.lang.OutOfMemoryError: Could not allocate JNI Env HOT 4
- HockeySDK Feedback Only uGet HOT 2
- TaskException is sent even if it is marked as Observed HOT 2
- HockeyApp SDK 5.1.1 and AppCenter HOT 3
- Crash on Update dialog HOT 7
- Crash Report on Xamarin 5.2.0 iOS HOT 3
- Integrated update fails on Android 10 HOT 1
- Support macOS with Xamarin.Forms 2.3.5 on Xamarin.Mac V2.0 HOT 2
- 4.1.5 HOT 3
- Error when updating to 4.1.5 HOT 6
- Are there plans to compile with .netstandard enabled? HOT 10
- Xamarin Forms Android Release Build fails with 5.0.0 HOT 16
- Error opening iOS storyboards that goes away after removing Hockey HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hockeysdk-xamarin.