Update.
I reverted to an earlier project and connected without a problem.
I have now detailed all the files connected with the problem project and deleted the project itself and started again.
It now works, why it didn’t in the first place I don’t know.