Error when distributing my Flutter mobile app in Xcode

I built an mobile application using Flutter and I wanted to release it to the app store. I bought the Apple Developer account and configured my "sign in with apple" button. I made sure that the App ID bundle identifier, correlated with my Xcode bundle ID and firebase bundle ID. I know for a fact that I have created a new bundle identifier, but I get a strange error when distributing my app to appstoreconnect - IDEFoundation.DistributionAppRecordProviderError error 0

I have no idea why I am getting this error. I then thought it was a one-time thing, so I re-tried distributing it and now I am getting this error -

Not sure what to do. I found no one else having this error so I thought I would ask for help. Thanks.

Error when distributing my Flutter mobile app in Xcode
 
 
Q