Openfoodnetwork: Error while adding a payment method

Created on 19 Jun 2020  路  4Comments  路  Source: openfoodfoundation/openfoodnetwork

Description


While testing the release v3.0.0 an error was observed when adding a payment method. Snail was visible and this bugnsag error seems related:

https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/5ec1a91652841000189980a2?filters[event.since][0][type]=eq&filters[event.since][0][value]=30d&filters[error.status][0][type]=eq&filters[error.status][0][value]=open&filters[app.release_stage][0][value]=staging&filters[app.release_stage][0][type]=eq

Reloading the page worked fine, and it was not possible to reproduce, or collect more information from the console. This was observed twice during a short time period, while setting up Stripe-SCA and Paypal payment methods.

Expected Behavior

Payment method is added, when pressing Update.

Actual Behaviour

Pressing Update resulted in error (visible snail) and an apparently related Bugnsag message above.

Steps to Reproduce




  1. In the admin dashboard go to Payment methods
  2. Click add a new payment method, and fill out all the information
  3. Press update
  4. -> Snail

Animated Gif/Screenshot


Workaround

Refreshing the page worked. After that, all was normal.

Severity

bug-s4: it's annoying, but you can use it

Your Environment

  • Version used: v3.0.0
  • Browser name and version: Firefox 75
  • Operating System and version (desktop or mobile): Desktop/Ubuntu 18.04

Possible Fix

A possible regression?

bug-s3 v3-regression

All 4 comments

Just happened again while setting a Stripe-Connect payment method. I can confirm the bugsnag error is this one (same as above):
https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/5ec1a91652841000189980a2?filters[event.since][0]=30d&filters[error.status][0]=open&pivot_tab=event

Retrying solves it.

this is the error:
gems/activerecord-4.0.13/lib/active_record/associations.rb:162:in `association': Association named 'calculator' was not found on Spree::Gateway::PayPalExpress; perhaps you misspelled it? (ActiveRecord::AssociationNotFoundError)

it looks like a class loading issue related to the calculator of a payment method.
I'd not prioritize this just yet because PR #5879 (brings some of the code from spree_core to OFN) may fix this.

Agreed to increasing severity to S3, after discussion in delivery train meeting today.

:+1:
I marked this to be closed by #5879
We can re-open it if this happens after 5879.

Was this page helpful?
0 / 5 - 0 ratings