Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-2649

Puppet::Parser::Compiler failed with error NoMethodError: undefined method `downcase' for :undef:Symbol

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: PDB 2.3.8
    • Fix Version/s: PDB 4.0.3
    • Component/s: None
    • Labels:
      None
    • Template:
    • CS Priority:
      Normal
    • CS Frequency:
      2 - 5-25% of Customers
    • CS Severity:
      3 - Serious
    • CS Business Value:
      3 - $$$$
    • CS Impact:
      Hide
      When comparing a tag to a variable, if the variable is undef you get an extremely unhelpful ruby error. This makes it very difficult to identify what in your code is causing the issue.

      Improving this error would be very nice.
      Show
      When comparing a tag to a variable, if the variable is undef you get an extremely unhelpful ruby error. This makes it very difficult to identify what in your code is causing the issue. Improving this error would be very nice.

      Description

      Did a "puppet master --compile=edi-vf-1-8.ad.cirrus.com --no-daemonize --debug --trace"

      got this:

      Error: Puppet::Parser::Compiler failed with error NoMethodError: undefined method `downcase' for :undef:Symbol on node edi-vf-1-8.ad.cirrus.com
      /usr/lib/ruby/site_ruby/1.8/puppet/indirector/resource/puppetdb.rb:86:in `build_predicate'
      ....

      It's clear that in line 86 there is a "value.downcase" without any checking on whether the method variable "value" is a object that has a "downcase" method.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              faye_wm Faye Gibbins
            • Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:

                Zendesk Support