Crash After Install

I cannot find others with this issue.

Gogs Version: 594a2dc41f6e70f0cc535b125316d05e12666fda
System: Debian 10 (Buster)
Database: mariadb Ver 15.1 Distrib 10.3.23-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

After build, everything worked great. I went through the install process on http://localhost:3000, and then immediately I was greeted with a 404 error. The log had my git version, and many blank lines in it. Upon restart, I get this stacktrace:

[email protected]:~/gogs$ ./gogs web
2020/09/12 00:47:28 [TRACE] Log mode: File (Info)
panic: interface conversion: interface {} is *sql.Rows, not *sql.Row

goroutine 1 [running]:
gorm.io/gorm.(*DB).Row(0xc00034c3f0, 0x1660520)
        /home/git/go/pkg/mod/gorm.io/[email protected]/finisher_api.go:336 +0xd0
gorm.io/gorm/migrator.Migrator.CurrentDatabase(0xc00034d300, 0xc00034c3f0, 0x2136580, 0xc000351590, 0xc000351590, 0xc000351590)
        /home/git/go/pkg/mod/gorm.io/[email protected]/migrator/migrator.go:573 +0x7d
gorm.io/gorm/migrator.Migrator.HasTable.func1(0xc0006151e0, 0x140fb20, 0xc0003508c0)
        /home/git/go/pkg/mod/gorm.io/[email protected]/migrator/migrator.go:239 +0x71
gorm.io/gorm/migrator.Migrator.RunWithValue(0x1446500, 0xc00034c3f0, 0x2136580, 0xc000351590, 0x140fb20, 0xc0003508c0, 0xc0005ace68, 0x411b98, 0x161ba80)
        /home/git/go/pkg/mod/gorm.io/[email protected]/migrator/migrator.go:44 +0xb3
gorm.io/gorm/migrator.Migrator.HasTable(0x2140d00, 0xc00034c3f0, 0x2136580, 0xc000351590, 0x140fb20, 0xc0003508c0, 0xc000351590)
        /home/git/go/pkg/mod/gorm.io/[email protected]/migrator/migrator.go:238 +0xda
gogs.io/gogs/internal/db.Init(0xc00034c000, 0xc00019a9bf, 0x1)
        /home/git/gogs/internal/db/db.go:202 +0x378
gogs.io/gogs/internal/db.SetEngine(0x2d3a510, 0x2d0b43c, 0x1f3a0e0)
        /home/git/gogs/internal/db/models.go:159 +0x64e
gogs.io/gogs/internal/db.NewEngine(0xc0000705c0, 0x0)
        /home/git/gogs/internal/db/models.go:163 +0x26
gogs.io/gogs/internal/route.GlobalInit(0x0, 0x0, 0xc0005a4de0, 0x0)
        /home/git/gogs/internal/route/install.go:74 +0x7cf
gogs.io/gogs/internal/cmd.runWeb(0xc0000a7340, 0x0, 0xc0003876e0)
        /home/git/gogs/internal/cmd/web.go:159 +0x77
github.com/urfave/cli.HandleAction(0x1461000, 0x1f37360, 0xc0000a7340, 0xc0000a7340, 0x0)
        /home/git/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x11a
github.com/urfave/cli.Command.Run(0x164578c, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x165e15e, 0x10, 0x0, ...)
        /home/git/go/pkg/mod/github.com/urfave/[email protected]/command.go:174 +0x57a
github.com/urfave/cli.(*App).Run(0xc000227c00, 0xc00000e060, 0x2, 0x2, 0x0, 0x0)
        /home/git/go/pkg/mod/github.com/urfave/[email protected]/app.go:279 +0x7c7
main.main()
        /home/git/gogs/gogs.go:39 +0x27a

Should I file an issue report, or is there an issue with my configuration?

The issue is clearly with interface conversion: interface {} is *sql.Rows, not *sql.Row, but I’m not familiar enough with the DB driver to understand why that happened.

Here’s the tail of the log I got on first run, it’s warning about the database, perhaps I configured something incorrectly?

Hi, I think this might be a bug in the GORM. I just did a upgrade of this dependency today to the main branch, would you mind upgrade and see if continue failing?