Same happened to me today. Thanks for posting the solution. Buggy EA App.
Thank goodness for Steam so I can buy and have my main vast library of games there instead.
I also just found out EA de-listed the Bad Company 2 game from the EA App last year, and multiplayer is completely shut down ever since. (Another reason for me to stick with Steam, as I've never had a purchased game pulled in like 13 years.) No wonder I couldn't connect to multiplayer earlier this year. Would have been a nice gesture for EA to email notify all the Bad Company 2 owners who had it currently installed in Origin / EA App and used it at least once the past 3 or 5 years or something. As opposed to secretly yanking it without warning, relying on people to hear it by reading IGN or PCGamer... which I never do.
Not fair. If I ever need to reinstall the game, it will be impossible since it's yanked from the store. I don't think I have the DVD-ROM version anymore, as I thought/assumed using EA App (going digital) was the way to go. Was mislead into a false sense of security by EA when they let me reinstall BC2 a few times over the years through Origin and EA App without needing the DVD-ROM. I figured it'd always be there... so I think I tossed my old DVD-ROM. Joke was on me!
Note to fellow BC2 enthusiasts: Never uninstall BC2, never upgrade to a new PC, and never let your hard drive crash... unless you have a DVD-ROM copy you can reinstall and unless you're cool with never playing it again. I hear Project Rome might be a way to keep playing multiplayer? Not sure, haven't looked into it ... just heard about it tonight. But you'd still need the game installed... or at least some of the installation and/or .dll files, etc.