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 fetchfor ni:NilClass #3

Open
neospirit opened this issue Jun 7, 2017 · 8 comments
Open

undefined method fetchfor ni:NilClass #3

neospirit opened this issue Jun 7, 2017 · 8 comments

Comments

@neospirit
Copy link

Hi,

I got an error when running Watchbuild since some days.
I modified the info but the error message should be explicit.

$ watchbuild -a com.mycompany.myapp -u [email protected]

+------------------+------------------------------+
| Summary for WatchBuild 0.2.0 |
+------------------+------------------------------+
| app_identifier | com.mycompany.myapp |
| username | [email protected] |
| sample_only_once | false |
+------------------+------------------------------+

[16:51:24]: Starting login with user '[email protected]'
[16:51:25]: Successfully logged in
[16:51:28]: undefined method fetch' for nil:NilClass [16:51:28]: Something failed... trying again to recover [16:51:59]: undefined method fetch' for nil:NilClass
[16:51:59]: Something failed... trying again to recover
....

@KrauseFx
Copy link
Member

KrauseFx commented Jun 7, 2017

Can you update spaceship and try again?

@neospirit
Copy link
Author

neospirit commented Jun 8, 2017

Hello Felix. I did try to update Spaceship but still the same error.
So I reinstalled completely Fastlane and then 'gem install spaceship'
But I got this 'pry' gem issue (fastlane/fastlane#8530).
No luck...
I also tried on another Mac, same issue, same results.

@KrauseFx
Copy link
Member

KrauseFx commented Jun 8, 2017

Don't install spaceship, but install fastlane. Make sure to uninstall spaceship.

@neospirit
Copy link
Author

Yes I uninstalled spaceship. Then I reinstalled fastlane with brew cask.
Then I updated spaceship.
Then running watchbuild but same issue again.

Just in cas here's my fastlane env :

✅ fastlane environment ✅

Stack

Key Value
OS 10.12.4
Ruby 2.2.4
Bundler? false
Git git version 2.11.0 (Apple Git-81)
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.12.4 (16E195)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained false
Is homebrew true
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.3.2

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

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

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
slack-notifier 1.5.1
CFPropertyList 2.3.5
claide 1.0.1
colored2 3.1.2
nanaimo 0.2.3
xcodeproj 1.4.4
rouge 1.11.1
xcpretty 0.2.6
terminal-notifier 1.7.1
unicode-display_width 1.1.3
terminal-table 1.7.3
plist 3.2.0
public_suffix 2.0.5
addressable 2.5.1
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.5.0
babosa 1.0.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.4
excon 0.55.0
faraday 0.12.1
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.0
gh_inspector 1.0.3
uber 0.0.15
representable 2.3.0
retriable 2.1.0
mime-types-data 3.2016.0521
mime-types 3.1
hurley 0.2
little-plugger 1.1.4
multi_json 1.12.1
logging 2.2.2
jwt 1.5.6
memoist 0.15.0
os 0.9.6
signet 0.7.3
googleauth 0.5.1
httpclient 2.8.3
google-api-client 0.9.28
json 1.8.1
mini_magick 4.5.1
multi_xml 0.6.0
rubyzip 1.2.1
security 0.1.3
xcpretty-travis-formatter 0.0.4
dotenv 2.2.0
bundler 1.14.6
faraday_middleware 0.11.0.1

generated on: 2017-06-08

@neospirit
Copy link
Author

Hello same issue on work computer :

✅ fastlane environment ✅

Stack

Key Value
OS 10.12.1
Ruby 2.2.4
Bundler? false
Git git version 2.11.0 (Apple Git-81)
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.12.1 (16B2657)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained true
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.3.3

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

`./fastlane/Fastfile`
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command

# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
require 'time'
require 'commander'
require 'pathname'

# If you want to automatically update fastlane if a new version is available:
# update_fastlane

# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.17.0"

default_platform :ios

# Fastfile actions accept additional configuration, but
# don't worry, fastlane will prompt you for required
# info which you can add here later

platform :ios do

    desc "Always executed before a lane"
    before_all do

        # Ensure that Git status is clean
        # ensure_git_status_clean

        # # Increment build number
        # increment_build_number

        # # Slack webhook url
        # ENV["SLACK_URL"] = "https://hooks.slack.com/services/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"

        # # Get version number
        # Actions.lane_context[SharedValues::VERSION_NUMBER] = get_version_number

        # # Get build number
        # Actions.lane_context[SharedValues::BUILD_NUMBER] = get_build_number

    end

    desc "AppStore release lane"
    lane :release do

        # Ensure Git branch is "develop"
        ensure_git_branch(branch: "master")

        # Slack notification for the beginning of the build
        slack(
            payload: {
                ":rocket: FERRING AppStore Distribution - Upload in progress..." => "Rekovelle - V" + Actions.lane_context[SharedValues::VERSION_NUMBER] + " - Build " + Actions.lane_context[SharedValues::BUILD_NUMBER],
                ":rocket: Build Date" => Time.new.to_s
            },
            default_payloads: [],
            attachment_properties: {
                # AppStore icon
                thumb_url: "https://bytebucket.org/neospirit/helpers/raw/dd68282431ae40a4310aa9e6e872d93dc412abea/Resources/Fastlane/ServicesIcons/appstore.png?token=a9ee198d1729574c14c2f29c02b19528bdd4fa2c"
            }
        )

        # Gym : build the app with the given scheme, configuration and export method
        gym(clean: true, scheme: 'Rekovelle', export_method: 'app-store', configuration: "Release", include_bitcode: true)

        # Send to iTunes Connect
        deliver

        # Send a notification when a build is done processing in iTunes Connect"
        sh("watchbuild -a com.ferring.rekovelle -u [email protected]")

    end

    desc "AppStore release lane"
    lane :metadata do

        # Send metadata to iTunes Connect
        deliver(
            skip_screenshots: true,
            skip_binary_upload: true
        )

    end

    # This block is called, only if the executed lane was successful
    after_all do |lane|

        # AppStore
        # url = "https://bytebucket.org/neospirit/helpers/raw/dd68282431ae40a4310aa9e6e872d93dc412abea/Resources/Fastlane/ServicesIcons/appstore.png?token=a9ee198d1729574c14c2f29c02b19528bdd4fa2c"
        # tag = "V" + Actions.lane_context[SharedValues::VERSION_NUMBER] + "-" + Actions.lane_context[SharedValues::BUILD_NUMBER] + "-APPSTORE"

        # # Slack notification to show the result of the build
        # slack(
        #     default_payloads: [:lane, :test_result],
        #     attachment_properties: {
        #         # Thumb icon
        #         thumb_url: url
        #     }
        # )

        # Add the tag to the last commit of the build
=begin        add_git_tag(
            tag: tag
        )
=end
        # macOS notification when process completed
        url = "https://apptitude.ch/web-startup-challenge/images/logo_apptitude.png"
        notification(title: "Rekovelle", subtitle: "#{lane_context[SharedValues::LANE_NAME]} finished", message: "Ready to upload...", sound: "Glass", app_icon: url)

        rocket

        clean_build_artifacts

    end

    # This block is called when an error occured
    error do |lane, exception|

        # AppStore
        # url = "https://bytebucket.org/neospirit/helpers/raw/dd68282431ae40a4310aa9e6e872d93dc412abea/Resources/Fastlane/ServicesIcons/appstoreFailed.png?token=82d29306ba1691a6e0c432570aec404b04c712c9"

        # # Slack notification to show the result of the build
        # slack(
        #     message: exception.message,
        #     default_payloads: [:lane, :test_result],
        #     success: false,
        #     attachment_properties: {
        #         # Thumb icon
        #         thumb_url: url
        #     }
        # )

        # clean_build_artifacts

    end

    desc "Send a notification when a build is done processing in iTunes Connect"
    lane :watch do

        watchIdentifierPrompt = prompt(
            text: "Bundle identifier (e.g. ch.apptitude.myApp) ? "
        )
        watchEmailPrompt = prompt(
            text: "Apple ID ? "
        )

        sh("watchbuild -a " + watchIdentifierPrompt + " -u " + watchEmailPrompt)

    end

end


# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://docs.fastlane.tools/actions

# fastlane reports which actions are used
# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer
`./fastlane/Appfile`
app_identifier "com.ferring.rekovelle" # The bundle identifier of your app
apple_id "com.ferring.rekovelle" # Your Apple email address

team_id "[[DEV_PORTAL_TEAM_ID]]"  # Developer Portal Team ID

# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md

fastlane gems

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

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
CFPropertyList 2.3.5
addressable 2.5.1
babosa 1.0.2
bigdecimal 1.2.6
bundler 1.14.6
claide 1.0.1
colored 1.2
colored2 3.1.2
commander-fastlane 4.4.4
declarative 0.0.9
declarative-option 0.1.0
domain_name 0.5.20170404
dotenv 2.2.0
excon 0.55.0
faraday 0.12.1
faraday-cookie_jar 0.0.6
faraday_middleware 0.11.0.1
fastimage 2.1.0
gh_inspector 1.0.3
google-api-client 0.12.0
googleauth 0.5.1
highline 1.7.8
http-cookie 1.0.3
httpclient 2.8.3
hurley 0.2
io-console 0.4.3
json 1.8.1
jwt 1.5.6
libxml-ruby 3.0.0
little-plugger 1.1.4
logging 2.2.2
memoist 0.15.0
mime-types 3.1
mime-types-data 3.2016.0521
mini_magick 4.5.1
minitest 5.4.3
multi_json 1.12.1
multi_xml 0.6.0
multipart-post 2.0.0
nanaimo 0.2.3
nokogiri 1.5.6
os 0.9.6
plist 3.2.0
power_assert 0.2.2
psych 2.0.8
public_suffix 2.0.5
rake 10.4.2
rdoc 4.2.0
representable 3.0.4
retriable 2.1.0
rouge 1.11.1
rubygems-update 2.5.2
rubyzip 1.2.1
security 0.1.3
signet 0.7.3
slack-notifier 1.5.1
sqlite3 1.3.13
terminal-notifier 1.7.1
terminal-table 1.7.3
test-unit 3.0.8
tty-screen 0.5.0
uber 0.0.15
unf 0.1.4
unf_ext 0.0.7.4
unicode-display_width 1.1.3
word_wrap 1.0.0
xcodeproj 1.4.4
xcpretty 0.2.6
xcpretty-travis-formatter 0.0.4

generated on: 2017-06-27

@peterdk
Copy link

peterdk commented Jul 25, 2017

Suddenly I get this error too. Did not change anything to my environment. It always worked.

@KrauseFx
Copy link
Member

@peterdk please share the complete output + stack trace

@peterdk
Copy link

peterdk commented Jul 29, 2017

Output:

+------------------+-----------+
| Summary for WatchBuild 0.2.0 |
+------------------+-----------+
| sample_only_once | false     |
+------------------+-----------+

[23:54:11]: To not be asked about this value, you can specify it using 'username'
Your Apple ID Username: USERNAME
[23:54:44]: Starting login with user 'USER@EMAIL'
[23:54:45]: Successfully logged in
[23:54:45]: To not be asked about this value, you can specify it using 'app_identifier'
The bundle identifier of your app: IDENTIFIER
[23:54:54]: undefined method `fetch' for nil:NilClass
[23:54:54]: Something failed... trying again to recover

How do I get a stacktrace?

Using --verbose doesn't give any other output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants