<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Latest chatwoot update is breaking the app for me.]]></title><description><![CDATA[<p dir="auto">It seems like it's stuck in starting, not being able to run the DB migration.<br />
1.53.1 worked without problems.</p>
<p dir="auto">Will roll back now, but would be cool if this can get solved soon. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=df184f34222" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
<p dir="auto">Here are the logs:</p>
<pre><code>Jul 21 19:15:51 =&gt; Starting chatwoot
Jul 21 19:15:51 =&gt; Sourcing /app/data/env.sh
Jul 21 19:15:51 =&gt; Upgrading existing db
Jul 21 19:15:58 /root/.rbenv/versions/3.4.4/lib/ruby/gems/3.4.0/gems/reline-0.3.6/lib/reline/terminfo.rb:2: warning: /root/.rbenv/versions/3.4.4/lib/ruby/3.4.0/fiddle.rb was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
Jul 21 19:15:58 You can add fiddle to your Gemfile or gemspec to silence this warning.
Jul 21 19:15:58 Also please contact the author of reline-0.3.6 to request adding fiddle into its gemspec.
Jul 21 19:15:59 W, [2026-07-21T16:15:59.308574 #11]  WARN -- :
Jul 21 19:15:59 !!! RubyLLM's legacy acts_as API is deprecated and will be removed in RubyLLM 2.0.0. Please consult the migration guide at https://rubyllm.com/upgrading-to-1-7/
Jul 21 19:15:59 2026-07-21T16:15:59Z 
Jul 21 19:15:59 I, [2026-07-21T16:15:59.632637 #11]  INFO -- : [rake ip_lookup:setup] IP_LOOKUP_API_KEY empty. Skipping geoip database setup
Jul 21 19:16:00 =&gt; Healthcheck error: Error: connect ECONNREFUSED 172.18.19.134:3000
Jul 21 19:16:00 I, [2026-07-21T16:16:00.165470 #11]  INFO -- : Migrating to AddInboxScopeToEmailTemplates (20260706000000)
Jul 21 19:16:00 == 20260706000000 AddInboxScopeToEmailTemplates: migrating ====================
Jul 21 19:16:00 -- add_column(:email_templates, :inbox_id, :integer)
Jul 21 19:16:00 -&gt; 0.0038s
Jul 21 19:16:00 -- add_index(:email_templates, :inbox_id, {name: "index_email_templates_on_inbox_id"})
Jul 21 19:16:00 -&gt; 0.0050s
Jul 21 19:16:00 -- remove_index(:email_templates, {name: "index_email_templates_on_name_and_account_id"})
Jul 21 19:16:00 bin/rails aborted!
Jul 21 19:16:00 StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
Jul 21 19:16:00 2026-07-21T16:16:00Z 
Jul 21 19:16:00 PG::UndefinedObject: ERROR:  index "index_email_templates_on_name_and_account_id" does not exist
Jul 21 19:16:00 /app/code/db/migrate/20260706000000_add_inbox_scope_to_email_templates.rb:6:in 'AddInboxScopeToEmailTemplates#up'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:26:in 'block (3 levels) in &lt;main&gt;'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:18:in 'Array#each'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:18:in 'block (2 levels) in &lt;main&gt;'
Jul 21 19:16:00 2026-07-21T16:16:00Z 
Jul 21 19:16:00 Caused by:
Jul 21 19:16:00 ActiveRecord::StatementInvalid: PG::UndefinedObject: ERROR:  index "index_email_templates_on_name_and_account_id" does not exist (ActiveRecord::StatementInvalid)
Jul 21 19:16:00 /app/code/db/migrate/20260706000000_add_inbox_scope_to_email_templates.rb:6:in 'AddInboxScopeToEmailTemplates#up'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:26:in 'block (3 levels) in &lt;main&gt;'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:18:in 'Array#each'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:18:in 'block (2 levels) in &lt;main&gt;'
Jul 21 19:16:00 2026-07-21T16:16:00Z 
Jul 21 19:16:00 Caused by:
Jul 21 19:16:00 PG::UndefinedObject: ERROR:  index "index_email_templates_on_name_and_account_id" does not exist (PG::UndefinedObject)
Jul 21 19:16:00 /app/code/db/migrate/20260706000000_add_inbox_scope_to_email_templates.rb:6:in 'AddInboxScopeToEmailTemplates#up'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:26:in 'block (3 levels) in &lt;main&gt;'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:18:in 'Array#each'
Jul 21 19:16:00 /app/code/lib/tasks/db_enhancements.rake:18:in 'block (2 levels) in &lt;main&gt;'
Jul 21 19:16:00 Tasks: TOP =&gt; db:migrate
Jul 21 19:16:00 (See full trace by running task with --trace)
</code></pre>
]]></description><link>https://forum.cloudron.io/topic/15723/latest-chatwoot-update-is-breaking-the-app-for-me.</link><generator>RSS for Node</generator><lastBuildDate>Sun, 02 Aug 2026 16:03:22 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15723.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Jul 2026 16:16:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Fri, 24 Jul 2026 17:14:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a> one line at a time didn't work nor pasting it whole. I pasted them one section at a time and that worked. The "export" lines were done one at a time though. But the "echo" ones had to be as one. e.g.</p>
<pre><code>echo "Checking for duplicate email templates..."
psql "$CLOUDRON_POSTGRESQL_URL" -v ON_ERROR_STOP=1 -c "
SELECT name, template_type, locale, account_id, inbox_id, COUNT(*)
FROM email_templates
GROUP BY name, template_type, locale, account_id, inbox_id
HAVING COUNT(*) &gt; 1;
"
</code></pre>
<p dir="auto">This was pasted in one go.</p>
]]></description><link>https://forum.cloudron.io/post/127169</link><guid isPermaLink="true">https://forum.cloudron.io/post/127169</guid><dc:creator><![CDATA[humpty]]></dc:creator><pubDate>Fri, 24 Jul 2026 17:14:43 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Fri, 24 Jul 2026 17:12:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/humpty" aria-label="Profile: humpty">@<bdi>humpty</bdi></a> You need to update it first, then follow those steps. In theory the entire code copied and pasted into the terminal should work, but you can also paste them line by line. Unfortunately I can't test this.</p>
]]></description><link>https://forum.cloudron.io/post/127168</link><guid isPermaLink="true">https://forum.cloudron.io/post/127168</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Fri, 24 Jul 2026 17:12:25 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Fri, 24 Jul 2026 17:13:07 GMT]]></title><description><![CDATA[<p dir="auto">My attempts didn't work as the app didn't want to start.</p>
<p dir="auto"><s>1- Should the app be updated to the broken 1.54 or stick with the working 1.53.1?<br />
2- Should I paste the entire code above in one-shot? If not, then my other attempt by pasting one line at a time didn't work either? I'll try pasting in sections as they're pasted above.</s></p>
<p dir="auto">Fixed.</p>
<p dir="auto">To answer my own questions.<br />
1- Yes, apply the code to broken package 1.54.<br />
2- Apply code one section at a time.</p>
<p dir="auto">App package 1.54.0 now starts as it should. Thank you <a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a></p>
]]></description><link>https://forum.cloudron.io/post/127167</link><guid isPermaLink="true">https://forum.cloudron.io/post/127167</guid><dc:creator><![CDATA[humpty]]></dc:creator><pubDate>Fri, 24 Jul 2026 17:13:07 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Fri, 24 Jul 2026 16:55:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/humpty" aria-label="Profile: humpty">@<bdi>humpty</bdi></a> Here this should work:</p>
<ol>
<li>create backup of chatwoot in case something goes bad</li>
<li>put app into recovery mode</li>
<li>enter web terminal and enter</li>
</ol>
<pre><code>set -euo pipefail

