# Preventing WorkManager crashes when updating Android worker classes

DevFeed: [Preventing WorkManager crashes when updating Android worker classes](<https://devfeed.tech/articles/the-curious-case-of-crashing-workers-28699.md>)

Original publisher: [Read original article](<https://jeroenmols.com/blog/2022/04/27/workmanager-crash/>)

Author: info@jeroenmols.com (Jeroen Mols)

Published: 2022-04-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jeroen Mols](<https://devfeed.tech/sources/jeroen-mols.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [migration](<https://devfeed.tech/topics/migration.md>), [App](<https://devfeed.tech/topics/app.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [background-work](<https://devfeed.tech/tags/background-work.md>), [blogs](<https://devfeed.tech/tags/blogs.md>), [crash](<https://devfeed.tech/tags/crash.md>), [crashes](<https://devfeed.tech/tags/crashes.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [migrate](<https://devfeed.tech/tags/migrate.md>), [retry](<https://devfeed.tech/tags/retry.md>), [scheduled](<https://devfeed.tech/tags/scheduled.md>), [workmanager](<https://devfeed.tech/tags/workmanager.md>)

## AI overview

This tutorial explains how Android WorkManager can crash after an app update when pending work references a worker class that was removed, renamed, or moved. It discusses cancelling or migrating pending work and using a custom WorkerFactory.

## Source excerpt

WorkManager is great to schedule background work on Android. However, since scheduled work lives outside of the app lifecycle, you might run into unexpected crashes.