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

TypeError (no implicit conversion of nil into Hash) for /users/(account) #17437

Closed
zunda opened this issue Feb 3, 2022 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@zunda
Copy link
Contributor

zunda commented Feb 3, 2022

Steps to reproduce the problem

  1. Apply Fix not compacting incoming signed JSON-LD activities #17426
  2. Send a GET request to `/users/(account)' with 'Accept: application/json' request header

Expected behaviour

Responded with a JSON data for the account

Actual behaviour

Responded with a 500 Internal Server Error

Specifications

Puma records the error like

method=GET path=/users/zundan format=json controller=AccountsController action=show status=500 error='TypeError: no implicit conversion of nil into Hash' duration=20.80 view=0.00 db=2.88

TypeError (no implicit conversion of nil into Hash):

app/helpers/context_helper.rb:43:in `merge!'
app/helpers/context_helper.rb:43:in `block in serialized_context'
app/helpers/context_helper.rb:42:in `each'
app/helpers/context_helper.rb:42:in `each_with_object'
app/helpers/context_helper.rb:42:in `serialized_context'
app/lib/activitypub/adapter.rb:23:in `serializable_hash'
app/controllers/concerns/cache_concern.rb:22:in `render_with_cache'
app/controllers/accounts_controller.rb:52:in `block (2 levels) in show'
app/controllers/accounts_controller.rb:18:in `show'

This seems to be fixed with zunda@52edc13 but I'm not sure if this is the correct way to fix it.

@zunda zunda added the bug Something isn't working label Feb 3, 2022
@ClearlyClaire
Copy link
Contributor

What version of Mastodon does it occur on? It seems like you may have applied the patch incorrectly.

@zunda
Copy link
Contributor Author

zunda commented Feb 3, 2022

I now understand the error is from me leaving the Keybase proof on my server with reverting #17045. Thanks for pointing that out!
https://mastodon.social/@Gargron/107736193127990402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants