-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cannot publish my app :( Sentry does not capture crashes, and my app gets rejected again and again by app stores #548
Comments
I can imagine this is very frustrating. There's a possibility that sentry isn't capturing an error if you are using the flutter sdk if that error happened even before flutter engine starts. That's because the init code is written in Dart and from there, with method channels, we init the Android (java/ndk) bits. I suggest you init the Android sdk programmatically in this case even before the Dart layer. And ensure the app is restarted after the crash so the sdk is able to capture the error before it crashes again. Besides that, I suggest getting more info like what device are they using so you can repro the issue. |
sorry about that, but indeed, more information here would be very useful, like OS version, device brand, and model, etc. |
@bruno-garcia @marandaneto Hi thanks for your replies!
Good idea. How should i do it? IMHO sentry flutter uses sentry android to send out those envelopes (if I remember correctly). So if I init sentry android manually and forbid sentry flutter to communicate with sentry android then it may have problems?
brand: huawei |
@marandaneto I will follow that; the issue seems to be still open... For that phone I do not know. But let me report another two series of phones that fails in the reviewer's eyes: a. honor changwan 7, DUA-AL00, android 8.1.0 |
Does the Google Play Developer Console catch the error? Maybe there's something useful. @marandaneto can you also check that for the Sentry app in the Google Play developer console? |
@ueman No, in my country, people cannot use Google... |
I see an error (not by sentry, but by other cloud platforms). not sure whether this is the one that makes the reviewer reject my app, but definitely sentry does not (and cannot) capture. So... starting sentry BEFORE flutter starts is really helpful! making it the default case will be very helpful for everyone! one flutter android plugin throws exception in
|
@fzyzcjy indeed, the problem is that Flutter inits itself (before everything), is there a way to opt-out the auto init. of the Flutter engine? afaik Flutter inits by a ContentProvider and the priority is defined at runtime which is kinda random sometimes. |
yes #265 is open and still requires improvements/documenting the right way on how to do it which is not that straightforward since the init. order is kinda problematic with ContentProvider |
@marandaneto So... how can I init sentry android before flutter? I am not a android professonal (but much more experienced in flutter), so not very familiar with the android stuff |
Isn't this the solution for it? Well unless the Flutter ContentProvider uses int.max 😅 Do you have a source for the Flutter ContentProvider claim? I wasn't able to find it and like to read up on it. |
@ueman +1 |
@ueman @marandaneto IMHO, I wonder why cannot we put sentry android's init in Or, can we directly use the automatic way mentioned in https://docs.sentry.io/platforms/android/ ? |
@ueman @marandaneto Another approach I come up with: Look at the implementation of https://pub.dev/packages/flutter_sentry , we can see that it seem to initialize android, ios, flutter individually. |
By the way, this cause (#548 (comment)) shows that, though not frequent, such bug can happen because of any flutter package (with android code) that an app uses. Thus, what @bruno-garcia says |
The Application class is created after ContentProviders, so it wouldn't help in this case.
Could be worth a try. However I believe the Android Sentry configuration is overridden as soon as Sentry Flutter is initialized. I haven't tested it yet though. @marandaneto has probably a better insight on this than me. |
we still need to figure out the best way and all the corner cases, that's why the issue remains open, unfortunately, I don't have the answers right now, but all the mentioned points here are valid used cases and will be taken into consideration, a few of them were already discussed across some other issues. |
Closing in favor of #265 |
Platform:
IDE:
split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):
Platform installed with:
Output of the command
flutter doctor -v
below:The version of the SDK (See pubspec.lock):
5.0.0
I have the following issue:
Hi, thanks for the lib! When I publish my app to an Android app store, the reviewers rejected my app, saying that: "the app fails to start". They also provide a (almost useless) screenshot, showing the android system homepage, indicating that they tapped the app icon and it fails to start.
However, I see completely nothing in my sentry webpage. Originally, sentry works pretty well - it captures many Flutter (Dart) exceptions, many Android (Java) exception and so on. But this time it fails.
If this is a rare bug I can tolerate it. However, that Android app store has rejected my app several times, every time saying that it crashes! But I really have zero evidence on what bug it is indeed, because I cannot get any stack trace, neither can I get any logs.
Any help is appreciated!
Steps to reproduce:
Actual result:
Expected result:
The text was updated successfully, but these errors were encountered: