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

json_pure 2.7.4 breaks uaac #136

Closed
MiliDurasovic opened this issue Oct 28, 2024 · 10 comments · Fixed by #137
Closed

json_pure 2.7.4 breaks uaac #136

MiliDurasovic opened this issue Oct 28, 2024 · 10 comments · Fixed by #137

Comments

@MiliDurasovic
Copy link

Since json_pure version 2.7.4 I receive the following error while setting the target:

uaac --skip-ssl-validation  target https://uaa."${api}" -t
...
wrong number of arguments (given 2, expected 1)

Afterwards .uaac.yml is simply empty:

# cat ~/.uaac.yml
--- {}

After rolling back to json_pure version 2.7.2, uaac works again without any issues.

Maybe consider strictly pinning to json_pure 2.7.2 until the issue has been identified and resolved?

@CFMCGEE
Copy link

CFMCGEE commented Oct 29, 2024

I'm experiencing this exact issue starting today...

Which version of CF-MGMT are you using @MiliDurasovic?

@jensdaseking
Copy link

Our workaround:

gem install cf-uaac
gem uninstall json_pure --all --force
gem install json_pure --version 2.7.2

@MiliDurasovic
Copy link
Author

@CFMCGEE I´m not using cf-mgmt and I don´t think it matters for this issue.


@jensdaseking
We applied this workaround also in our docker images.

gem install cf-uaac
gem uninstall json_pure -aIx
gem install json_pure -v 2.7.2

@strehle
Copy link
Member

strehle commented Oct 30, 2024

hi,

for now you can use the workaround. there are multiple json libraries in use which cause the problem, e.g. ruby/json#646

Will cleanup here but first in cloudfoundry/cf-uaa-lib#95

@strehle strehle linked a pull request Oct 30, 2024 that will close this issue
@CFMCGEE
Copy link

CFMCGEE commented Oct 30, 2024

@MiliDurasovic - Apologizes, I meant UAAC CLI. I'll try the work around provided. Thanks for raising this issue!

@strehle
Copy link
Member

strehle commented Oct 30, 2024

@MiliDurasovic heads up: please check if with https://github.com/ruby/json/releases/tag/v2.7.5 the issue is fixed ? because changelog seems to show this.

However there will be a cleanup and only one json library will be initialized in future

@MiliDurasovic
Copy link
Author

@strehle Thank you.
I can confirm that the issue is gone for me with https://github.com/ruby/json/releases/tag/v2.7.5 .

@CFMCGEE
Copy link

CFMCGEE commented Oct 30, 2024

@strehle Thanks! Works for me now as well.

@MiliDurasovic
Copy link
Author

@strehle Since tonight we suddenly receive another error:

+ uaac --skip-ssl-validation target https://uaa."${api}"

<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- multi_json (LoadError)

	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'

	from /var/lib/gems/3.0.0/gems/cf-uaac-4.21.0/lib/uaa/stub/server.rb:19:in `<top (required)>'

	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'

	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'

	from /var/lib/gems/3.0.0/gems/cf-uaac-4.21.0/lib/uaa/cli/token.rb:17:in `<top (required)>'

	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'

	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'

	from /var/lib/gems/3.0.0/gems/cf-uaac-4.21.0/lib/uaa/cli/runner.rb:15:in `<top (required)>'

	from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'

Looks like the removal of multi_json is the cause:
cloudfoundry/cf-uaa-lib#95

@strehle
Copy link
Member

strehle commented Nov 1, 2024

see https://github.com/cloudfoundry/cf-uaa-lib/releases/tag/v4.0.6

Sorry for breaking it. Will do replacement in several steps, but we want remove this library and replace it with json / json_pure only

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

Successfully merging a pull request may close this issue.

4 participants