Importing Vikunja export reports "invalid memory address or nil pointer dereference goroutine 400"

I’m uploading a 144MB export from a self-hosted Vikunja instance, both running what was, as of a few hours ago, the latest unstable: frontend 0.21.0+2-c4976b6a22 and API Version: v0.21.0.

This is what the logs have to say for themselves:

proxy_1     | 2024/01/14 10:10:04 [warn] 21#21: *314 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000002, client:, server: , request: "PUT /api/v1/migration/vikunja-file/migrate HTTP/1.1", host: "", referrer: ""
[Removing a bunch seemingly unremarkable of calls to /api/v1/notifications]
api_1       | 2024-01-14T10:10:24.877916346Z: DEBUG	▶ vikunja-file/Migrate 11c [Vikunja File Import] Importing a zip file containing 307 files
api_1       | 2024-01-14T10:10:24.88311893Z: DEBUG	▶ vikunja-file/Migrate 11d [Vikunja File Import] Found a data file
api_1       | 2024-01-14T10:10:24.883819024Z: DEBUG	▶ vikunja-file/Migrate 11e [Vikunja File Import] Found a blob file
[It found a bunch of blob files - those lines removed for brevity]
api_1       | 2024-01-14T10:10:24.997621013Z: DEBUG	▶ vikunja-file/Migrate 24e [Vikunja File Import] Found a blob file
api_1       | 2024-01-14T10:10:24.997874193Z: DEBUG	▶ vikunja-file/Migrate 24f [Vikunja File Import] Found a filter file
api_1       | 2024-01-14T10:10:24.998363501Z: DEBUG	▶ vikunja-file/Migrate 250 [Vikunja File Import] 
api_1       | 2024-01-14T10:10:25.011679123Z: - 	▶ echo recover.go:120 [PANIC RECOVER] runtime error: invalid memory address or nil pointer dereference goroutine 420 [running]:
api_1       |
api_1       | 	/go/pkg/mod/ +0x150
api_1       | panic({0x159bb60?, 0x255f6a0?})
api_1       | 	/usr/local/go/src/runtime/panic.go:914 +0x21f
api_1       | archive/zip.(*File).findBodyOffset(0x0)
api_1       | 	/usr/local/go/src/archive/zip/reader.go:340 +0x2f
api_1       | archive/zip.(*File).Open(0x0)
api_1       | 	/usr/local/go/src/archive/zip/reader.go:218 +0x27
api_1       |*FileMigrator).Migrate(0x7f2b09032340?, 0x2714f80?, {0x1b88620?, 0xc00004c4e8?}, 0x1?)
api_1       | 	/go/src/ +0x69f
api_1       |*FileMigratorWeb).Migrate(0xa6f300?, {0x1bb2000, 0xc0005b4000})
api_1       | 	/go/src/ +0x173
api_1       |{0x1bb2000, 0xc0005b4000})
api_1       | 	/go/pkg/mod/ +0x40d
api_1       |{0x1bb2000, 0xc0005b4000})
api_1       | 	/go/src/ +0x1bd
api_1       |*Echo).add.func1({0x1bb2000, 0xc0005b4000})
api_1       | 	/go/pkg/mod/ +0x4b
api_1       |{0x1bb2000, 0xc0005b4000})
api_1       | 	/go/pkg/mod/ +0x883
api_1       |{0x1bb2000?, 0xc0005b4000})
api_1       | 	/go/pkg/mod/ +0x11d
api_1       |{0x1bb2000?, 0xc0005b4000})
api_1       | 	/go/pkg/mod/ +0xd2
api_1       |*Echo).ServeHTTP(0xc000476000, {0x1b90990?, 0xc00013cb60}, 0xc00016f900)
api_1       | 	/go/pkg/mod/ +0x399
api_1       | net/http.serverHandler.ServeHTTP({0x1b8cc20?}, {0x1b90990?, 0xc00013cb60?}, 0x6?)
api_1       | 	/usr/local/go/src/net/http/server.go:2938 +0x8e
api_1       | net/http.(*conn).serve(0xc00046f8c0, {0x1b932c8, 0xc000304330})
api_1       | 	/usr/local/go/src/net/http/server.go:2009 +0x5f4
api_1       | created by net/http.(*Server).Serve in goroutine 259
api_1       | 	/usr/local/go/src/net/http/server.go:3086 +0x5cb
api_1       | 
api_1       | goroutine 1 [chan receive, 2 minutes]:
api_1       |, {0x174e416?, 0x4?, 0x174e41a?})
api_1       | 	/go/src/ +0x15d
api_1       |*Command).execute(0x2578780, {0xc0000400a0, 0x0, 0x0})
api_1       | 	/go/pkg/mod/ +0xaa3
api_1       |*Command).ExecuteC(0x2578780)
api_1       | 	/go/pkg/mod/ +0x3ff
api_1       |*Command).Execute(...)
api_1       | 	/go/pkg/mod/
api_1       |
api_1       | 	/go/src/ +0x1a
api_1       | main.main()
api_1       | 	/go/src/ +0xf
api_1       | 
api_1       | goroutine 9 [select, 2 minutes]:
api_1       | database/sql.(*DB).connectionOpener(0xc0002164e0, {0x1b93300, 0xc0001669b0})
api_1       | 	/usr/local/go/src/database/sql/sql.go:1218 +0x87
api_1       | created by database/sql.OpenDB in goroutine 1
api_1       | 	/usr/local/go/src/database/sql/sql.go:791 +0x165
api_1       | 
api_1       | goroutine 14 [select]:
api_1       | database/sql.(*DB).connectionCleaner(0xc0002164e0, 0x1c?)
api_1       | 	/usr/local/go/src/database/sql/sql.go:1061 +0x9c
api_1       | created by database/sql.(*DB).startCleanerLocked in goroutine 1
api_1       | 	/usr/local/go/src/database/sql/sql.go:1048 +0x105
api_1       | 
api_1       | goroutine 15 [select, 2 minutes]:
api_1       |*Cron).run(0xc000219540)
api_1       | 	/go/pkg/mod/ +0xa7d
api_1       | created by*Cron).Start in goroutine 1
api_1       | 	/go/pkg/mod/ +0xc5
api_1       | 
api_1       | goroutine 16 [chan receive, 2 minutes]:
api_1       |*Router).Run(0xc00013c7e0, {0x1b92dc0?, 0x2714f80?})
api_1       | 	/go/pkg/mod/!three!dots!labs/watermill@v1.3.5/message/router.go:374 +0x2c9
api_1       |
api_1       | 
api_1       | 2024-01-14T10:10:25.015025765Z: WEB 	▶  PUT 500 /api/v1/migration/vikunja-file/migrate 1.761910795s - Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0

The only similar error I found on the message boards (Vikunja data import on self-hosted install gets a 502 Bad Gateway - #8 by kolaente) was posted by me, but it turned out to be a version issue between the two servers. Since both servers on this occasion are running the same versions, I’m not inclined to believe this has the same cause.

In case it makes any difference: I’m spinning up a new instance because my existing instance is on a version of Ubuntu that’s been EOL’d. Installing new Vikunja seemed like less trouble than upgrading given that the repos are retired.

Let me know if you have any ideas. Thanks for your help! And thanks for a great piece of software!

Are you trying to port a vikunja data export created via the web ui or a vikunja dump from the CLI?

From the web. Should I create one from the CLI?

You could try that as a workaround, this seems to be a bug though. I’ll take a look.

Can you check if the export zip archive has a VERSION file?

There isn’t a VERSION file.

I was able to successfully import my data with vikunja dump/restore

Shall I mark this solved or do you want to keep it open while you investigate the issue I originally encountered?

Thanks for your help!

There should be one - looks like a bug. I’ll take a look.

Does it work with an export created from an unstable build? (Can be try)