Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start failure 0.23.0.rc1 #4127

Open
dream7180 opened this issue Nov 13, 2024 · 2 comments
Open

start failure 0.23.0.rc1 #4127

dream7180 opened this issue Nov 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dream7180
Copy link

dream7180 commented Nov 13, 2024

Describe the bug

Archlinux, start failure, either pre-built binary or self-complied binary.
message:
2024/11/13 18:14:28 ERROR failed to migrate error="Error 1366 (22007): Incorrect string value: '\xF0\x9F\x91\x8D",...' for column memos.system_setting.value at row 1\nfailed to execute statement\ngithub.com/usememos/memos/store.(*Store).execute\n\t/home/runner/work/memos/memos/store/migrator.go:251\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/home/runner/work/memos/memos/store/migrator.go:88\nmain.init.func1\n\t/home/runner/work/memos/memos/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/home/runner/work/memos/memos/bin/memos/main.go:171\nruntime.main\n\t/opt/hostedtoolcache/go/1.23.3/x64/src/runtime/proc.go:272\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.3/x64/src/runtime/asm_amd64.s:1700\nmigrate error: UPDATE reaction SET reaction_type = '👍' WHERE reaction_type = 'THUMBS_UP';\nUPDATE reaction SET reaction_type = '👎' WHERE reaction_type = 'THUMBS_DOWN';\nUPDATE reaction SET reaction_type = '💛' WHERE reaction_type = 'HEART';\nUPDATE reaction SET reaction_type = '🔥' WHERE reaction_type = 'FIRE';\nUPDATE reaction SET reaction_type = '👏' WHERE reaction_type = 'CLAPPING_HANDS';\nUPDATE reaction SET reaction_type = '😂' WHERE reaction_type = 'LAUGH';\nUPDATE reaction SET reaction_type = '👌' WHERE reaction_type = 'OK_HAND';\nUPDATE reaction SET reaction_type = '🚀' WHERE reaction_type = 'ROCKET';\nUPDATE reaction SET reaction_type = '👀' WHERE reaction_type = 'EYES';\nUPDATE reaction SET reaction_type = '🤔' WHERE reaction_type = 'THINKING_FACE';\nUPDATE reaction SET reaction_type = '🤡' WHERE reaction_type = 'CLOWN_FACE';\nUPDATE reaction SET reaction_type = '❓' WHERE reaction_type = 'QUESTION_MARK';\n\nINSERT INTO system_setting (name, value, description)\nVALUES (\n 'MEMO_RELATED',\n '{"contentLengthLimit":8192,"reactions":["👍","👎","💛","🔥","👏","😂","👌","🚀","👀","🤔","🤡","❓"]}',\n ''\n)\nON DUPLICATE KEY UPDATE\nvalue = \n JSON_SET(\n value, \n '$.reactions', \n JSON_ARRAY('👍', '👎', '💛', '🔥', '👏', '😂', '👌', '🚀', '👀', '🤔', '🤡', '❓')\n );\n\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/home/runner/work/memos/memos/store/migrator.go:89\nmain.init.func1\n\t/home/runner/work/memos/memos/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/home/runner/work/memos/memos/bin/memos/main.go:171\nruntime.main\n\t/opt/hostedtoolcache/go/1.23.3/x64/src/runtime/proc.go:272\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.3/x64/src/runtime/asm_amd64.s:1700"

Steps to reproduce

start memos as service.

The version of Memos you're using.

v0.23.0-rc.1

Screenshots or additional context

0.22.5 runs OK

@dream7180 dream7180 added the bug Something isn't working label Nov 13, 2024
@johnnyjoygh
Copy link
Collaborator

It looks like we already handle the empty reactions setting 378b6a5, so we can just remove the related migration scripts. @boojack

@RoccoSmit
Copy link
Contributor

@dream7180, what db are you using? Is it MySQL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants