Skip to content
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

Modify error reporting for API >= 26 #472

Merged
merged 3 commits into from
Apr 14, 2020
Merged

Conversation

nkukday
Copy link
Contributor

@nkukday nkukday commented Apr 3, 2020

We are experiencing crashes within JobIntentService on and above API 26. Linking the Google issue here. As a workaround, we will continue to use JobIntentService below API 26 (Android O) and use a network request to report errors on or above API 26.

@nkukday nkukday added the bug label Apr 3, 2020
@nkukday nkukday self-assigned this Apr 3, 2020
@codecov
Copy link

codecov bot commented Apr 3, 2020

Codecov Report

Merging #472 into master will decrease coverage by 0.15%.
The diff coverage is 47.82%.

@@             Coverage Diff              @@
##             master     #472      +/-   ##
============================================
- Coverage     68.41%   68.26%   -0.16%     
- Complexity      394      397       +3     
============================================
  Files            69       70       +1     
  Lines          2159     2174      +15     
  Branches        172      172              
============================================
+ Hits           1477     1484       +7     
- Misses          584      591       +7     
- Partials         98       99       +1     

Copy link
Contributor

@alfwatt alfwatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about the renames, but we will be exposing the ErrorReporter interface to other SDKs and 'Crash' just sounds so scary

crashReporter.sendErrorReports();
}
});
} catch (Throwable throwable) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might deserve a note that you are catching Throwable because we don't want the crash reporter to report it's own reporting errors:

Copy link
Contributor

@harvsu harvsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed together with @alfwatt .

@zugaldia zugaldia requested a review from pengdev April 8, 2020 20:25
@zugaldia
Copy link
Member

zugaldia commented Apr 8, 2020

@Guardiola31337 @pengdev I'd love your reviews from the Nav and Maps SDK sides, respectively.

Copy link
Member

@pengdev pengdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

It would be great to have some more details in the description about the bug being solved.
And the ultimate solution would be using WorkManager, right? (regardless of the binary size impact).

@nkukday
Copy link
Contributor Author

nkukday commented Apr 9, 2020

@pengdev updated the description. Regarding WorkManager, came across this, might need more investigation.

@nkukday nkukday merged commit 2ba0eeb into master Apr 14, 2020
@nkukday nkukday deleted the nk-jobintentservice-crash branch April 14, 2020 21:38
Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of post-commit comments @nkukday

* This is a background job that sends crash events to the telemetry endpoint
* at startup.
*/
public final class CrashReporterJobIntentService extends JobIntentService {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that this is technically breaking SemVer as it's a public class which is not under internal

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkukday though they arrived after merging the PR - did you have a chance to address @Guardiola31337's comments, maybe as tail work?

@@ -1,4 +1,4 @@
package com.mapbox.android.telemetry.crash;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that this is technically breaking Semver as packages of a public class changed

harvsu pushed a commit that referenced this pull request Apr 21, 2020
# Resolve Conflicts:
#	libtelemetry/src/androidTestFull/java/com/mapbox/android/telemetry/errors/ErrorReporterEngineInstrumentedTest.java
#	libtelemetry/src/full/java/com/mapbox/android/telemetry/MapboxTelemetry.java
#	libtelemetry/src/full/java/com/mapbox/android/telemetry/crash/CrashReporterJobIntentService.java
harvsu pushed a commit that referenced this pull request Apr 21, 2020
harvsu pushed a commit that referenced this pull request Apr 21, 2020
harvsu added a commit that referenced this pull request Apr 21, 2020
* Handle null input while creating LocationEngineResult (#469)

# Resolve Conflicts:
#	liblocation/src/main/java/com/mapbox/android/core/location/LocationEngineResult.java

* Modify error reporting for API >= 26 (#472)

Co-authored-by: Neeraja Kukday <neeraja.kukday@mapbox.com>
harvsu pushed a commit that referenced this pull request Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants