9.1 Setting Payment - Invalid Form Validation

After updated to v9.1.

When go to edit profile -> settings -> payment,

Screen Shot 2020-03-18 at 00.35.22

The form show fields which support many countries and user cannot complete the form to set payment

Exact same issue for me after updating to 9.1 too. I have SSL configured properly, so it doesn’t seem to be any issues loading the stripe api.

Seems to be something to do with window.ST.
This is the debug output from the browser:

payments:710 Uncaught TypeError: Cannot read property ‘init’ of undefined
at HTMLDocument. (payments:710)
at l (application-b036f30ef3d15fcc17d826aa5474654f434faec2b57f18e310c001cec01a1367.js:49)
at Object.fireWith [as resolveWith] (application-b036f30ef3d15fcc17d826aa5474654f434faec2b57f18e310c001cec01a1367.js:49)
at Function.ready (application-b036f30ef3d15fcc17d826aa5474654f434faec2b57f18e310c001cec01a1367.js:49)
at HTMLDocument.s (application-b036f30ef3d15fcc17d826aa5474654f434faec2b57f18e310c001cec01a1367.js:48)

payments:710 is the following code:

709: $(function() {
710: window.ST.StripeBankForm3.init( …
711: }

Hmm this sounds like some JavaScript issue: the forms loads the relevant fields after the provider has selected their country of residence in the dropdown. If everything is displayed immediately, I would look at some JavaScript or browser or something related.

1 Like

I figured out what was going on. When running:
RAILS_ENV=production NODE_ENV=production bundle exec rake assets:precompile
I was getting some errors about node-sass. The client-side code was not compiling fully, and the whole site was actually not updated. Make sure you’re using the correct version of npm/nvm and node.

If you’re receiving an error related to node-sass, try copying the binding file that you need to the correct location node-sass is looking for.

For me this was:
cp client/node_modules/node-sass/vendor/linux-x64-64/linux-x64-64_binding.node
/client/node_modules/node-sass/vendor/linux-x64-64/binding.node

After ran the precompile, it is still error.

application-64b481f6650e339030d206cb334c72e39244a1fcfbf7d78608be79d8fe58dc35.js:1 Uncaught Invariant Violation: ReactOnRails encountered an error while rendering component: TopbarApp.
Original message: Minified React error #32; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=32&args[]=71 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
application-64b481f6650e339030d206cb334c72e39244a1fcfbf7d78608be79d8fe58dc35.js:1 Uncaught Invariant Violation: Minified React error #32; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=32&args[]=71 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.