Android 7.0 Nougat was officially released for support Nexus devices not too long ago, and although this does bump those devices up to the most recent version of the software, moving from Marshmallow to Nougat, it's reportedly causing issues for some Nexus device owners. According to a YouTube video that was posted to Reddit earlier, a user named Redytedy is experiencing a problem where his Nexus 6P will simply shut off after initiating a certain task. In the video it is pointed out that the problem consistently happens while the user opens up the camera app and snaps a few pictures, but he also notes that it is happening randomly with other apps as well.
It's also pointed out that the Nexus 6P is running on Android 7.0 Nougat, and although the user never explicitly states that Nougat is the cause, it seems implied that the issue may not have been happening with his device on Marshmallow. It's also mentioned that the battery is at 53 percent before the shut down. Alongside the issue with the Nexus 6P, other Reddit users are reporting having the same problem but with the Nexus 5X as well. According to the original poster, a factory reset does not seem to fix the problem which is an issue as the phone won't power back on which is demonstrated by attempting to press the power button numerous times to get it to boot up.
Having said that, plugging in the device and waiting for the battery icon to pop up, then holding down the power button seems to get the device to turn back on. While this does get the device up and running again and everything is more or less functional, with it happening randomly there is no way to know if it will end up powering down at any given time. Even more of a setback is that it looks to be causing people issues with using the camera. Multiple users have also reported having a different battery issue entirely, with the battery power draining at an extremely fast paced compared to normal. At the moment it doesn't look like there is a nearby fix, as there is no answer for the exact cause of the problem just yet.