Gitea crashes on startup after upgrade from 18.3 to 19.3

I upgraded my personal Gitea (installed on Ubuntu 22.04, using PostgreSQL 14) from 18.3 to 19.3, and Gitea now crashes on startup, exiting with code 1.

Figuring that it might have messed up the database, I pulled that morning’s database from backup and reverted back to 18.3. I’m now getting the same problem.

A check on /var/lib/gitea/log/gitea.log shows this at the point where gitea crashes:

2023/06/13 21:25:46 …xer/stats/indexer.go:39:populateRepoIndexer() [I] Populating the repo stats indexer with existing rep
2023/06/13 21:25:46 …er/issues/indexer.go:191:func2() [F] [6489171a-3] Unable to initialize Bleve Issue Indexer at path: /
var/lib/gitea/data/indexers/issues.bleve Error: error parsing mapping JSON: error building analyzer: no token filter with na
me or type ‘camelCase’ registered
mapping contents:

Any idea what I can do to fix this?

I’m holding off on upgrading the work Gitea site until I’m sure that it wasn’t the upgrade to 19.3 that caused this.

A very similar issue was raised on discord recently and the advice was to backup the bleve cache and restart.
Everything worked

Actually, that message is showing that it didn’t work.

In my case, moving the bleve cache elsewhere and restarting Gitea brought it back, but only if I move back to 18.3. Upgrading to 19.3 results in the same crash on the bleve cache, and removing the cache and restarting Gitea does not work on 19.3. I have to revert to 18.3 to get Gitea to work.

Look closer at the new error, it might be pointing to a different file this time

This is the 2nd half of the conv where the OP did say it didn’t work (one file moved)

That worked for getting back to working on 1.18.3. Trying again to get back to working on 1.19.3 now gives me the error:

2023/06/23 17:07:08 …rvices/cron/tasks.go:199:RegisterTaskFatal() [F] [6496097b-17] Unable to register cron task gc_lfs Error: translation is missing for task “gc_lfs”, please add translation for “admin.dashboard.gc_lfs”

See this post Problems moving gitea instance to new server - #8 by wxiaoguang on how to resolve that error.

1 Like

I got this figured out. At some point I investigated customization, and had left the options/locale/locale_en-US.ini file in the custom directory. I’m assuming that admin.dashboard.gc_lfs is removed in versions later than 18.3, so the locale_en-US.ini (from 18.3 or earlier) no longer matched the program. I removed the locale_en-US.ini file and Gitea works again.

You can remove all removed translations from your customized translation file. I think then it will work.