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

v11.7 generates ArgumentError (wrong number of arguments (given 2, expected 1)): #857

Closed
netwire88 opened this issue Jan 16, 2020 · 6 comments

Comments

@netwire88
Copy link

netwire88 commented Jan 16, 2020

I just updated to v11.7 of the gem, but my existing Shop object that implements
def self.store(session)
is now failing with error ArgumentError (wrong number of arguments (given 2, expected 1)):. This wasn't happening with v 11.3.0. Anyone else experiencing this?
I've also tried changing it to def self.store(session, *args) and that didn't work.

I was referring to https://github.com/Shopify/shopify_app/blob/master/lib/shopify_app/session/storage_strategies/shop_storage_strategy.rb

@tanema
Copy link
Contributor

tanema commented Jan 16, 2020

Yes sorry, the new signature is self.store(auth_session, *args) We added user authentication along side of shop authentication and we needed to make those changes

#856

@slucaskim Can you Please update the README.md to update the session#store method signature as well as a note for the change in the new version please?

@slucaskim
Copy link
Contributor

@netwire88 To clarify, are you overriding the self.store method in your own Shop model?

@netwire88
Copy link
Author

netwire88 commented Jan 16, 2020

Thanks, the method worked after changing to self.store(auth_session, *args) and restarting the server. However, after I sign into the account and Shopify API is redirecting, I get a blank screen with the title "Redirecting..." and the following in the browser console. Are others experiencing the same issue?

Failed to find a valid digest in the 'integrity' attribute for resource 'https://myservername.com/assets/shopify_app/request_storage_access-5a556c57b51c57f00d9d6a2ba007f3172739bab34cc2f647a93e792348e8798d.js' with computed SHA-256 integrity '0lJjndtl8qUdAHc8U0DNkSIqNg4Nx2/QjfsZIycjNoU='. The resource has been blocked.

@tanema
Copy link
Contributor

tanema commented Jan 16, 2020

That is part of #814 It seems like there is an issue with Sprockets 4, We suggest that you pin Sprockets to 3.9 until those issues are fixed

@tanema
Copy link
Contributor

tanema commented Jan 16, 2020

@slucaskim It sounds like that is what he is doing yes

@netwire88
Copy link
Author

Thanks

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