Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription processing failing repeatedly #13

Closed
dhemmat opened this issue May 25, 2017 · 2 comments
Closed

Subscription processing failing repeatedly #13

dhemmat opened this issue May 25, 2017 · 2 comments
Labels
bug Describes or fixes a bug. wontfix Will not be fixed.

Comments

@dhemmat
Copy link

dhemmat commented May 25, 2017

Certain subscriptions are being processed repeatedly. It seems that the payment is failing (denied by the gateway), triggering the FailureDispatcher#dispatch method, which contains a call to order.cancel!

I'm not sure why but some orders already appear to be cancelled before they get here, producing the following error:

Cannot transition state via :cancel from :canceled (Reason(s): State cannot transition via "cancel")
/home/deploy/.bundler/goby/ruby/2.3.0/gems/state_machines-0.4.0/lib/state_machines/event.rb:224:in `block in add_actions'
/home/deploy/.bundler/goby/ruby/2.3.0/gems/state_machines-0.4.0/lib/state_machines/machine.rb:725:in `block (2 levels) in define_helper'
/home/deploy/.bundler/goby/ruby/2.3.0/bundler/gems/solidus_subscriptions-c362bf90ea0a/app/models/solidus_subscriptions/failure_dispatcher.rb:7:in `dispatch'

This causes the job to fail and enter the retry queue, this cycle is repeated until the max failed attempts number is hit.

Maybe we can change order.cancel! to order.cancel to make it fail silently? I haven't identified why these orders are reaching the failure dispatcher with a canceled state.

@qr8r qr8r added the bug Describes or fixes a bug. label May 29, 2017
@qr8r
Copy link
Contributor

qr8r commented May 29, 2017

@dhemmat

Thanks for bringing this to my attention. I will look into this. In the mean time if you are able to provide steps in a sample store to reproduce this bug, it would help me identify the root cause.

@stale
Copy link

stale bot commented Jan 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Will not be fixed. label Jan 20, 2020
@stale stale bot closed this as completed Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Describes or fixes a bug. wontfix Will not be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants