spree icon indicating copy to clipboard operation
spree copied to clipboard

Error loading Doorkeeper v5.6.0

Open zavan opened this issue 2 years ago • 4 comments

I tried updating Doorkeeper to v5.6.0 (released a week ago), but it seems that a change to their autoloading code breaks this initializer:

/usr/local/lib/ruby/gems/3.1.0/gems/spree_api-4.2.6/config/initializers/doorkeeper.rb:31:in `<main>': uninitialized constant Doorkeeper::AccessGrant
Did you mean?  Doorkeeper::AccessGrantMixin (NameError)
	from /usr/local/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/engine.rb:681:in `block in load_config_initializer'

Downgrading to v5.5.4 works.

Your Environment

  • Version used: Spree v4.2.6 and Doorkeeper v5.6.0. I have not tried Spree v4.3 and up.

zavan avatar Sep 15 '22 09:09 zavan

Hi @zavan - thank you for creating this one! How is the PR that you assigned to it, related to this issue? Was the error caused by lack of permitted classes in the initializer?

rafalcymerys avatar Sep 28 '22 12:09 rafalcymerys

@rafalcymerys Hey! Nope, it's my second comment on that PR references this issue actually, the CI there is failing due to this issue here.

zavan avatar Sep 28 '22 16:09 zavan

since this 5.5.0 release, Doorkeeper has required client authentication which current version of Spree_api doesn't satisfy anymore, so I think we should change this version's gemspec to (~> 5.2, >= 5.2.1, <5.5.0) ( it's (~> 5.2, >= 5.2.1) currently)

HustMaroon avatar Dec 29 '22 18:12 HustMaroon

Hey @zavan . Could you please try with

# Gemfile

gem "doorkeeper", github: "doorkeeper-gem/doorkeeper", branch: "fixes/lazy-load-associations"

And report if issue still present?

nbulaj avatar Jan 12 '23 19:01 nbulaj