It’s like Y2K all over again for iPhone users. When the clock struck midnight on December 2, 2017, many iPhones that were running iOS 11.1.2 began inexplicably rebooting and crashing. But if you’re one of the affected users, there’s already a fix.

The bug involves iOS’s “local” notifications, alerts that happen on your iPhone rather than Apple’s push notification service. It’s difficult to know which apps use local notifications and which use remote notifications, but one example is meditation app Headspace, which sends users daily reminders to relax and breathe. Any app that sends local notifications could be a culprit.

Users on Twitter are complaining about their phones randomly restarting.

As a result, Apple pushed out iOS 11.2 in the middle of the night, a major update that also brings Apple Pay Cash, faster wireless charging for the iPhone 8 and X, and a number of bug fixes and visual changes. The sixth beta of iOS 11.2 was released yesterday, just days after beta 5 landed. It was presumably released early as a result of the bug, as Apple doesn’t usually push out major iOS updates after midnight on a Saturday.

If you woke up to a crashed iPhone, here’s what you need to do to fix it:

Turn off all notifications so the update won’t be interrupted by a rogue alert. Unfortunately, this isn’t an easy task, since there’s no toggle to turn off all notifications at once, and local notifications could still slip in with Do Not Disturb switched on. Head over to the Notifications tab in the Settings app, and browse your list of apps to find any that are sending notifications. Tap the name and turn off the Allow Notifications toggle.

If your phone won’t allow you to reach the home screen to change the notifications, try plugging it into your Mac or PC to update via iTunes.

Install the iOS 11.2 update in Settings>General>Software Update.

After the update installs, turn on the notifications you turned off.

If you still have issues after installing the update and turning on notifications, Apple recommends contacting Apple Support.

The story behind the story: Bug fixes are a normal part of OD upgrades, but the December 2 iOS bug is a terrible cap to a week of problems. First there was a major flaw in macOS High Sierra 10.13.1 that allowed anyone full access to your computer by entering the username root without a password. A fix quickly arrived, but that fix broke file sharing. And now it seems that the latest High Sierra beta bring the root bug back and reinstallation of the fix.

Earlier this week, Apple apologized for the macOS bug and said, “Our customers deserve better. We are auditing our development processes to help prevent this from happening again.” But this new iOS bug isn’t an isolated problem: Ironically, it was the iOS 11.1.2 bug that caused the issue, which was initially pushed out to fix issues with the iPhone X‘s screen responsiveness in the cold, preceded by the iOS 11.1.1 update that fixed the “capital I” autocorrect bug. So maybe Apple needs to take a hard look at its iOS development process as well.

If this describes what you are experiencing on an iPhone or iPad, your device is likely being impacted by the odd date bug that has now been patched with iOS 11.2.

The problem appears to originate with other versions of iOS 11 and how some apps handle local notifications and alerts, so apps that may try to remind you or alert you of something can trigger the bug and then cause the crash loop sequence.

Tips for Fixing the Crash Loop Bug in iOS 11

If your device is actively stuck in a crash loop with iOS 11, you must update to iOS 11.2 to resolve the problem. You can try the following if you’re stuck in a crash loop:

Put the device into Do Not Disturb mode via Control Center

Or, disable notifications in iOS completely for each third party app (via Settings > Notifications > toggling off per app)

It’s not clear how widespread the problem is, and not everyone will be impacted by the bug because not everyone has one of the apps pushing local notifications to the device which could then trigger the crash.

And as to why it started happening on December 2 specifically is also a bit of a mystery, but perhaps we’ll find that out over time.

The crash loop bug is pretty annoying, and is probably why Apple released iOS 11.2 on a weekend – an unusual perhaps even rushed move for the company, which typically only releases new system software versions during the week days.

Anyway, if you’re impacted by this and have an iPhone or iPad on iOS 11, or you are concerned about being impacted by this, update to iOS 11.2 on the iPhone or iPad. The bug should not impact devices running earlier system software releases prior to iOS 11.