fastlane-community / fastlane-plugin-appicon

Generate required icon sizes and iconset from a master application icon.
MIT License
338 stars 49 forks source link

android_appicon command won't run in 0.11.0 #30

Closed krzysztof-miemiec closed 6 years ago

krzysztof-miemiec commented 6 years ago

I updated the plugin to 0.11.0 recently. When I try to run the android_appicon action like:

android_appicon(
      appicon_image_file: "src/assets/icon.png",
      appicon_devices: [:phone, :tablet],
      appicon_path: "android/app/src/main/res/mipmap"
)

it fails with the following message:

/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-appicon-0.11.0/lib/fastlane/plugin/appicon/actions/android_appicon_action.rb:47:in `merge': [!] no implicit conversion of nil into Hash (TypeError)
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-appicon-0.11.0/lib/fastlane/plugin/appicon/actions/android_appicon_action.rb:47:in `run'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/runner.rb:253:in `block (2 levels) in execute_action'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/runner.rb:231:in `block in execute_action'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/fast_file.rb:148:in `method_missing'
        from Fastfile:215:in `block (2 levels) in parsing_binding'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/lane.rb:33:in `call'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
        from /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:178:in `call'
        from /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:153:in `run'
        from /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/runner.rb:476:in `run_active_command'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:75:in `run!'
        from /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/delegates.rb:15:in `run!'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/commands_generator.rb:337:in `run'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/fastlane/lib/fastlane/cli_tools_distributor.rb:94:in `take_off'
        from /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.76.0/bin/fastlane:20:in `<top (required)>'
        from /usr/local/bin/fastlane:23:in `load'
        from /usr/local/bin/fastlane:23:in `<main>'

I suppose it's a bug, because the same command works perfectly when run on 0.10.0.

felipeplets commented 6 years ago

Hello @krzysztof-miemiec,

Thank you for your report.

We already started a discussion regarding the incompatibility behaviour introduced in AppIcon 0.11.0 by the PR #25 on the PR comments.

Unfortunately I could not work on that on the last weekend, let's see how things go this weekend and I may be able to provide a PR if nobody else do that.

For now there are two possible solutions: 1 - Downgrade do AppIcon 0.10.0 2 - Provide the necessary notification icon

All the best, Plets

krzysztof-miemiec commented 6 years ago

I looked into a code and fixed the issue and also rearranged some parameters, which means it has breaking changes. I hope that the Android community using this plugin will accept them. 😉

felipeplets commented 6 years ago

Thank you for the PR, I will review it shortly.