Giter VIP home page Giter VIP logo

fastlane-plugin-notarize's People

Contributors

berkcebi avatar cyrusingraham avatar jnross avatar nekrich avatar neonowy avatar yigitcanyurtsever avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fastlane-plugin-notarize's Issues

PSA: You must use an App-specific password, not your Apple ID password

I spent a little while troubleshooting this one so I thought it might be worth mentioning here in case others run into the issue.

If you're getting a seemingly generic issue back (undefined method [] for nil) when using this plugin, it could be because you're using your Apple ID password instead of an App-specific password. You'll see more if you enable verbose --verbose true and print logging --print_log true; xcrun will return the following error:

We are unable to create an authentication session.

A bit of Googling and I found that you can't Notarize from the command-line unless you use an App-specific password.

These can be created easily by going to appleid.apple.com. Once I generated the password, I added export FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=xxxxxx to my shell and everything started working as it should.

Hope that helps. It's probably worth updating the documentation with this info as well.

Request status never transitions from in-progress to complete, but staple operation succeeds

I notice that sometimes the request for notarization info stays stuck in the "in-progress" state, but the staple operation succeeds anyway. This has caused automated build jobs which notarize to get stuck.

Would you consider adding an attempt to staple after the notarization-info reports "in-progress" to work around this issue in Apple's notarization-info service?

suggestion - turn on the log for notarisation file upload

I hit a bunch of issues related to my account password and multiple teams

they were pretty easy to identify once I went into the source and manually recreated the notarization_upload_command (apple error messages were for unusually helpful)

at the moment, the plugin just gives unhelpful errors like 'script exited with code 160'

how about just turning on the log

        notarization_upload_response = Actions.sh(
          notarization_upload_command,
          log: true
        )

or alternatively allowing that with an optional 'verbose' param

Notarize plugin doesn't deliver error messages to user.

Running the plugin locally or under Travis, instead of a comprehensible error message, I got the stack trace at the bottom here. The underlying error was being provided by the xml response from Apple, shown just below, but the xml wasn't passed along, nor was the localized error description.

In order to get to the error, I had to modify my local copy of the plugin and get it to print out the arguments which were being passed to xcrun altool:

xcrun altool --notarize-app -t osx -f "*******" --primary-bundle-id ***** -u ***** -p "*****" --output-format xml,

then run the command locally and view the output. It would really be better to pass along the error, instead of generating a stack dump.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>os-version</key>
        <string>10.15.1</string>
        <key>product-errors</key>
        <array>
                <dict>
                        <key>code</key>
                        <integer>1048</integer>
                        <key>message</key>
                        <string>You must first sign the relevant contracts online. (1048)</string>
                        <key>userInfo</key>
                        <dict>
                                <key>NSLocalizedDescription</key>
                                <string>You must first sign the relevant contracts online. (1048)</string>
                                <key>NSLocalizedFailureReason</key>
                                <string>You must first sign the relevant contracts online. (1048)</string>
                                <key>NSLocalizedRecoverySuggestion</key>
                                <string>You must first sign the relevant contracts online. (1048)</string>
                        </dict>
                </dict>
        </array>
        <key>tool-path</key>
        <string>/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework</string>
        <key>tool-version</key>
        <string>4.00.1181</string>
</dict>
</plist>

stack dump:

/Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!': [!] Shell command exited with exit status 24 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/helper/sh_helper.rb:12:in `sh'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-notarize-0.3.0/lib/fastlane/plugin/notarize/actions/notarize_action.rb:42:in `run'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
    from Fastfile:306:in `block (2 levels) in parsing_binding'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/lane.rb:33:in `call'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/bin/fastlane:23:in `<top (required)>'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `load'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `<main>'
    from /Users/travis/.rvm/gems/ruby-2.6.4/bin/ruby_executable_hooks:24:in `eval'
    from /Users/travis/.rvm/gems/ruby-2.6.4/bin/ruby_executable_hooks:24:in `<main>'
/Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!': Shell command exited with exit status 24 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/helper/sh_helper.rb:12:in `sh'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-plugin-notarize-0.3.0/lib/fastlane/plugin/notarize/actions/notarize_action.rb:42:in `run'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
    from Fastfile:306:in `block (2 levels) in parsing_binding'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/lane.rb:33:in `call'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/gems/fastlane-2.131.0/bin/fastlane:23:in `<top (required)>'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `load'
    from /Users/travis/build/USRID/Leash/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `<main>'
    from /Users/travis/.rvm/gems/ruby-2.6.4/bin/ruby_executable_hooks:24:in `eval'
    from /Users/travis/.rvm/gems/ruby-2.6.4/bin/ruby_executable_hooks:24:in `<main>'
The command "bundle exec fastlane $FLAVOR $LANE" exited with 1.

ITC_Provider error when multiple providers are associated with apple account.

When I was trying to use the tool, I got error status 61. To debug, I directly used the altool notarization command and got this error.

Your Apple ID account is attached to other iTunes providers. You will need to specify which provider you intend to submit content to by using the -itc_provider command. Please contact us if you have questions or need help.

So in this case I have to specify my -itc_provider in altool command.

I got this value from this
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u XXX -p XXX

We have to supply ShortName to the --asc_provider value in the altool command like this.

xcrun altool --notarize-app -t osx -f <ZIP_NAME> --primary-bundle-id "<BUNDLE_ID>" -u "<APPLE_ACCOUNT>" --asc-provider "<PROVIDER_SHORT_NAME>" --output-format xml

Let me know, If I should create an PR for this and if you also experienced the same issue.

Managing macOS Certificates/Provisioning Profiles

Hey! Sorry for the somewhat unrelated question to your plugin.. I'm wondering how a user of this plugin should be managing their Developer ID macOS certificate in a CI workflow when using this plugin.

Currently fastlane match does not support managing any type of macOS certificate/profile, let alone the specific one for notarization.

Any suggestions or tips on how to do this would be greatly appreciated!

Store log file url in environment variable

I think it would be quite useful to not only print the data located at the log file url but also store the url in an environment variable. This way it can be used after the notarization call to look at the log. In my case the printed log file in fastlane makes the whole lane log quite messy. Because of that I disabled the log. But it would be great to just get the log file url to, for example, send it to the user.

๐Ÿ‘‹ Thoughts on pull requesting this into a core fastlane action?

๐Ÿ‘‹ from the fastlane team! I started working on a built in action for fastlane called notarize but then got word that you have already created a plugin for this ๐Ÿ˜Š

As of version 2.141.0, which was released today, fastlane now supports building and packaging of macOS and Catalyst apps and it feels like having notarize built into fastlane would be very nice feeling. I was curious what your thoughts were on pull requesting this action into the core fastlane product ๐Ÿ˜‡

โค๏ธ

Read binary Info.plist files

For apps that compile the Info.plist to a binary format, the run function in notarize_action.rb is not able to parse the file and crashes fastlane. This is the relevant line that assumes the Info.plist is in XML format.

bundle_id = Plist.parse_xml(info_plist_path)['CFBundleIdentifier']

Here is the relevant part of the stack trace from the crash:

4: from {USER_HOME}/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-2.113.0/fastlane/lib/fastlane/runner.rb:253:in `block (2 levels) in execute_action'
3: from USER_HOME/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/fastlane-plugin-notarize-0.1.0/lib/fastlane/plugin/notarize/actions/notarize_action.rb:21:in `run'
2: from USER_HOME/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/plist-3.5.0/lib/plist/parser.rb:30:in `parse_xml'
1: from USER_HOME/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/plist-3.5.0/lib/plist/parser.rb:90:in `parse'
USER_HOME/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/plist-3.5.0/lib/plist/parser.rb:90:in `scan': [!] invalid byte sequence in UTF-8 (ArgumentError)

Missing option for asc-provider

If a username is associated multiple iTunes Connect accounts, the asc-provider option with the account name must be provided to indicate which account to use.

Parameter to disable detailed notarization response log

Add a parameter to prevent the printing of the notarization service's response log. This log is often really log and makes the fastlane log on the CI quite unreadable. So for the case that the detailed log is not wanted it would be great to be able to disable it.

Implemented this in this PR: #13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.