# Search no longer works after 3.1.0.beta1 update

**URL:** https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663
**Category:** Support
**Created:** [January 13, 2023, 11:34am UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663 "2023-01-13T11:34:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [January 13, 2023, 11:34am UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/1 "2023-01-13T11:34:36Z")

</div>

Since our 3.1.0 update today, our Search is no longer working.  
Our sysadmin team identified a problem and provided us with this log stating this is an application error.

Does anyone else experience this problem and what may the clues be for us to be able to resolve the problem ourselves? I see search works perfectly at Discourse Meta.

```plaintext
Started GET "/search?q=37%20%20realm&page=1" for [IP_REDACTED] at 2023-01-13 11:19:36 +0000
Processing by SearchController#show as JSON
  Parameters: {"q"=>"37 realm", "page"=>"1"}
Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.0ms | Allocations: 1555)
ArgumentError (wrong number of arguments (given 1, expected 0))
lib/search.rb:285:in `execute'
app/controllers/search_controller.rb:73:in `show'
app/controllers/application_controller.rb:414:in `block in with_resolved_locale'
app/controllers/application_controller.rb:414:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:74:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:366:in `call'
config/initializers/008-rack-cors.rb:24:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/request_tracker.rb:228:in `call'
Failed to handle exception in exception app middleware : ArgumentError : wrong number of arguments (given 1, expected 0)

```

> **Screenshots of the problem**
>
> ![Screenshot 2023-01-13 at 11.31.38@2x](https://global.discourse-cdn.com/meta/original/4X/d/c/e/dce6c4d53e3f0cb359b68bdea03bdc3eb2ad54b0.jpeg)  
> ![Screenshot 2023-01-13 at 11.31.07@2x](https://global.discourse-cdn.com/meta/original/4X/d/a/b/dabc6597e8c0c1040c4811cf811c497c55304671.png)  
> ![Screenshot 2023-01-13 at 11.30.15@2x](https://global.discourse-cdn.com/meta/original/4X/3/5/a/35a1109517e7c73bcb0f46a79fd78d5a8304288d.jpeg)

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [January 13, 2023, 11:42am UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/2 "2023-01-13T11:42:39Z")

</div>

It can’t be totally common issue — mine works just fine. Same here (I reckon Meta is on latest).

What happends when trying `/safe-mode`?

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [January 13, 2023, 11:45am UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/3 "2023-01-13T11:45:32Z")

</div>

Unfortunately, it doesn’t work in [Safe mode](https://meta.discourse.org/t/53504?silent=true) either. No themes, no plugins mode.

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [January 13, 2023, 11:57am UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/4 "2023-01-13T11:57:08Z")

</div>

We see the search **doesn’t work for Topics/Posts** , but works for Categories/Tags and Users.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 13, 2023, 12:27pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/5 "2023-01-13T12:27:45Z")

</div>

Are you using an external instance of PostgreSQL? If so what is the version?

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [January 13, 2023, 1:01pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/6 "2023-01-13T13:01:43Z")

</div>

Yes, we are using the external PostgreSQL. The version is 14.6-1

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 13, 2023, 1:14pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/7 "2023-01-13T13:14:26Z")

</div>

Our search is completely broken when running against PostgreSQL 14, which is why we are still shipping PostgreSQL 13 for everyone following our [standard install](https://meta.discourse.org/t/142537?silent=true).

We will eventually fix it since we will upgrade to PostgreSQL 15 (or 16) someday, but it may take a while.

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [January 13, 2023, 1:21pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/8 "2023-01-13T13:21:31Z")

</div>

Thank you. We’re investigating how that may have happened IF we have previously had other PostgreSQL version. Will get back to you once we identify the issue.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [January 13, 2023, 1:47pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/9 "2023-01-13T13:47:52Z")

</div>

> [@kinetiksoft](#):
>
> IF

Whether you previously had 14 isn’t really material, Discourse isn’t compatible with PostgreSQL 14. That’s your issue.

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [January 13, 2023, 2:23pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/10 "2023-01-13T14:23:05Z")

</div>

I’ve checked the [discourse/docs/INSTALL.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL.md) documentation instead, as Cloud documentation doesn’t have server requirements at all.

We see [“Postgres 13+” requirement here](https://github.com/discourse/discourse/blob/main/docs/INSTALL.md#software-requirements). May I be wrong by suggesting to your team to add a notice that Discourse supports 13.X versions only? Maybe, explicit notice of 14/15/… versions are not supported would be helpful too in such cases like ours.

You see, we had Version 14 for at least since December, and we had Stable version of Discourse installed since months earlier. Recently we moved back to tests-passed version, searched worked as expected. Today, we updated from 2.9.0.beta14 to 3.1.0.beta1 and now it’s broken.

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [January 13, 2023, 2:30pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/11 "2023-01-13T14:30:04Z")

</div>

any chance that you use the private replies plugin ?

> [@Discourse Private Replies](https://meta.discourse.org/t/discourse-private-replies/146712/48):
>
> Hi Richard, it seems there is an issue with the search patch (rebuilt with latest) def execute(readonly\_mode: @readonly\_mode) seems to solve it though

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [January 13, 2023, 2:32pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/12 "2023-01-13T14:32:48Z")

</div>

We have it installed, it is disabled in Admin settings

We also tried and reproduced the issue in [Safe Mode](https://meta.discourse.org/t/53504?silent=true). Should it matter anyway?

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [January 13, 2023, 2:35pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/13 "2023-01-13T14:35:27Z")

</div>

Unclear, but that was the issue in my case (same symptoms - although with PostgreSQL13)  
I’m sure Richard will patch it up shortly, in the mean time a fork and a simple edit is a solution.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 13, 2023, 2:37pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/14 "2023-01-13T14:37:08Z")

</div>

> [@Falco](#):
>
> Our search is completely broken when running against PostgreSQL 14

Oh. Bummer. I’ve got one site that I mostly accidentally upgraded to PG14 a while back, and figured it would be fine.

I just did a few searches and they weren’t obviously terribly broken. And the site is mostly in Chinese, so I wouldn’t really be able to tell anyway.

Just how broken is it and how hard is it going to be to fix it?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 13, 2023, 2:40pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/15 "2023-01-13T14:40:53Z")

</div>

> [@kinetiksoft](#):
>
> We also tried and reproduced the issue in [Safe Mode](https://meta.discourse.org/t/how-to-use-discourse-safe-mode/53504). Should it matter anyway?

[Safe mode](https://meta.discourse.org/t/53504?silent=true) only impacts the client-side. This error is happening on the server. To check whether the error is related to the private replies plugin, you’ll need to uninstall that plugin completely.

> [@kinetiksoft](#):
>
> ```plaintext
> ArgumentError (wrong number of arguments (given 1, expected 0))
> 
> ```

This error does seem likely to be related to a Ruby 3.1 plugin incompatibility

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [January 13, 2023, 2:45pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/16 "2023-01-13T14:45:07Z")

</div>

> [@david](#):
>
> [Safe mode](https://meta.discourse.org/t/how-to-use-discourse-safe-mode/53504) only impacts the client-side. This error is happening on the server. To check whether the error is related to the private replies plugin, you’ll need to uninstall that plugin completely.

then I’m fairly confident it’s the `execute(readonly_mode)` in the plugin (and no clue why 😅 )

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [January 13, 2023, 2:53pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/17 "2023-01-13T14:53:18Z")

</div>

You are right here @Benjamin_D.

That plugin does break search and will trigger the error 500.

But running PostgreSQL 14+ will also break search, but in a more subtly way where a lot of results that would be returned on pg13 won’t return on pg14+.

So @kinetiksoft can remove the plugin and rebuild to get search to not error out, but it won’t work normally still because of pg version.

---

<div class="post-metadata">

### Author: ![kinetiksoft](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kinetiksoft/32/229578_2.png) [@kinetiksoft](https://meta.discourse.org/u/kinetiksoft)
#### Post date: [January 13, 2023, 2:55pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/18 "2023-01-13T14:55:00Z")

</div>

I can now confirm Search works as expected now since we removed [Discourse Private Replies plugin](https://meta.discourse.org/t/discourse-private-replies/146712/48)

No changes were done server-side, the PostgreSQL is still 14.6-1, but we will be looking into downgrading options next week.

Thank you, everyone, you saved our search functionality for this weekend.

P.S. Kindly asking Discourse @ github team to add caution for PostgreSQL version in the official documentation:

> [@Search no longer works after 3.1.0.beta1 update](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/10):
>
> I’ve checked the [discourse/docs/INSTALL.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL.md) documentation instead, as Cloud documentation doesn’t have server requirements at all. We see [“Postgres 13+” requirement here](https://github.com/discourse/discourse/blob/main/docs/INSTALL.md#software-requirements). May I be wrong by suggesting to your team to add a notice that Discourse supports 13.X versions only? Maybe, explicit notice of 14/15/… versions are not supported would be helpful too in such cases like ours. You see, we had Version 14 for at least since December, and we had Stable versio…

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [January 13, 2023, 3:28pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/19 "2023-01-13T15:28:18Z")

</div>

> [@kinetiksoft](#):
>
> P.S. Kindly asking Discourse @ github team to add caution for PostgreSQL version in the official documentation:

Did you check the documentation on running external PostgreSQL? It’s here on Meta, not github. All of the documentation is visible at [Documentation - Discourse Meta](https://meta.discourse.org/docs)

> [@Configure Discourse to use a separate PostgreSQL server](https://meta.discourse.org/t/configure-discourse-to-use-a-separate-postgresql-server/46375):
>
> Let’s say you’re using AWS RDS, or an existing PostgreSQL server managed elsewhere. It’s fairly straightforward to get Discourse to use such a setup, without needing to grant superuser privileges to anything that Discourse itself runs. Here’s how. Prerequisites Discourse requires PostgreSQL’s major version to [match what we ship with in our docker images](https://github.com/discourse/discourse_docker/blob/main/image/base/Dockerfile#L37); if you try to run on a newer or older version, it might work, but we don’t guarantee it, and if something breaks in the future, you get to …

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [January 13, 2023, 3:35pm UTC](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663/20 "2023-01-13T15:35:04Z")

</div>

Sorry all! The private replies plugin was indeed breaking search (or: [Ruby](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) 3.1 was breaking the plugin).  
It’s now working again.

[Next page](https://meta.discourse.org/t/search-no-longer-works-after-3-1-0-beta1-update/251663.md?page=2)
