Google Photos and Files Apps on Google Pixel 2 is giving the following error "android.process.media has stopped" I have read quite a bit about this issue from "clearing caches" to "formatting your phone".... it works for some people and it doesn't for others. Well formatting your phone will work but you lose quite a bit of data and most importantly time!

I have been bugged by this problem for almost over 2 weeks and today I stumbled upon the solution. So I am sharing with you all so you can resolve a long lasting issue.

This is actually a SOLUTION for all experiencing the same problem as the subject header. 

Good news: no formatting needed.

1a. Go into File Explorer > Phone Storage (internal) > Downloads > find a file called something like "goo.google.com..."
1b. Deleting everything in your download folder would be ideal but depends on how many files you got in there. There could be multiple files called goo.google.com or something like this.
2. Delete the file or files
3. Close all apps
4. Restart your phone
5. Check 

This solution worked for me like a charm and I don't have to format my phone anymore. 

Cause: I maybe was downloading a file from chrome which I may have stopped in the middle or something on these lines, i guess.

Maybe more people can shed light on this problem and solution!

Thank you,
Muhammad
Thanks for this suggestion, I tried several onces that suggested stopping some processes and removing cache but they did not work.

I want to downloads as you suggested, removed some files I recently downloaded, checking the date when the problem started (I did not find goo.google.com files).
Reboot and problem seems to be solved for now!