I just switched from Xcode 3 to 4. When I attempt to upload an app that I have archived to the organizer, I receive this error:
The archive is invalid
I just faced this problem myself, and I seem to have found a solution to it. Even though the correct provisioning profile seems to be selected, it might not be.
Try to manually navigate the list of possible provisioning profiles and select the correct one. Do not leave the setting on automatic selection.
In the "Identity:"-list, make sure it does not say "Currently matches...". Manually select the correct one yourself.
That should fix the problem and you should be able to upload to the AppStore.