source /app/data/env.sh

export FRONTEND_URL="${CLOUDRON_APP_ORIGIN}"
export REDIS_URL="redis://${CLOUDRON_REDIS_HOST}:${CLOUDRON_REDIS_PORT}"
export REDIS_PASSWORD="${CLOUDRON_POSTGRESQL_PASSWORD}"
export POSTGRES_DATABASE="${CLOUDRON_POSTGRESQL_DATABASE}"
export POSTGRES_USERNAME="${CLOUDRON_POSTGRESQL_USERNAME}"
export POSTGRES_PASSWORD="${CLOUDRON_POSTGRESQL_PASSWORD}"
export POSTGRES_HOST="${CLOUDRON_POSTGRESQL_HOST}"
export POSTGRES_PORT="${CLOUDRON_POSTGRESQL_PORT}"
export RAILS_ENV=production

echo "Checking for duplicate email templates..."
psql "$CLOUDRON_POSTGRESQL_URL" -v ON_ERROR_STOP=1 -c "
SELECT name, template_type, locale, account_id, inbox_id, COUNT(*)
FROM email_templates
GROUP BY name, template_type, locale, account_id, inbox_id
HAVING COUNT(*) &gt; 1;
"

echo "Creating missing legacy index if needed..."
psql "$CLOUDRON_POSTGRESQL_URL" -v ON_ERROR_STOP=1 -c "
CREATE UNIQUE INDEX IF NOT EXISTS index_email_templates_on_name_and_account_id
ON email_templates (name, account_id);
"

