Skip to content

Conversation

@jinliu9508
Copy link
Contributor

@jinliu9508 jinliu9508 commented Jan 6, 2026

Description

One Line Summary

Add temporary stub implementation of com.onesignal.SyncJobService to prevent background crashes caused by upgrading OneSignal from v4 to v5.

Details

Motivation

Apps upgrading from OneSignal SDK v4 to v5 may encounter a crash when the system attempts to start the legacy com.onesignal.SyncJobService, which no longer exists in the v5 SDK. Devices with previously scheduled v4 JobScheduler jobs will still try to invoke this class, resulting in a ClassNotFoundException and app process crash in the background.

This PR introduces a no-op stub implementation of com.onesignal.SyncJobService so that any remaining v4-scheduled jobs can gracefully run once, complete, and be cleared without crashing the app.
This can be considered a temporary workaround.

Scope

Adds com.onesignal.SyncJobService as a minimal JobService that immediately finishes.

Testing

Unit testing

No testing needed as this is a dummy class.

Manual testing

I am unable to reproduce from the migration path. This is from crashlytics and there must be some conditions for this to happen. Example app is manually ran on an Android emulator Pixel 9 API 35 to ensure normal app usage and no functionality change.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

📊 Diff Coverage Report

Diff Coverage Report

Threshold: 80%

Changed Files Coverage

  • SyncJobService.kt: 0/4 lines (0.0%)
    • ⚠️ Below threshold: 4 uncovered lines

Overall Coverage

0/4 lines covered (0.0%)

❌ Coverage Check Failed

Files below 80% threshold:

  • SyncJobService.kt: 0.0% (4 uncovered lines)

📥 View workflow run

@jinliu9508
Copy link
Contributor Author

Pipeline fails due to test coverage. We shouldn't need to create a test for the dummy class.

@jinliu9508 jinliu9508 merged commit a827295 into main Jan 8, 2026
5 of 6 checks passed
@jinliu9508 jinliu9508 deleted the add-dummy-class-for-syncjobservice branch January 8, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants