# Stumped about ./launcher rebuild app error (Process::Status: pid 2096)

**URL:** https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876
**Category:** Support
**Created:** [October 31, 2024, 5:02pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876 "2024-10-31T17:02:08Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 5:02pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/1 "2024-10-31T17:02:08Z")

</div>

Today upon ./launcher rebuild app command (for no reason I could find) I get this error (also, this is after I have disabled all plugins in the app.yml file)… I would sure appreciate any help with this!

[error-log\_2024-10-31\_1.txt](https://meta.discourse.org/uploads/short-url/mnh8wFuZrq2oqofRzi8ipwsMMLY.txt) (44.1 KB)

ending with…

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 2096 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
**FAILED TO BOOTSTRAP**

```

---

<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: [October 31, 2024, 5:13pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/2 "2024-10-31T17:13:32Z")

</div>

The relevant part of the log is

```plaintext
undefined method `+' for nil
/var/www/discourse/db/migrate/20241025045928_add_invites_link_to_sidebar.rb:44:in `up'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.2/lib/active_record/migration.rb:989:in `public_send'

```

So it seems related to [FEATURE: Add invite link to the sidebar (#29448) · discourse/discourse@19672fa · GitHub](https://github.com/discourse/discourse/commit/19672faba6a2b7a6865c4095df1d1a3923bdbfda) (cc @osama)

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 5:15pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/3 "2024-10-31T17:15:58Z")

</div>

Thanks much (and for the explanation), I saw that too, and wondered if it was that!

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [October 31, 2024, 6:02pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/4 "2024-10-31T18:02:50Z")

</div>

@denvergeeks I’m going to fix the migration, but I’m a bit curious about how your site got into this state. What does the sidebar look like in your site? Have you deleted all links in the default sidebar from the database?

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 6:14pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/5 "2024-10-31T18:14:23Z")

</div>

Sure – I don’t have a screenshot of the sidebar or the site, but nothing is modified except adding some basic menu items in the more…

It’s just one of my (non-public) personal research Discourse instances so I could help debug if you tell me what you want me to do in the command line. (I have my own dedicated server if it helps.)

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [October 31, 2024, 6:37pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/6 "2024-10-31T18:37:36Z")

</div>

Can you tell me what the following queries output in your database?

```sql
SELECT id FROM sidebar_sections WHERE section_type = 0;

```

```sql
SELECT linkable_type, linkable_id, position FROM sidebar_section_links WHERE sidebar_section_id IN (SELECT id FROM sidebar_sections WHERE section_type = 0);

```

```sql
SELECT id, segment FROM sidebar_urls WHERE id IN (SELECT linkable_id FROM sidebar_section_links WHERE sidebar_section_id IN (SELECT id FROM sidebar_sections WHERE section_type = 0));

```

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 6:47pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/7 "2024-10-31T18:47:34Z")

</div>

I sure can - could you please provide the commands from the start/prompt? (I am root user)

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [October 31, 2024, 6:54pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/8 "2024-10-31T18:54:08Z")

</div>

I can’t tell the exact command(s) off of the top of my head, but I’ve looked around here in Meta and I think these will work:

```plaintext
./launcher enter app
su postgres
psql

```

After the `psql` command, you should be able to paste the queries and run them to see their results. Let me know if the commands don’t work.

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 6:55pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/9 "2024-10-31T18:55:15Z")

</div>

> [@Osama](#):
>
> ```plaintext
> ./launcher enter app
> su postgres
> psql
> 
> ```

```plaintext
root@JEN /var/discourse # ./launcher enter app101
su postgres
psql
x86_64 arch detected.
Error response from daemon: container 8ee36bdfa85b786ea149e6714f65048e136091fe31be2f5425be5fe04a852729 is not running
su: user postgres does not exist or the user entry does not contain all the required fields
Command 'psql' not found, but can be installed with:
apt install postgresql-client-common

```

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [October 31, 2024, 7:08pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/10 "2024-10-31T19:08:08Z")

</div>

Hmm it looks like your container is not running. Is your site down at the moment? Try:

```plaintext
./launcher start app101

```

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 7:12pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/11 "2024-10-31T19:12:29Z")

</div>

```plaintext
root@JEN /var/discourse # ./launcher start app101
x86_64 arch detected.

starting up existing container
+ /usr/bin/docker start app101
app101
root@JEN /var/discourse # ./launcher enter app101
su postgres
psql
x86_64 arch detected.
root@JEN-app101:/var/www/discourse# SELECT id FROM sidebar_sections WHERE section_type = 0;
bash: SELECT: command not found
root@JEN-app101:/var/www/discourse#

```

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 7:16pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/12 "2024-10-31T19:16:13Z")

</div>

Site is started and here is the sidebar and …more items

## ![Screenshot 2024-10-31 131354](https://global.discourse-cdn.com/meta/original/4X/7/7/9/7799bfe27e4024205cc8d826b29b1916717cdc47.jpeg)

 ![Screenshot 2024-10-31 131447](https://global.discourse-cdn.com/meta/original/4X/e/7/9/e79982074f1c00dd6c32240a22ef52c08599bf96.jpeg)

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [October 31, 2024, 7:18pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/13 "2024-10-31T19:18:02Z")

</div>

Ok, it makes sense now. The migration expects at least 1 link outside `... more`, but you have none so it blows up. I’ll update the migration so it accounts for this case.

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 7:18pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/14 "2024-10-31T19:18:10Z")

</div>

I got the same error (and stopped container) on one of my other sites as well. (But not on some other sites.)

**Edit:** Yes so that one other site (where I found the same behavior) also has no link outside the `... more`

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [October 31, 2024, 7:43pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/15 "2024-10-31T19:43:41Z")

</div>

So are we done?

 ![The image depicts a young boy with short dark hair, wearing a light green shirt. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/d/7/f/d7f63218a35b35b984d18f7846e744aca2207625.jpeg) ![The image is a blurry, low-resolution photograph of a young child's face, with the child looking directly at the camera and smiling. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/d/f/b/dfb3dc8a978e3236601dbc8ce70c6ddeff7dae5c.jpeg)

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [October 31, 2024, 10:28pm UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/16 "2024-10-31T22:28:30Z")

</div>

Sorry @denvergeeks, something personal urgent came up and I had to go AFK for a couple of hours. I’ve prepared a PR with a fix:

[https://github.com/discourse/discourse/pull/29535](https://github.com/discourse/discourse/pull/29535)

I’ll let you know when it’s merged and hits tests-passed.

---

<div class="post-metadata">

### Author: ![Osama](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osama/32/98013_2.png) [@Osama](https://meta.discourse.org/u/Osama)
#### Post date: [November 1, 2024, 7:50am UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/17 "2024-11-01T07:50:05Z")

</div>

@denvergeeks, the fix has made it to the tests-passed branch. If you rebuild again now it should succeed.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 1, 2024, 7:50am UTC](https://meta.discourse.org/t/stumped-about-launcher-rebuild-app-error-process-pid-2096/333876/18 "2024-12-01T07:50:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
