{"action":"created","issue":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/7768","repository_url":"https://api.github.com/repos/fastlane/fastlane","labels_url":"https://api.github.com/repos/fastlane/fastlane/issues/7768/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/7768/comments","events_url":"https://api.github.com/repos/fastlane/fastlane/issues/7768/events","html_url":"https://github.com/fastlane/fastlane/issues/7768","id":199302651,"number":7768,"title":"Make spaceship even more stable and robust","user":{"login":"KrauseFx","id":869950,"avatar_url":"https://avatars1.githubusercontent.com/u/869950?v=3","gravatar_id":"","url":"https://api.github.com/users/KrauseFx","html_url":"https://github.com/KrauseFx","followers_url":"https://api.github.com/users/KrauseFx/followers","following_url":"https://api.github.com/users/KrauseFx/following{/other_user}","gists_url":"https://api.github.com/users/KrauseFx/gists{/gist_id}","starred_url":"https://api.github.com/users/KrauseFx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrauseFx/subscriptions","organizations_url":"https://api.github.com/users/KrauseFx/orgs","repos_url":"https://api.github.com/users/KrauseFx/repos","events_url":"https://api.github.com/users/KrauseFx/events{/privacy}","received_events_url":"https://api.github.com/users/KrauseFx/received_events","type":"User","site_admin":false},"labels":[{"id":337779840,"url":"https://api.github.com/repos/fastlane/fastlane/labels/spaceship","name":"spaceship","color":"ededed","default":false},{"id":389827016,"url":"https://api.github.com/repos/fastlane/fastlane/labels/waiting-for-reply","name":"waiting-for-reply","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-06T22:09:35Z","updated_at":"2017-03-07T23:28:40Z","closed_at":null,"body":"We receive various error messages from iTunes Connect and the Developer Portal that occur randomly, and just re-running the tool \"fixes\" the issue.\r\n\r\n_spaceship_ already has various smart systems built-in to re-send failed requests if necessary ([client.rb#L362](https://github.com/fastlane/fastlane/blob/3e6e2f839fb546c2e01c21114d783af3ff7b9aa9/spaceship/lib/spaceship/client.rb#L362), [tunes_client.rb#L1002](https://github.com/fastlane/fastlane/blob/3e6e2f839fb546c2e01c21114d783af3ff7b9aa9/spaceship/lib/spaceship/tunes/tunes_client.rb#L1002)), however we don't cover enough random errors.\r\n\r\nThis issue should summarise the remaining most common stack traces users experience when using _spaceship_ via _fastlane_.\r\n\r\nAll percentages are estimated based on testing and GitHub issues. They should be used to get an idea of how much troubles an issue makes.\r\n\r\n**Note**: All those error messages are from valid credentials with valid data, they are all one-off server errors, that can't be reliably reproduced.\r\n\r\n#### ✅ Operation Failed (32% of all errors)\r\n\r\nHappens when fetching build trains, no other reports so far\r\n\r\n```\r\nlib/spaceship/client.rb:416:in `parse_response': [!] {\"data\"=>nil, \"messages\"=>{\"warn\"=>nil, \"error\"=>[\"ITC.response.error.OPERATION_FAILED\"], \"info\"=>nil}, \"statusCode\"=>\"ERROR\"} (Spaceship::Client::UnexpectedResponse)\r\nlib/spaceship/tunes/tunes_client.rb:583:in `build_trains'\r\nlib/spaceship/tunes/build_train.rb:55:in `all'\r\nlib/spaceship/tunes/application.rb:249:in `build_trains'\r\nlib/spaceship/tunes/application.rb:287:in `all_processing_builds'\r\npilot/build_manager.rb:146:in `block in wait_for_processing_build'\r\n```\r\n\r\nFixed with https://github.com/fastlane/fastlane/pull/7762\r\n\r\n#### 🔥 403 Forbidden (25% of all errors)\r\n\r\nHappens in the `teams` method, which should be cached properly already. Seems like adding a retry-logic there would solve a majority of the random server timeouts.\r\n\r\n```\r\n**<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>Shield</center>\r\n</body>\r\n</html>\r\n**\r\nspaceship/client.rb:416:in `parse_response'\r\nspaceship/portal/portal_client.rb:30:in `teams'\r\nspaceship/portal/portal_client.rb:42:in `team_id'\r\nspaceship/portal/portal_client.rb:296:in `block in certificates'\r\nspaceship/client.rb:203:in `block in paging'\r\nspaceship/client.rb:201:in `loop'\r\nspaceship/client.rb:201:in `paging'\r\nspaceship/portal/portal_client.rb:294:in `certificates'\r\nspaceship/portal/certificate.rb:258:in `all'\r\n```\r\n\r\n#### 🔥 Unauthorized Access (23% of all errors)\r\n\r\nHappens when logging in\r\n\r\n```\r\nspaceship/client.rb:470:in `block in send_request'\r\nspaceship/client.rb:363:in `with_retry'\r\nspaceship/client.rb:464:in `send_request'\r\nspaceship/client.rb:401:in `request'\r\nspaceship/client.rb:307:in `send_shared_login_request'\r\nspaceship/portal/portal_client.rb:13:in `send_login_request'\r\nspaceship/client.rb:431:in `do_login'\r\nspaceship/client.rb:246:in `login'\r\nspaceship/client.rb:93:in `login'\r\nspaceship/portal/spaceship.rb:22:in `login'\r\n```\r\n\r\n\r\n#### 🔥 Net::ReadTimeout (12% of all errors)\r\n\r\nSeems to happen only on `tunes_client.rb:366:in block in update_app_version!`, which is when the user updates the metadata of an app version.\r\n\r\n```\r\n**Net::ReadTimeout**\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/protocol.rb:158:in `rescue in rbuf_fill'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/protocol.rb:152:in `rbuf_fill'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/protocol.rb:134:in `readuntil'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/protocol.rb:144:in `readline'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/http/response.rb:39:in `read_status_line'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/http/response.rb:28:in `read_new'\r\n/app/vendor/bundle/ruby/2.2.0/gems/aws-sdk-core-2.6.42/lib/seahorse/client/net_http/patches.rb:29:in `block in new_transport_request'\r\n/app/vendor/bundle/ruby/2.2.0/gems/aws-sdk-core-2.6.42/lib/seahorse/client/net_http/patches.rb:26:in `catch'\r\n/app/vendor/bundle/ruby/2.2.0/gems/aws-sdk-core-2.6.42/lib/seahorse/client/net_http/patches.rb:26:in `new_transport_request'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/http.rb:1384:in `request'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/http.rb:1377:in `block in request'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/http.rb:853:in `start'\r\n/app/vendor/ruby-2.2.4/lib/ruby/2.2.0/net/http.rb:1375:in `request'\r\nfaraday-0.10.0/lib/faraday/adapter/net_http.rb:83:in `perform_request'\r\nfaraday-0.10.0/lib/faraday/adapter/net_http.rb:41:in `block in call'\r\nfaraday-0.10.0/lib/faraday/adapter/net_http.rb:88:in `with_net_http_connection'\r\nfaraday-0.10.0/lib/faraday/adapter/net_http.rb:33:in `call'\r\nfaraday-cookie_jar-0.0.6/lib/faraday/cookie_jar.rb:22:in `call'\r\nfaraday_middleware-0.10.1/lib/faraday_middleware/response_middleware.rb:30:in `call'\r\nfaraday_middleware-0.10.1/lib/faraday_middleware/response_middleware.rb:30:in `call'\r\nfaraday_middleware-0.10.1/lib/faraday_middleware/response_middleware.rb:30:in `call'\r\nfaraday-0.10.0/lib/faraday/rack_builder.rb:139:in `build_response'\r\nfaraday-0.10.0/lib/faraday/connection.rb:377:in `run_request'\r\nfaraday-0.10.0/lib/faraday/connection.rb:177:in `post'\r\nfastlane-2.3.1/spaceship/lib/spaceship/client.rb:465:in `block in send_request'\r\nfastlane-2.3.1/spaceship/lib/spaceship/client.rb:363:in `with_retry'\r\nfastlane-2.3.1/spaceship/lib/spaceship/client.rb:464:in `send_request'\r\nfastlane-2.3.1/spaceship/lib/spaceship/client.rb:401:in `request'\r\nfastlane-2.3.1/spaceship/lib/spaceship/tunes/tunes_client.rb:366:in `block in update_app_version!'\r\nfastlane-2.3.1/spaceship/lib/spaceship/tunes/tunes_client.rb:1003:in `with_tunes_retry'\r\nfastlane-2.3.1/spaceship/lib/spaceship/tunes/tunes_client.rb:365:in `update_app_version!'\r\nfastlane-2.3.1/spaceship/lib/spaceship/tunes/app_version.rb:298:in `save!'\r\n```\r\n\r\n#### 🔥 502 Bad Gateway (2% of all errors)\r\n\r\nOnly 2% of the errors, probably not worth investigating until all others are fixed\r\n\r\n```\r\n**<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n**\r\nspaceship/lib/spaceship/client.rb:416:in `parse_response'\r\nspaceship/lib/spaceship/tunes/tunes_client.rb:358:in `app_version_data'\r\nspaceship/lib/spaceship/tunes/tunes_client.rb:349:in `app_version'\r\nspaceship/lib/spaceship/tunes/app_version.rb:177:in `find'\r\nspaceship/lib/spaceship/tunes/application.rb:117:in `edit_version'\r\nspaceship/lib/spaceship/tunes/application.rb:123:in `latest_version'\r\n```\r\n\r\n#### 🔥 An error occurred while processing your request (2% of all errors)\r\n\r\nOnly 2% of the errors, probably not worth investigating until all others are fixed\r\n\r\n```\r\n**<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>\r\nAn error occurred while processing your request.<p>\r\nReference&#32;&#35;97&#46;b6070f17&#46;1483696459&#46;52c8b54d\r\n</BODY></HTML>\r\n**\r\nlib/spaceship/client.rb:416:in `parse_response'\r\nlib/spaceship/tunes/tunes_client.rb:239:in `applications'\r\nlib/spaceship/tunes/application.rb:59:in `all'\r\nlib/spaceship/tunes/application.rb:65:in `find'\r\n```"},"comment":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/comments/284894913","html_url":"https://github.com/fastlane/fastlane/issues/7768#issuecomment-284894913","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/7768","id":284894913,"user":{"login":"fastlane-bot","id":17056452,"avatar_url":"https://avatars3.githubusercontent.com/u/17056452?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane-bot","html_url":"https://github.com/fastlane-bot","followers_url":"https://api.github.com/users/fastlane-bot/followers","following_url":"https://api.github.com/users/fastlane-bot/following{/other_user}","gists_url":"https://api.github.com/users/fastlane-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane-bot/subscriptions","organizations_url":"https://api.github.com/users/fastlane-bot/orgs","repos_url":"https://api.github.com/users/fastlane-bot/repos","events_url":"https://api.github.com/users/fastlane-bot/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane-bot/received_events","type":"User","site_admin":false},"created_at":"2017-03-07T23:28:40Z","updated_at":"2017-03-07T23:28:40Z","body":"There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.\n\nPlease make sure to update to the latest `fastlane` version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:"}}
{"actor":{"display_login":"fastlane-bot"}}