microsoft / fastlane-plugin-appcenter

App Center fastlane integration.
MIT License
508 stars 126 forks source link

Can't upload binary after app created #151

Closed furkanyesiloglu closed 3 months ago

furkanyesiloglu commented 4 years ago

Hi, I have issue about uploading binary file after app created automatically. Logs & configuration are below. Any ideas?

Config

    appcenter_upload(
        api_token: ${TOKEN},
        owner_name: ${MY_ORGANIZATION},
        owner_type: "organization",
        app_name: "APP-NAME",
        file: "App.ipa",
                release_notes: "release notes",
               app_os: "iOS",
               app_platform: "Objective-C-Swift"
    )

Console Logs [11:38:50]: Unknown platform '', consider using one of: [:android, :ios, :mac, :windows, :custom] [11:38:51]: Created iOS/Objective-C-Swift app with name "${APP-NAME}" and display name "${APP-NAME}" for organization "${MY_ORGANIZATION}" [11:38:51]: Starting release upload... [11:38:52]: Not found, invalid owner or application name

kmeinh commented 4 years ago

Hi,

I have the same issue with a macOS-App. On appcenter.ms the App exists and os is set to macOS - therefore app_os not needed anymore IMO.

Still, I receive the same error as @furkissh.

ajaykn commented 4 years ago

Hi @furkissh , @konDeichmann

Please make sure to provide owner_name and app_name correctly. You can check in your AppCenter portal URL once you click on the app. https://appcenter.ms/users//apps/ Or if your app is in organization then https://appcenter.ms/orgs//apps/

And yeah app_os is required only if app needs to be created. Can you please update us, if you are still seeing the issue.

furkanyesiloglu commented 4 years ago

Hi @Ajaykn21, yes I still seeing the issue. The problem here is that after the application is automatically created, the app_name is different from the one I gave. For example, I give app_name as Furkan-Test but, created app_name parameter become Furkan-Test1. And for this reason, upload can't continue.

ajaykn commented 4 years ago

Please ignore this warning [11:38:50]: Unknown platform '', consider using one of: [:android, :ios, :mac, :windows, :custom] We are working on a fix.

@furkissh I am not able to repro the case you are mentioning. We check for the app based on app_name provided, if it exists, then we will create a new release to that app. If it doesn't exists, we will create a new app with the app_name, app_display_name you have provided and then distribute a new release.

Would be great if you can share the app name, so that we can debug more.

Also just checking, are you using the latest version of plugin ?

furkanyesiloglu commented 4 years ago

@Ajaykn21 , Yes is on the latest version. Same app_name is exists on different platform. For example; there was an Android app with name is "Furkan-Test". And I am try to create iOS app with same name.

ajaykn commented 4 years ago

Thats strange. from plugin, you should be able to see 409 in the app creation if its the same app_name irrespective of your platform. {"error": { "code": "Conflict", "message": "Validation error" }} We maintain combination of app_name, owner_name as unique.

We will check more and get back. Meantime, if you are blocked, Create the app in AppCenter portal and provide the app_name from url and proceed for upload.

ajaykn commented 4 years ago

[11:38:50]: Unknown platform '', consider using one of: [:android, :ios, :mac, :windows, :custom]

this warning is fixed and released in release v1.7.0

ajaykn commented 4 years ago

@furkissh if you are not comfortable sharing your appName here, please create a ticket internally via https://intercom.help/appcenter/en/ by clicking on blue chat button in bottom-right and we will look more into this issue.

krimsonkla commented 4 years ago

I dug into this a bit and this issue for me is due to a delayed action within the appcenter service. This delay could be task execution, data synchronization or any other list of items which must occur after the app is "created" and an api result is returned.

In my testing, it may take between 1 and and 90 seconds for the background work to complete and a release to successfully upload.

krimsonkla commented 4 years ago

@phillipleblanc Hi Phillip, why was this issue closed when there is an open PR proving the issue exists? https://github.com/microsoft/fastlane-plugin-appcenter/pull/164

krimsonkla commented 4 years ago

@phillipleblanc Any response to the above question? https://github.com/microsoft/fastlane-plugin-appcenter/issues/151#issuecomment-561652630

jamesovens commented 4 years ago

Would be good to know why this was closed? The documentation makes it clear that an app can be created in App Center automatically if it does not already exist when you try to upload using this plugin, however this is clearly not the case due to this issue which I have also experienced.

It would be nice to have a fix for this problem but I understand that may take longer and might not be something this plugin can fix without changes to App Center's APIs, however at the least I think the documentation for this plugin should be updated to reflect that we cannot create an app in App Center immediately prior to uploading as otherwise other users of this plugin like myself will waste time trying to figure out why this doesn't work.

phillipleblanc commented 4 years ago

Looks like I closed this a bit over-eagerly - apologies for that. Will re-open to make it clear this is still an issue.

jamesovens commented 4 years ago

@phillipleblanc no worries, its also worth mentioning that it is possible to work around this issue by adding a retry mechanism, which is what I did. Obviously it would be better if maybe this was an option that was built into the library itself, or better yet if app center's apis were 'fixed'

MorganTrudeau commented 4 years ago

Hello I am experiencing this issue as well. My error is Error creating app 404: {"message"=>"Not found. Correlation ID: ab3f9c2b-cd00-4113-b822-0f65a5ec440f", "statusCode"=>404, "code"=>"Not Found"}. Can anyone tell me when this error is returned. I can't tell from description. In my case the app does exist on app center so I don't know what it can't find. Much appreciated.

Bundler version 1.17.2 ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18] rbenv 1.1.2 macos 10.14.6

JWShroyer commented 4 years ago

Similar to @MorganTrudeau stated above, I'm seeing a very similar issue. I'm using Fastlane.swift with this plugin to distribute to AppCenter. After updating my tools and this plugin, I'm now intermittently seeing an issue distributing builds to AppCenter referencing the Info.plist and a Correlation ID.

Error fetching release: Could not find Info.plist (Correlation ID: 18ed12f7-e79c-4d36-9da9-39b53d5cd23c)

Versions:

Fastlane: 2.152.0 Bundler: 2.1.4 ruby: 2.6.5 rbenv: 1.1.2 macOS: 10.15.6 Xcode: 11.6 (11E708) fastlane-plugin-appcenter: 1.9.0

Update

I decided to just go ahead and make a new issue as my issue and @MorganTrudeau's issue may not be the same as described in this issue. The new issue can be found here: #236

DmitriyKirakosyan commented 3 months ago

Closing as stale.