echo "Running Chatwoot database migrations..."
cd /app/code
bundle exec rails db:migrate

echo "Done. Now disable Recovery Mode / Debug Mode and restart the app."
</code></pre>
<ol start="4">
<li>when prompted, take app out of recovery mode</li>
</ol>
]]></description><link>https://forum.cloudron.io/post/127165</link><guid isPermaLink="true">https://forum.cloudron.io/post/127165</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Fri, 24 Jul 2026 16:55:42 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Fri, 24 Jul 2026 16:37:37 GMT]]></title><description><![CDATA[<p dir="auto">I have a 2 year old installation with the same issue. I'm not sure how to do the CLI thing. Initially, I tried the code in terminal and in putty <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f926.png?v=df184f34222" class="not-responsive emoji emoji-android emoji--face_palm" style="height:23px;width:auto;vertical-align:middle" title="🤦" alt="🤦" />totally missing Kinzi's note at first. I'll just revert and wait for a proper package.</p>
]]></description><link>https://forum.cloudron.io/post/127164</link><guid isPermaLink="true">https://forum.cloudron.io/post/127164</guid><dc:creator><![CDATA[humpty]]></dc:creator><pubDate>Fri, 24 Jul 2026 16:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Wed, 22 Jul 2026 02:42:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/joseph" aria-label="Profile: joseph">@<bdi>joseph</bdi></a>  overall the upstream project does not seem to be very good with database topics. I recently wanted to create some workflows in my older installation and first needed to fix some indexes as well before the app responded successfully.</p>
<p dir="auto">My installation ran into this upgrade issue as well, thanks for the commands. Instead of running the last database migrations myself I just disabled the recovery mode and restarted the app.</p>
]]></description><link>https://forum.cloudron.io/post/127040</link><guid isPermaLink="true">https://forum.cloudron.io/post/127040</guid><dc:creator><![CDATA[fbartels]]></dc:creator><pubDate>Wed, 22 Jul 2026 02:42:31 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Tue, 21 Jul 2026 21:47:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kinzi" aria-label="Profile: Kinzi">@<bdi>Kinzi</bdi></a> yes forgot to look up the correct Postgres ENV lol</p>
]]></description><link>https://forum.cloudron.io/post/127038</link><guid isPermaLink="true">https://forum.cloudron.io/post/127038</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Tue, 21 Jul 2026 21:47:41 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Tue, 21 Jul 2026 21:47:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joseph" aria-label="Profile: joseph">@<bdi>joseph</bdi></a> not sure, seems to only affect installations of a certain age. I guess upstream or Cloudron could do what I did manually. But unless more people will reach out this is an isolated issue.</p>
]]></description><link>https://forum.cloudron.io/post/127037</link><guid isPermaLink="true">https://forum.cloudron.io/post/127037</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Tue, 21 Jul 2026 21:47:16 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Tue, 21 Jul 2026 19:05:15 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a> this worked!</p>
<p dir="auto">Needed a minute to figure the CLI part out as I hadn't used that before (it's on your machine not on the server or the app container for everybody else)</p>
<p dir="auto">Also make sure to fill in the password env var names in step 4. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=df184f34222" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.cloudron.io/post/127035</link><guid isPermaLink="true">https://forum.cloudron.io/post/127035</guid><dc:creator><![CDATA[Kinzi]]></dc:creator><pubDate>Tue, 21 Jul 2026 19:05:15 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Tue, 21 Jul 2026 18:02:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a> so, is this an upstream bug?</p>
]]></description><link>https://forum.cloudron.io/post/127034</link><guid isPermaLink="true">https://forum.cloudron.io/post/127034</guid><dc:creator><![CDATA[joseph]]></dc:creator><pubDate>Tue, 21 Jul 2026 18:02:06 GMT</pubDate></item><item><title><![CDATA[Reply to Latest chatwoot update is breaking the app for me. on Fri, 24 Jul 2026 16:55:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kinzi" aria-label="Profile: Kinzi">@<bdi>Kinzi</bdi></a></p>
<p dir="auto">Hit the exact same issue yesterday — same migration, same error. Root cause: the 1.54.0 migration <code>AddInboxScopeToEmailTemplates</code> tries to drop the index <code>index_email_templates_on_name_and_account_id</code>, but on instances installed at certain older Chatwoot versions that index never existed. Postgres throws <code>PG::UndefinedObject</code>, and since <code>db:migrate</code> runs on every boot, the app is stuck in a restart loop. (Upstream bug — the migration should use <code>if_exists: true</code>.)</p>
<p dir="auto">Fix without rolling back (no data is touched — you just create the index so the migration can drop it):</p>
<p dir="auto"><strong>1. Stop the crash loop:</strong></p>
<pre><code>cloudron debug --app &lt;chatwoot-app-id&gt;
</code></pre>
<p dir="auto"><strong>2. Safety check — make sure there are no duplicate email templates</strong> (the migration later adds unique indices that would fail on duplicates):</p>
<pre><code>cloudron exec --app &lt;app-id&gt; -- bash -c \
  'psql "$CLOUDRON_POSTGRESQL_URL" -c "SELECT name, template_type, locale, account_id, COUNT(*) FROM email_templates GROUP BY 1,2,3,4 HAVING COUNT(*)&gt;1;"'
</code></pre>
<p dir="auto">Expected: <code>(0 rows)</code>. If you get rows, dedupe first.</p>
<p dir="auto"><strong>3. Create the missing index:</strong></p>
<pre><code>cloudron exec --app &lt;app-id&gt; -- bash -c \
  'psql "$CLOUDRON_POSTGRESQL_URL" -c "CREATE UNIQUE INDEX index_email_templates_on_name_and_account_id ON email_templates (name, account_id);"'
</code></pre>
<p dir="auto"><strong>4. Run the migration manually</strong> (in debug mode the start script hasn't populated the Rails env, so map the Cloudron addon vars):</p>
<pre><code>cloudron exec --app &lt;app-id&gt; -- bash -c '
  export POSTGRES_DATABASE="$CLOUDRON_POSTGRESQL_DATABASE" \
         POSTGRES_USERNAME="$CLOUDRON_POSTGRESQL_USERNAME" \
         POSTGRES_PASSWORD="${CLOUDRON_POSTGRESQL_PASSWORD}" \
         POSTGRES_HOST="$CLOUDRON_POSTGRESQL_HOST" \
         POSTGRES_PORT="$CLOUDRON_POSTGRESQL_PORT" \
         REDIS_URL="redis://$CLOUDRON_REDIS_HOST:$CLOUDRON_REDIS_PORT" \
         REDIS_PASSWORD="${CLOUDRON_POSTGRESQL_PASSWORD}" \
         RAILS_ENV=production
  source /app/data/env.sh
  cd /app/code &amp;&amp; bin/rails db:migrate'
</code></pre>
<p dir="auto">Watch for <code>AddInboxScopeToEmailTemplates: migrated</code> — the remaining pending migrations run right after.</p>
<p dir="auto"><strong>5. Leave debug mode:</strong></p>
<pre><code>cloudron debug --app &lt;app-id&gt; --disable
</code></pre>
<p dir="auto">App should be back within ~30s. Rolling back to 1.53.1 only postpones this — it'll hit again on the next update until the package/upstream guards the <code>remove_index</code> with <code>if_exists: true</code>.</p>
]]></description><link>https://forum.cloudron.io/post/127030</link><guid isPermaLink="true">https://forum.cloudron.io/post/127030</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Fri, 24 Jul 2026 16:55:59 GMT</pubDate></item></channel></rss>