I moved the app from devnet to mainnet. After building and deploying the app with anchor, received a new Program ID. I put this new Program ID in the source code in all the places needed.
I now try to call the app from the NodeJS API and I receive this error: AnchorError occurred. Error Code: DeclaredProgramIdMismatch. Error Number: 4100. Error Message: The declared program id does not match the actual program id.
I then built again the same app but with the new Program ID provided and deployed it. During this operation, the deploy command returned another Program Id, which actually was the OLD Program ID that I had on Devnet.
I now try to use the Old and the New Program Ids as addresses in the NodeJS app, but still I received the same error in both cases.
Code Repo: https://github.com/The-Community-Atlas/solana-client-and-program
anchor keys list
and seeing if the output is the address you expect for your program ID