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

undefined method `[]' for nil:NilClass #22

Closed
rais38 opened this issue Jan 30, 2015 · 5 comments
Closed

undefined method `[]' for nil:NilClass #22

rais38 opened this issue Jan 30, 2015 · 5 comments

Comments

@rais38
Copy link

rais38 commented Jan 30, 2015

I just update to 0.1.2 and i think something is broken with slack gem.

This is my Fastfile:

before_all do
  ENV["SLACK_URL"] = "https://hooks.slack.com/..."
  increment_build_number
  cocoapods
end

lane :crashlytics do
  sigh :skip_install, :adhoc
  system("cd ..; ipa build --verbose --configuration adhoc")
  system("cd ..; ipa distribute:crashlytics -c ./pathToFramework/Crashlytics.framework -a *** -s ***")
end

after_all do |lane|
  slack({
    message: "App successfully released!",
    success: true
    })
end


error do |lane, exception|
  slack({
    message: "#{exception}",
    success: false
    })
end

But I have this message in the shell:

Build successfully uploaded to Crashlytics
INFO [2015-01-30 10:28:59.75]: Step: slack
INFO [2015-01-30 10:28:59.75]: Step: slack
INFO [2015-01-30 10:28:59.75]: Variable Dump:
INFO [2015-01-30 10:28:59.75]: {:LANE_NAME=>:crashlytics, :BUILD_NUMBER=>54, :SIGH_PROFILE_PATH=>"/path/AdHoc_com.app.mobileprovision"}
FATAL [2015-01-30 10:28:59.75]: undefined method `[]' for nil:NilClass
FATAL [2015-01-30 10:28:59.76]: fastlane finished with errors
/Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/actions/slack.rb:29:in `run': undefined method `[]' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/fast_file.rb:81:in `block (2 levels) in method_missing'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/actions/actions_helper.rb:28:in `execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/fast_file.rb:80:in `block in method_missing'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/fast_file.rb:79:in `chdir'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/fast_file.rb:79:in `method_missing'
    from (eval):41:in `block (2 levels) in parse'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/runner.rb:27:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/runner.rb:27:in `rescue in execute'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/runner.rb:5:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/lane_manager.rb:15:in `block in cruise_lanes'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/lane_manager.rb:14:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/lib/fastlane/lane_manager.rb:14:in `cruise_lanes'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/bin/fastlane:31:in `block (2 levels) in run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/runner.rb:81:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/bin/fastlane:59:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.2/bin/fastlane:63:in `<top (required)>'
    from /usr/bin/fastlane:23:in `load'
    from /usr/bin/fastlane:23:in `<main>'

For additional information, I'm using Bundler with this dependencies:

source 'https://rubygems.org'

gem "fastlane", '0.1.2'
gem "slack-notifier", '1.0.0'
@KrauseFx
Copy link
Member

Wups, thanks! I'll push a fix in a second, in the mean time just change your Slack call to also include the channel

slack({
    message: "App successfully released!",
    success: true,
    channel: 'development'
    })

@KrauseFx
Copy link
Member

Bundling a new release right now: 9d320f2

@rais38
Copy link
Author

rais38 commented Jan 30, 2015

Adding it to my Gemfile. Amazing this support so fast!!

@rais38
Copy link
Author

rais38 commented Jan 30, 2015

@KrauseFx Fixed!!! 👏👏👏👏👏👏👏

@rais38 rais38 closed this as completed Jan 30, 2015
@KrauseFx
Copy link
Member

@rais38 great to hear. Just published a new version: https://github.com/KrauseFx/fastlane/releases/tag/0.1.3 👍

KrauseFx pushed a commit that referenced this issue Mar 7, 2016
Update regex for grabbing device serial number
KrauseFx added a commit that referenced this issue Mar 7, 2016
Added caching of installed gems in temporary directory
@fastlane fastlane locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants