Howdy alchetecwebdev,
I would love to help you with this.
Were you running version 3.1 (three dot one) or perhaps 3.10 (three dot ten)? If you are running 3.1, I would advise you don’t updates all the way to 4.0 just yet. I would recommend you first update to 3.5.1, then to 3.10.1, then finally to 4.0.4. You can download each of these files from this website. Go to My Accounts > Downloads, select the proper version number and click Download.
Does that sound applicable to your site? If you give that a go, including redownloading 4.0.4, does the error go away?
Cheers!
– Brook