For those who cannot find "view details" button at Account > Team > View Details, here is how I solved on Xcode 10:
Delete all provisioning profiles at ~/Library/MobileDevice/Provisioning\ Profiles/
Clean the project by holding Shift(⇧)+Command(⌘)+K or Select Product > Clean
Restart xcode
and try again.