I created an archive for any project in Xcode 9. Then I try to create an ipa file (either development or ad-hoc). I first try to export the archive. Then I select either Dev
In my case this was due to a pending Apple license agreement that was causing Xcode's automatic provisioning to crash.
Log onto developer.apple.com and make sure you do not have a license update pending agreement.
The "Apple Developer Program License Agreement" has been updated.
So I have to accept pending License Agreement.
When I select Manual manage signing and try to download profile then I got following error
Try export with Manually first after that you can comeback with Automatically. I think this one fault when apple server return data for exporting process. It can be reset the process with manually option.
Expired provision profile was the cause of this same issue. After renewal, everything is now working.