iTunes locked with error message: iTunes could not connect to the iPad because it is locked with a passcode
I am getting the following error in iTunes after upgrading it and my iPad to iOS 11.
iTunes could not connect to the iPad “XXX iPad” because it is locked with a passcode. You must enter your passcode on the iPad before it can be used with iTunes.
I cannot exit the error message even if I select CANCEL or TRY AGAIN. The only way to get rid of the message is to force quit iTunes. My iPad is NOT locked with a passcode. It is set up for wifi syncing but that is not working because of the error. I can sync it through the cable.
This renders iTunes useless to me. I do not have this problem with 4 other iPhones - 2 on iOS11 and 2 on iOS10. Please advise on how to fix this problem.
Mac mini, iOS 10.2.1