Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kalinjul
Copy link
Contributor

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Currently, Fastlane swift only shows a ruby stacktrace when a http error message rises, which is useless:

[1655712352.510837]: error encountered while executing command:
serverError
[1655712352.5108562]: Encountered a problem: FastlaneCore::Interface::FastlaneError:
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/pilot/lib/pilot/build_manager.rb:19:in `upload'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/actions/upload_to_testflight.rb:34:in `run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:229:in `chdir'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb:73:in `run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb:42:in `execute'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:181:in `execute_action_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:176:in `process_action_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:123:in `handle_action_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:86:in `parse_and_execute_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:62:in `block in receive_and_process_commands'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:49:in `loop'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:49:in `receive_and_process_commands'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:158:in `listen'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:38:in `start'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:167:in `block (2 levels) in run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/bin/fastlane:23:in `<top (required)>'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/bin/fastlane:25:in `load'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/bin/fastlane:25:in `<main>'
[1655712352.5108628]: Done running lane: deliverAppStore πŸš€

Description

With this change, the important http message "No ipa or pkg file given" is added to the beginning of the error output, too.

[1655712352.510837]: error encountered while executing command:
serverError
[1655712352.5108562]: Encountered a problem: No ipa or pkg file given
FastlaneCore::Interface::FastlaneError:
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'

Currently, Fastlane swift only shows a ruby stacktrace when a http error message rises, which is useless:

```
FastlaneCore::Interface::FastlaneError:
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/pilot/lib/pilot/build_manager.rb:19:in `upload'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/actions/upload_to_testflight.rb:34:in `run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:229:in `chdir'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb:73:in `run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb:42:in `execute'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:181:in `execute_action_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:176:in `process_action_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:123:in `handle_action_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:86:in `parse_and_execute_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:62:in `block in receive_and_process_commands'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:49:in `loop'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:49:in `receive_and_process_commands'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:158:in `listen'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/server/socket_server.rb:38:in `start'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:167:in `block (2 levels) in run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/gems/fastlane-2.206.2/bin/fastlane:23:in `<top (required)>'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/bin/fastlane:25:in `load'
/Users/julian/.brew/Cellar/fastlane/2.206.2/libexec/bin/fastlane:25:in `<main>'
[1655712352.5108628]: Done running lane: deliverAppStore πŸš€
```

With this change, the important http message "No ipa or pkg file given" is added to the beginning of the error output, too.
@google-cla
Copy link

google-cla bot commented Jun 20, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@getaaron
Copy link
Collaborator

@kalinjul will you be able to sign the CLA?

@joshdholtz joshdholtz changed the title [swift] Show http error message from AppStore [Fastlane.swift] Show http error message from AppStore Jun 29, 2022
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!! Thank you so much for adding this ❀️

@joshdholtz joshdholtz merged commit 6a8969d into fastlane:master Jun 29, 2022
@fastlane-bot
Copy link

Hey @kalinjul πŸ‘‹

Thank you for your contribution to fastlane and congrats on getting this pull request merged πŸŽ‰
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here πŸ‘
We'll notify you once we shipped a new release with your changes πŸš€

@fastlane-bot
Copy link

Congratulations! πŸŽ‰ This was released as part of fastlane 2.207.0 πŸš€

@fastlane fastlane locked and limited conversation to collaborators Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants