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

Fails In Production When SSL Is Used #213

Open
MatthewKennedy opened this issue Sep 2, 2020 · 6 comments
Open

Fails In Production When SSL Is Used #213

MatthewKennedy opened this issue Sep 2, 2020 · 6 comments

Comments

@MatthewKennedy
Copy link

MatthewKennedy commented Sep 2, 2020

This extension was working fine for years, never an issue, I made no changes to my code or production environment and then I woke up to a roller error log email (shown below), and a message from a potential customer saying they can not checkout.

I have no idea why this should randomly occur, what caused it, or how to fix it.

It may not even be a Spree issue, but if anyone else has come across this issue and fixed it it would be great to know how and document it for others.

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)

@mick-t
Copy link

mick-t commented Sep 10, 2020

I am seeing a similar issue.

@MatthewKennedy
Copy link
Author

MatthewKennedy commented Sep 10, 2020

I am seeing a similar issue.

For a quick fix, replace:

gem 'spree_paypal_express', github: 'spree-contrib/better_spree_paypal_express'

With:

gem 'spree_paypal_express', github: 'welaika/better_spree_paypal_express', branch: 'fix_expired_ssl_certificate_error

And run: bundle update spree_paypal_express

@mick-t
Copy link

mick-t commented Dec 9, 2020

Now getting a "Repository not found" error for the spree-3-7 repo:

bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching https://github.com/spree-3-7/better_spree_paypal_express.git
Username for 'https://github.com': 
Password for 'https://github.com': 
remote: Repository not found.

And a 404 error for:

@MatthewKennedy
Copy link
Author

MatthewKennedy commented Dec 9, 2020

@mick-t Thats my fault, I've spent today deleting my unused GitHub Organisations in an attempt to be more organised, as I had repos everywhere.

You might want to Fork your own version of this extension and apply the fix then you have control over the repo, or use this fellas branch:

gem 'spree_paypal_express', github: 'welaika/better_spree_paypal_express', branch: 'fix_expired_ssl_certificate_error'

mick-t pushed a commit to american-marriage-ministries/better_spree_paypal_express that referenced this issue Dec 23, 2020
- spree-contrib#213

And fixed in this commit that was closed or rejected

- spree-contrib#214
@mick-t
Copy link

mick-t commented Dec 23, 2020

Thanks for the advice, I've created my own fork as welaika's branch is pinned against spree 3-0-stable.

Can you advice what's the best approach going forward to take care of this?

@MatthewKennedy's commit mentions that this fixes "Error from using the old PayPal SDK", I assume the best approach is to use a new PayPal SDK? Sorry if this is a dumb question, I'm working on a application that I inherited and am not fully up to speed on all the components.

Thanks!

matissg added a commit to matissg/better_spree_paypal_express that referenced this issue Jan 2, 2021
@ctsstc
Copy link

ctsstc commented Jan 16, 2022

Seems my build must have been using a cache for spree-3-7/better_spree_paypal_express for who knows how long.

I did some system updates on dokku and docker which I'm now getting:

       Retrying `git clone --bare --no-hardlinks --quiet -- https://github.com/spree-3-7/better_spree_paypal_express.git /tmp/build/vendor/bundle/ruby/2.7.0/cache/bundler/git/better_spree_paypal_express-66e5ea256a0a8288860478940a41ad4900f0c464` at /tmp/build due to error (4/4): Bundler::Source::Git::GitCommandError Git error: command `git clone --bare --no-hardlinks --quiet -- https://github.com/spree-3-7/better_spree_paypal_express.git /tmp/build/vendor/bundle/ruby/2.7.0/cache/bundler/git/better_spree_paypal_express-66e5ea256a0a8288860478940a41ad4900f0c464` in directory /tmp/build has failed.
       
       If this error persists you could try removing the cache directory '/tmp/build'

Going to try this one now: 'welaika/better_spree_paypal_express'

Kinda sketchy using a 3rd party for paypal, but seems to have the basics in there from what I quickly can see.


Edit: also had to run this because mimemagic 3.5 bundle update --conservative mimemagic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants