Rails 5.2.0
Ruby: 2.4.1
Browser: Chrome
Operating System: Mac
Hosting Provider: DigitalOcean
I'm trying to create a test Shopify app.
But I keep running into the following error in my logs:
F, [2018-03-05T23:34:56.533678 #23942] FATAL -- : [a7f46489-9098-48de-a2c3-16325b81744d]
F, [2018-03-05T23:34:56.533738 #23942] FATAL -- : [a7f46489-9098-48de-a2c3-16325b81744d] ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
F, [2018-03-05T23:34:56.533795 #23942] FATAL -- : [a7f46489-9098-48de-a2c3-16325b81744d]
F, [2018-03-05T23:34:56.533877 #23942] FATAL -- : [a7f46489-9098-48de-a2c3-16325b81744d] actionpack (5.2.0.rc1) lib/action_controller/metal/request_forgery_protection.rb:211:inhandle_unverified_request'`
I'm not sure what is wrong. Could this be because I'm using Rails 5.2.0?
If you need more information feel free to ask. My repo is private and has my secret API key, thus why I haven't shared it on this issue yet.
I'd suggest you try with rails 5.1. It could be due to rails 5.2 easily.
I guess you know this, but I had it at hand:
rails _5.1.5_ new app_testing --database=postgresql
cd app_testing
echo 'gem "shopify_app"' >> Gemfile
bundle install
rails generate shopify_app --api_key <your_api_key> --secret <your_app_secret>
Yes, that fixed the issue!!!
Thank you so much 馃憤
No problem! :)
I hope the issue is fixed soon so that the gem works with rails 5.2.x.
Yes me too!
Are you running version 8.2.5 of the gem? I unwittingly was troubleshooting this on 8.2.4 and I even came to the same conclusion found in #534. Facepalm.
This was addressed in version 8.2.5, the problem was that an authenticity token wasn't being created for the form in the Sessions#new view. This was because we weren't using Rails form helpers to build the form, causing a failure when ActionController tries to check the authenticity token provided by the form (nil in this case).
Make sure the gem is up to date! Feel free to let me know if you feel like I've missed something.
@0ptimusrhyme 8.2.6 and still getting the issue :/ It happens on the redirect.
Most helpful comment
I'd suggest you try with rails 5.1. It could be due to rails 5.2 easily.
I guess you know this, but I had it at hand: