conflict with Stripe causes "Expected one Contribution but found 0" ?
This site has been running CiviRules and Stripe for a good while now, including a CiviRule on the trigger "Contribution is added", with no issues.
However, when using a rule on the trigger "Recurring Contribution is added" and the action "Set the Financial Type for a Contribution", we have problems: When a user submits a recurring contribution using Stripe, the below-provided error and backtrace is given. (And if we disable the CiviRule, users can successfully submit recurring contributions through that same contribution page.)
I will also cross-post this to the Stripe extension queue, as I'm not sure who should "claim" this problem.
Do you have any idea what's going here?
CiviCRM_API3_Exception: "Expected one Contribution but found 0"
#0 /var/www/domains/redacted.example.com/html/wp-content/uploads/civicrm/ext/mjwshared/CRM/Core/Payment/MJWTrait.php(500): civicrm_api3("Contribution", "create", (Array:3))
#1 /var/www/domains/redacted.example.com/html/wp-content/uploads/civicrm/ext/stripe/CRM/Core/Payment/Stripe.php(627): CRM_Core_Payment_Stripe->endDoPayment((Array:72), (Array:2))
#2 /var/www/domains/redacted.example.com/html/wp-content/uploads/civicrm/ext/stripe/CRM/Core/Payment/Stripe.php(506): CRM_Core_Payment_Stripe->doRecurPayment((Array:72), 97, Object(Stripe\Customer), Object(Stripe\PaymentMethod))
#3 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/BAO/Contribution/Utils.php(173): CRM_Core_Payment_Stripe->doPayment((Array:71))
#4 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2311): CRM_Contribute_BAO_Contribution_Utils::processConfirm(Object(CRM_Contribute_Form_Contribution_Confirm), (Array:71), "28876", "60", 0, "1")
#5 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(692): CRM_Contribute_Form_Contribution_Confirm->processFormSubmission("28876")
#6 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(479): CRM_Contribute_Form_Contribution_Confirm->postProcess()
#7 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(144): CRM_Core_Form->mainProcess()
#8 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(45): CRM_Core_StateMachine->perform(Object(CRM_Contribute_Form_Contribution_Confirm), "next", "Next")
#9 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contribute_Form_Contribution_Confirm), "next")
#10 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Confirm), "next")
#11 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page->handle("next")
#12 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(268): CRM_Core_Controller->run((Array:3), NULL)
#13 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:15))
#14 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#15 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/civicrm.php(1449): CRM_Core_Invoke::invoke((Array:3))
#16 /var/www/domains/redacted.example.com/html/wp-content/plugins/civicrm/includes/civicrm.basepage.php(349): CiviCRM_For_WordPress->invoke()
#17 /var/www/domains/redacted.example.com/html/wp-includes/class-wp-hook.php(288): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
#18 /var/www/domains/redacted.example.com/html/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, (Array:1))
#19 /var/www/domains/redacted.example.com/html/wp-includes/plugin.php(544): WP_Hook->do_action((Array:1))
#20 /var/www/domains/redacted.example.com/html/wp-includes/class-wp.php(742): do_action_ref_array("wp", (Array:1))
#21 /var/www/domains/redacted.example.com/html/wp-includes/functions.php(1255): WP->main("")
#22 /var/www/domains/redacted.example.com/html/wp-blog-header.php(16): wp()
#23 /var/www/domains/redacted.example.com/html/index.php(17): require("/var/www/domains/redacted.example.com/html/wp-blog-header.php")
#24 {main}
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
Expected one Contribution but found 0