User searches result in an error #46

Closed
opened 2022-07-04 15:28:40 +00:00 by Beefox · 2 comments

When the front end attempts to look up a user, for example when typing a name @foo@example.com, this error appears. as such you can not look users up to ping them or add them to lists

Request: GET /api/v1/accounts/search?q=test&resolve=true
Jul 05 01:27:07 Caerbannog mix[9706]: ** (exit) an exception was raised:
Jul 05 01:27:07 Caerbannog mix[9706]:     ** (MatchError) no match of right hand side value: {:error, :invalid_expiration}
Jul 05 01:27:07 Caerbannog mix[9706]:         (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/plugs/rate_limiter.ex:252: Pleroma.Web.Plugs.RateLimiter.initialize_buckets!/1
Jul 05 01:27:07 Caerbannog mix[9706]:         (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/plugs/rate_limiter.ex:170: Pleroma.Web.Plugs.RateLimiter.check_rate/1
Jul 05 01:27:07 Caerbannog mix[9706]:         (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/plugs/rate_limiter.ex:104: Pleroma.Web.Plugs.RateLimiter.handle/2
Jul 05 01:27:07 Caerbannog mix[9706]:         (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/mastodon_api/controllers/search_controller.ex:5: Pleroma.Web.MastodonAPI.SearchController.phoenix_controller_pipeline/2
Jul 05 01:27:07 Caerbannog mix[9706]:         (phoenix 1.5.9) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2
Jul 05 01:27:07 Caerbannog mix[9706]:         (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.plug_builder_call/2
Jul 05 01:27:07 Caerbannog mix[9706]:         (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.call/2
Jul 05 01:27:07 Caerbannog mix[9706]:         (phoenix 1.5.9) lib/phoenix/endpoint/cowboy2_handler.ex:65: Phoenix.Endpoint.Cowboy2Handler.init/4

When the front end attempts to look up a user, for example when typing a name `@foo@example.com`, this error appears. as such you can not look users up to ping them or add them to lists ``` Request: GET /api/v1/accounts/search?q=test&resolve=true Jul 05 01:27:07 Caerbannog mix[9706]: ** (exit) an exception was raised: Jul 05 01:27:07 Caerbannog mix[9706]: ** (MatchError) no match of right hand side value: {:error, :invalid_expiration} Jul 05 01:27:07 Caerbannog mix[9706]: (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/plugs/rate_limiter.ex:252: Pleroma.Web.Plugs.RateLimiter.initialize_buckets!/1 Jul 05 01:27:07 Caerbannog mix[9706]: (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/plugs/rate_limiter.ex:170: Pleroma.Web.Plugs.RateLimiter.check_rate/1 Jul 05 01:27:07 Caerbannog mix[9706]: (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/plugs/rate_limiter.ex:104: Pleroma.Web.Plugs.RateLimiter.handle/2 Jul 05 01:27:07 Caerbannog mix[9706]: (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/mastodon_api/controllers/search_controller.ex:5: Pleroma.Web.MastodonAPI.SearchController.phoenix_controller_pipeline/2 Jul 05 01:27:07 Caerbannog mix[9706]: (phoenix 1.5.9) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2 Jul 05 01:27:07 Caerbannog mix[9706]: (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.plug_builder_call/2 Jul 05 01:27:07 Caerbannog mix[9706]: (pleroma 2.5.2-118-g74bc22ae-develop) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.call/2 Jul 05 01:27:07 Caerbannog mix[9706]: (phoenix 1.5.9) lib/phoenix/endpoint/cowboy2_handler.ex:65: Phoenix.Endpoint.Cowboy2Handler.init/4 ```

this is an invalid configuration error - it means your rate limiter has an invalid duration for the search one probably

image

should look like this

docs: https://docs.akkoma.dev/main/backend/configuration/cheatsheet/#rate_limit

check that yours matches

this is an invalid configuration error - it means your rate limiter has an invalid duration for the search one probably ![image](/attachments/0ecbe5d1-2cc7-4527-ba02-5e28554e0a08) should look like this docs: https://docs.akkoma.dev/main/backend/configuration/cheatsheet/#rate_limit check that yours matches
Author

Yep! That was it!

Yep! That was it!
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#46
No description provided.