I am having the same issue. The game worked in Origins but won't in the EA App. When I go to open the game, it says I have to enter the product code-I click enter product code and a box pops up saying: We're sorry an error has occured. We've noticed your computer is currently offline. To activate your game on this computer using your Origin Account you'll need to connect to the internet. (then I have the options to retry or exit) the same as the picture attached below. Retry does nothing and if I click exit it says something like are you sure you want to exit before the download completes. If I wasn't online then how come I can play other games? The only game I can't play is Plants Vs. Zombies. When I pull the game info it shows I've played it for 596 hrs 50 mins and last played yesterday! I haven't been able to play the game in over a year!
I've spoken with EA support, they had me try different things none of which worked. I deleted the EA app and the game and still the same issue. I bought the game in the EA App & even signed up for their monthly subscription but still the same error. I went through the basic and advanced troubleshooting which didn't work. I checked the speed of my system which was great. My computer is hardwired, it is not a wireless system, and my computer is less than 2' ft from my router. The last thing they asked me to do was: Go to "C:\Program Files\Electronic Arts" and copy its contents. After the copy you can close the error dialog and look for "EADesktop.exe" run this. The person from EA help said: In my case I got a missing dll exception. Then they said this: I searched on google for this. The solution was to go into windows settings => apps => installed apps => Microsoft visual c++ 2015-2019 redistributable => click the 3 dots => click change => click repair. problem is my system doesn't have Microsoft visual c++ 2015-2019 redistributable, I have: Microsoft visual c++ 2015-2022 redistributable (x64) and I have Microsoft visual c++ 2015-2022 redistributable (x86). when I click on the 3 dots my options are modify or uninstall there was no repair option. The final thing they had me try was: Click on the game in your game's library, then click on the settings cog just below the game icon in the panel that opens and, choose repair. I did this and it has been running repair for 20 mins now. while the repair was running I did what @H4PYH4PYH4PY suggested: Go to C:\ProgramData\Electronic Arts\EA Services\License--Delete all the files in here as they only related to old games (not saved data).
Once I completed that, I stopped the repair and closed the EA App. then tried to open the game and it worked!!!