I am getting the above error when moving an app from one environment to another.
My app is a canvas app with one connector, to SQL Server, using SQL authentication.
I created this app in my development environment, and once it was ready for testing I exported it and then imported it in to our test environment, where the SQL Server connector already existed. On import I said create new application (although it also happens when updating) and then selected the correct SQL Server connector as part of the import process.
When I open the app in the editor I get two runtime errors, as in the title of this post:
The requested operation is invalid.
Server Response: Bad Data Source.
inner exception: Not a valid data source.
clientRequestId: .....
If I remove the data source and re-add it everything works fine, but I shouldn't have to do that. This same issue will arise when I move from test -> production, and clearly you should not be editing apps when they are promoted to production - this invalidates every ALM principle ever.