Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 Bad request #15587

Closed
furymaxim opened this issue Nov 4, 2019 · 3 comments
Closed

400 Bad request #15587

furymaxim opened this issue Nov 4, 2019 · 3 comments

Comments

@furymaxim
Copy link

furymaxim commented Nov 4, 2019

New Issue Checklist

Issue Description

I am trying to send a mail to my own email with mailgun.

  lane :mylane do
    mailgun(
      postmaster: "sandbox89871c1c54a948d4ba3b4eb2b7399497.mailgun.org",
      apikey: "439aa1f6e312547584f5d36f37128186-f696beb4-42a2d05d",
      to: "myemail@gmail.com",
      success: true,
      message: "Mail Body",
      app_link: "http://www.google.com",
      attachment: "app/build/outputs/apk/debug/app-debug.apk"
)
  end

Screenshot at Nov 04 17-59-49

Command executed

bundle exec fastlane mylane

Complete output when running fastlane, including the stack trace and command used
nout:TestEspressoFastlane macbook$ bundle exec fastlane mylane
[✔] 🚀 
[17:56:23]: ------------------------------
[17:56:23]: --- Step: default_platform ---
[17:56:23]: ------------------------------
[17:56:23]: Driving the lane 'android mylane' 🚀
[17:56:23]: ---------------------
[17:56:23]: --- Step: mailgun ---
[17:56:23]: ---------------------
+------------------+----------------+
|           Lane Context            |
+------------------+----------------+
| DEFAULT_PLATFORM | android        |
| PLATFORM_NAME    | android        |
| LANE_NAME        | android mylane |
+------------------+----------------+
[17:56:33]: 400 Bad Request

+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 💥 | mailgun | 9 |
+------+------------------+-------------+

[17:56:33]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

➡️ Distribute to hockeyapp suddenly failing
#400 [closed] 8 💬
22 Sep 2016

➡️ 400 Bad Request
#12449 [closed] 1 💬
04 Jul 2018

➡️ Spaceship::PortalClient#associate_groups_with_app results in 400 Bad Request
#12555 [closed] 9 💬
21 Jul 2018

and 29 more at: https://github.com/fastlane/fastlane/search?q=400%20Bad%20Request&type=Issues&utf8=✓

🔗 You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/Users/macbook/.rbenv/versions/2.6.5/bin/fastlane)
RestClient::BadRequest: 400 Bad Request
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/abstract_response.rb:249:in exception_with_response' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/abstract_response.rb:129:in return!'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:836:in process_result' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:743:in block in transmit'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/2.6.0/net/http.rb:920:in start' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:727:in transmit'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:163:in execute' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:63:in execute'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient.rb:70:in post' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/actions/mailgun.rb:135:in mailgunit'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/actions/mailgun.rb:14:in run' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:256:in block (2 levels) in execute_action'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in execute_action' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:235:in block in execute_action'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:227:in chdir' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:227:in execute_action'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing'
Fastfile:47:in block (2 levels) in parsing_binding' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/lane.rb:33:in call'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:49:in block in execute' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:45:in chdir'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/runner.rb:45:in execute' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/lane_manager.rb:56:in cruise_lane'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/commands_generator.rb:108:in block (2 levels) in run'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in call' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in run'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in run_active_command' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in run!' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/commands_generator.rb:349:in run'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/commands_generator.rb:41:in start' /Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in take_off'
/Users/macbook/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.134.0/bin/fastlane:23:in <top (required)>' /Users/macbook/.rbenv/versions/2.6.5/bin/fastlane:23:in load'
/Users/macbook/.rbenv/versions/2.6.5/bin/fastlane:23:in `<top (required)>'

Environment

🚫 fastlane environment 🚫

Stack

Key Value
OS 10.14.6
Ruby 2.6.5
Bundler? false
Git git version 2.23.0
Installation Source ~/.rbenv/versions/2.6.5/bin/fastlane
Host Mac OS X 10.14.6 (18G103)
Ruby Lib Dir ~/.rbenv/versions/2.6.5/lib
OpenSSL Version OpenSSL 1.1.1d 10 Sep 2019
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Library/Developer/CommandLineTools/
Xcode Version

System Locale

Error
No Locale with UTF8 found 🚫

fastlane files:

`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:android)

platform :android do
  desc "Runs all the tests"
  lane :test do
    gradle(task: "test")
  end

  desc "Submit a new Beta Build to Crashlytics Beta"
  lane :beta do
    gradle(task: "clean assembleRelease")
    crashlytics
  
    # sh "your_script.sh"
    # You can also use other beta testing services here
  end

  desc "Deploy a new version to the Google Play"
  lane :deploy do
    gradle(task: "clean assembleRelease")
    upload_to_play_store
  end

  desc "Capture Screen"
  lane :capture_screen do
    gradle(task: "clean assembleDebug assembleAndroidTest")
    screengrab
  end


  lane :mylane do
    mailgun(
      postmaster: "sandbox89871c1c54a948d4ba3b4eb2b7399497.mailgun.org",
      apikey: "439aa1f6e312547584f5d36f37128186-f696beb4-42a2d05d",
      to: "furymaxim@gmail.com",
      success: true,
      message: "Mail Body",
      app_link: "http://www.google.com",
      attachment: "app/build/outputs/apk/debug/app-debug.apk"

    )
  end

end
`./fastlane/Appfile`
json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("com.furymaxim.testespressofastlane") # e.g. com.krausefx.app

fastlane gems

Gem Version Update-Status
fastlane 2.134.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.3.0
slack-notifier 2.3.2
atomos 0.1.3
CFPropertyList 3.0.1
claide 1.0.3
colored2 3.1.2
nanaimo 0.2.6
xcodeproj 1.13.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.6.0
terminal-table 1.8.0
plist 3.5.0
public_suffix 2.0.5
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.7.0
tty-cursor 0.7.0
tty-spinner 0.9.1
babosa 1.0.3
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
excon 0.68.0
faraday 0.17.0
unf_ext 0.0.7.6
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
faraday_middleware 0.13.1
fastimage 2.1.7
gh_inspector 1.1.3
mini_magick 4.9.5
multi_xml 0.6.0
rubyzip 1.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.0
dotenv 2.7.5
bundler 2.0.2
naturally 2.2.0
simctl 1.6.6
jwt 2.1.0
uber 0.1.0
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
mime-types-data 3.2019.1009
mime-types 3.3
multi_json 1.14.1
signet 0.12.0
memoist 0.16.0
os 1.0.1
googleauth 0.6.7
httpclient 2.8.3
google-api-client 0.23.9
google-cloud-env 1.3.0
google-cloud-core 1.4.1
digest-crc 0.4.1
google-cloud-storage 1.16.0
emoji_regex 1.0.1
json 2.2.0
forwardable 1.2.0
logger 1.3.0
stringio 0.0.2
ipaddr 1.2.2
openssl 2.1.2
ostruct 0.1.0
strscan 1.0.0
date 2.0.0
fileutils 1.1.0
etc 1.0.1
io-console 0.4.7
zlib 1.0.0
rexml 3.1.9
psych 3.1.0
mutex_m 0.1.0

generated on: 2019-11-04

@furymaxim
Copy link
Author

Screenshot at Nov 04 18-03-39

@fastlane-bot
Copy link

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.

Please 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 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

@fastlane-bot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@fastlane fastlane locked and limited conversation to collaborators Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants