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
ositories
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:
{“types”:{“_all”:{“enabled”:false,“dynamic”:false},“issueIndexerDocType”:{“enabled”:true,“dynamic”:true,“properties”
:{“Comments”:{“enabled”:true,“dynamic”:true,“fields”:[{“type”:“text”,“index”:true,“include_term_vectors”:true,“docvalues”:tr
ue}]},“Content”:{“enabled”:true,“dynamic”:true,“fields”:[{“type”:“text”,“index”:true,“include_term_vectors”:true,“docvalues”
:true}]},“RepoID”:{“enabled”:true,“dynamic”:true,“fields”:[{“type”:“number”,“store”:true,“index”:true,“docvalues”:true}]},“T
itle”:{“enabled”:true,“dynamic”:true,“fields”:[{“type”:“text”,“index”:true,“include_term_vectors”:true,“docvalues”:true}]}}}
},“default_mapping”:{“enabled”:true,“dynamic”:true},“type_field”:“_type”,“default_type”:“_default”,“default_analyzer”:“issue
Indexer”,“default_datetime_parser”:“dateTimeOptional”,“default_field”:“_all”,“store_dynamic”:true,“index_dynamic”:true,“docv
alues_dynamic”:true,“analysis”:{“token_filters”:{“unicodeNormalize”:{“form”:“nfc”,“type”:“normalize_unicode”}},“analyzers”:{
“issueIndexer”:{“char_filters”:,“token_filters”:[“unicodeNormalize”,“camelCase”,“to_lower”],“tokenizer”:“unicode”,“type”:"
custom"}}}}

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.

2 Likes

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.