Summary
Error importing .zip during migration from Cloud Free to Azure VM (using bitnami).
Steps to reproduce
Reproduction might be a bit complicated since you do not have our data… well, you mattermost team actually do, since it is in your Cloud server. Followed instructions from Mattermost workspace migration — Mattermost documentation and after some hiccups, it got stuck in the next command:
mmctl import process 6hs5o4r4zf8tjgz5wg33h1o8xc_963zj1eo5tyy7pmzg9tohuqofc_export.zip
mmctl:
Version: v7.8.1
GitCommit: 5d7058cf9320523700688f8d2161ca5c3a454d49
GitTreeState: "clean"
BuildDate: 2023-02-16T10:15:09Z
GoVersion: go1.18.1
Compiler: gc
Platform: linux/amd64
Expected behavior
Expected the command above to work to continue to last one: mmctl extract run
… and have all my channels and content available in a local Azure VM.
Observed behavior
There are a lot of errors in the log but it ends with:
{"timestamp":"2023-06-13 14:51:03.672 Z","level":"error","msg":"Error attaching files to post.","caller":"app/import_functions.go:1628","post_id":"nm4z68fk4pg8zcxksad9pqwebc","post_file_ids":["t41er1zxk3gffbubezkeb1bucc","9nm47r68dbf85fqhjh4e8xhc4r","kwe9omr9mjg1pn7b7bbp8q9yqo"],"error":"invalid input: entity: FileInfo field: <id, postId, creatorId> value: <t41er1zxk3gffbubezkeb1bucc, nm4z68fk4pg8zcxksad9pqwebc, gmejfnzmkjnt5b5xsynphfkfuo>"}
{"timestamp":"2023-06-13 14:51:03.672 Z","level":"error","msg":"Error attaching files to post.","caller":"app/import_functions.go:1628","post_id":"nm4z68fk4pg8zcxksad9pqwebc","post_file_ids":["t41er1zxk3gffbubezkeb1bucc","9nm47r68dbf85fqhjh4e8xhc4r","kwe9omr9mjg1pn7b7bbp8q9yqo"],"error":"invalid input: entity: FileInfo field: <id, postId, creatorId> value: <9nm47r68dbf85fqhjh4e8xhc4r, nm4z68fk4pg8zcxksad9pqwebc, gmejfnzmkjnt5b5xsynphfkfuo>"}
{"timestamp":"2023-06-13 14:51:03.672 Z","level":"error","msg":"Error attaching files to post.","caller":"app/import_functions.go:1628","post_id":"nm4z68fk4pg8zcxksad9pqwebc","post_file_ids":["t41er1zxk3gffbubezkeb1bucc","9nm47r68dbf85fqhjh4e8xhc4r","kwe9omr9mjg1pn7b7bbp8q9yqo"],"error":"invalid input: entity: FileInfo field: <id, postId, creatorId> value: <kwe9omr9mjg1pn7b7bbp8q9yqo, nm4z68fk4pg8zcxksad9pqwebc, gmejfnzmkjnt5b5xsynphfkfuo>"}
{"timestamp":"2023-06-13 14:51:05.607 Z","level":"error","msg":"Failed to upload file","caller":"app/import_functions.go:1311","error":"GetInfoForBytes: Could not decode gif., gif: not enough image data","file_name":"data/20230403/teams/noteam/channels/9rqff4mtf7bdtk1p77yc1o7yde/users/czgbk4x18pbt9djossa58jbe7w/mgj4k6knypd1d8punym7djg1ky/FlySwatterGIF.gif"}
{"timestamp":"2023-06-13 14:51:05.607 Z","level":"warn","msg":"failed to import attachment","caller":"app/import_functions.go:1610","path":"data/20230403/teams/noteam/channels/9rqff4mtf7bdtk1p77yc1o7yde/users/czgbk4x18pbt9djossa58jbe7w/mgj4k6knypd1d8punym7djg1ky/FlySwatterGIF.gif","error":"GetInfoForBytes: Could not decode gif., gif: not enough image data"}
{"timestamp":"2023-06-13 14:51:12.933 Z","level":"error","msg":"SimpleWorker: job execution error","caller":"jobs/base_workers.go:91","worker":"ImportProcess","job_id":"m8r3kawaj7dpupqgz8fjirnado","error":"Post.IsValid: Invalid type., id=reminder"}