An unknown error has occurred.
The App Store could not process your request. (4)
I got this recently while trying to update Xcode from the Mac App Store. Im not sure if this problem exists for other apps or processes, but this here is my experience so far.
The problem is I was working on a machine at work which had an iTunes account linked that I didn’t know the password to. After numerous attempts at providing my own account and getting the error above, I called up on the google and support forum gods for help.
Most of the solutions involved clearing cookies and sessions but this didn’t help. Might have worked for others, but not for me. But set me on a trail that solved my problem eventually.
So essentially, App Store still thinks the old iTunes account is what it needs to try and associate the download to.
To fix this, go into the App Store > Store > Sign out.
And then Sign in with the account you want to use. Thats it!