A commerce fees rule works fine, but is giving the warnings in the log I've enabled the Commerce Fees module and added a rule with the following details:

{ "rules_setup_fee" : {
    "LABEL" : "Setup Fee",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "TAGS" : [ "Commerce License Billing" ],
    "REQUIRES" : [ "rules", "commerce_fees" ],
    "ON" : { "commerce_fees_order" : [] },
    "IF" : [
      { "text_matches" : {
          "text" : [ "commerce-order:commerce-line-items:0:line-item-label" ],
          "match" : "book"
        }
      }
    ],
    "DO" : [
      { "commerce_fees_apply" : {
          "entity" : [ "commerce-order" ],
          "fee" : "setup_fee",
          "amount" : "999",
          "currency_code" : "USD"
        }
      }
    ]
  }
}


which correctly adds $9.99 setup fee to a shopping cart when customer selects any product which has the "book" string in its title (or SKU which we try to keep the same). So the whole thing serves its purpose just fine, however unfortunately it also leaves the following traces in the logs:


  Unable to evaluate condition text_matches. Unable to get the data
  value for the variable or parameter text. Error: Unable to get the
  data property line_item_label as the parent data structure is not set.


What am I doing wrong here? Thanks!
You should add a data_exists to ensure that the delta/label you're trying to access actually exists. It looks like line-item-label is a custom property.