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

Trying to move form Memos stable version to latest version. I am getting error when trying to run. Log added. #4357

Closed
FutureEye1 opened this issue Feb 2, 2025 · 14 comments
Labels
bug Something isn't working

Comments

@FutureEye1
Copy link

Describe the bug

Hi, I want to IOS app which support the latest version and has removed the stable version support due to api change as I am told. So I am trying to move to memos latest version and I am getting the below error. What could be reason? I am not developer so appreciate any help here.

I am running on a synology NAS.

memos-latest
date,stream,content
2025/02/02 16:53:00,stderr,2025/02/02 21:53:00 ERROR failed to migrate error="strconv.Atoi: parsing "00_memo_tags.sql": invalid syntax\nfailed to convert patch version to int: 00_memo_tags.sql\ngithub.com/usememos/memos/store.(*Store).getSchemaVersionOfMigrateScript\n\t/backend-build/store/migrator.go:243\ngithub.com/usememos/memos/store.(*Store).normalizedMigrationHistoryList\n\t/backend-build/store/migrator.go:282\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/backend-build/store/migrator.go:161\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/backend-build/store/migrator.go:38\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700\nfailed to get schema version of migrate script\ngithub.com/usememos/memos/store.(*Store).normalizedMigrationHistoryList\n\t/backend-build/store/migrator.go:284\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/backend-build/store/migrator.go:161\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/backend-build/store/migrator.go:38\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700\nfailed to normalize migration history list\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/backend-build/store/migrator.go:162\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/backend-build/store/migrator.go:38\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700\nfailed to pre-migrate\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/backend-build/store/migrator.go:39\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700"

Steps to reproduce

Just running the latest version. Stable version works awesome no issue with that. It is just latest version is not running.

The version of Memos you're using

latest

Screenshots or additional context

No response

@FutureEye1 FutureEye1 added the bug Something isn't working label Feb 2, 2025
@johnnyjoygh
Copy link
Collaborator

Just running the latest version. Stable version works awesome no issue with that. It is just latest version is not running.

The suggestion is to avoid using "latest" and just use "stable," even though "latest" and "stable" are the same.

@FutureEye1
Copy link
Author

I thought stable is v19.0 and latest is v23.1

@primetime00
Copy link

primetime00 commented Feb 4, 2025

I'm having the same issue on neosmemo/memos:stable:
ERROR failed to migrate error="strconv.Atoi: parsing \"00_memo_tags.sql\": invalid syntax\nfailed to convert patch version to int: 00_memo_tags.sql\ngithub.com/usememos/memos/store.(*Store).getSchemaVersionOfMigrateScript\n\t/backend-build/store/migrator.go:243\ngithub.com/usememos/memos/store.(*Store).normalizedMigrationHistoryList\n\t/backend-build/store/migrator.go:282\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/backend-build/store/migrator.go:161\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/backend-build/store/migrator.go:38\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700\nfailed to get schema version of migrate script\ngithub.com/usememos/memos/store.(*Store).normalizedMigrationHistoryList\n\t/backend-build/store/migrator.go:284\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/backend-build/store/migrator.go:161\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/backend-build/store/migrator.go:38\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700\nfailed to normalize migration history list\ngithub.com/usememos/memos/store.(*Store).preMigrate\n\t/backend-build/store/migrator.go:162\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/backend-build/store/migrator.go:38\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700\nfailed to pre-migrate\ngithub.com/usememos/memos/store.(*Store).Migrate\n\t/backend-build/store/migrator.go:39\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700"

@James-Rocker
Copy link

I am also having the same issue with the most recent stable release using the docker image.

@linlord
Copy link

linlord commented Feb 5, 2025

I am also having the same issue with the most recent stable release using the docker image.我也使用Docker Image的最新稳定版本也遇到了同样的问题。

me too

@0x1af2aec8f957
Copy link

0x1af2aec8f957 commented Feb 5, 2025

Problem version: ghcr.io/usememos/memos:0.23.1

Running well: 0.23.0

@jidehem92
Copy link

Same problem here. I downgraded to 0.23.0, but I can no longer create memos (ERROR server error method=/memos.api.v1.MemoService/CreateMemo error="Error 1054 (42S22): Unknown column 'tags' in 'field list'"). So, I manually modified the memo table (alter table memo add column tags TEXT;). Not sure if this is the expected type, but at least it works and I can add new memos now.
I use mariaDB

@dwong33
Copy link
Contributor

dwong33 commented Feb 5, 2025

Same problem here. Among a dozens of dockers application I use, this one often breaks when upgrading. Stable version is not stable...

@FutureEye1
Copy link
Author

@dwong33 - my original post is that latest version has issues, while stable version works. So far I never had issues with the stable version. Please double confirm which version are you having issues so that developers can review it.

@primetime00
Copy link

@FutureEye1
My problem persists on
neosmemo/memos:stable

@dwong33
Copy link
Contributor

dwong33 commented Feb 5, 2025

@dwong33 - my original post is that latest version has issues, while stable version works. So far I never had issues with the stable version. Please double confirm which version are you having issues so that developers can review it.

Thank you, I am using the neosmemo/memos:stable version. Returns such error log:

2025/02/05 12:07:35 INFO start migration currentSchemaVersion=0.23.1 targetSchemaVersion=0.24.2
2025/02/05 12:07:35 ERROR failed to migrate error="Error 1091 (42000): Can't DROP COLUMN `tags`; check that it exists\nfailed to execute statement\ngithub.com/usememos/memos/store.
(*Store).execute\n\t/backend-build/store/migrator.go:247\ngithub.com/usememos/memos/store.
(*Store).Migrate\n\t/backend-build/store/migrator.go:88\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.
(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.
(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.
(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700\nmigrate error: -- Drop deprecated tags column.\nALTER TABLE `memo` DROP COLUMN `tags`;\ngithub.com/usememos/memos/store.
(*Store).Migrate\n\t/backend-build/store/migrator.go:89\nmain.init.func1\n\t/backend-build/bin/memos/main.go:61\ngithub.com/spf13/cobra.
(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989\ngithub.com/spf13/cobra.
(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117\ngithub.com/spf13/cobra.
(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041\nmain.main\n\t/backend-build/bin/memos/main.go:171\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1700"

@FutureEye1
Copy link
Author

@dwong33 - you may have to create a different issue as this issue is different.

@dwong33
Copy link
Contributor

dwong33 commented Feb 5, 2025

@dwong33 - you may have to create a different issue as this issue is different.

I believe it will be this issue: #4365

@johnnyjoygh
Copy link
Collaborator

2025/02/02 16:53:00,stderr,2025/02/02 21:53:00 ERROR failed to migrate error="strconv.Atoi: parsing "00_memo_tags.sql"

This one had been fixed in 0.24.0. If the issue still persists after upgraded, please feel free to reopen the issue.

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

8 participants