mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 22:45:55 +03:00
[GH-ISSUE #215] "failed to save bookmark" #157
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @watson387 on GitHub (Nov 22, 2019).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/215
Shiori Docker with Postgresql database, on Ubuntu Server 19.10.
My compose:
It was working fine at first but now, while trying to add bookmarks through gui I'm getting this error:
I'm also seeing this in the shioridb logs:
What am I doing wrong?
@deanishe commented on GitHub (Aug 6, 2020):
I think this issue is related to the problems described in PR #250.
I plan to rejigger the way database IDs are handled in an upcoming update.
@Mati20187 commented on GitHub (Mar 27, 2022):
Sorry for necrobumping but this is still relevant. I have shiori installed from the precompiled binary on my raspberry pi (postgres db) and when I try to add a new bookmark and attach a tag to it, I get
insert or update on table "bookmark_tag" violates foreign key constraint "bookmark_tag_bookmark_id_fk".Is there a fix for this issue yet? I would greatly appreciate any help!
@Mati20187 commented on GitHub (Mar 30, 2022):
What I did:
What I got on the screen:

Relevant logs from
journalctl -xe:Mar 30 09:53:59 raspberrypi shiori[1621]: 2022/03/30 09:53:59 error during insert: pq: insert or update on table "bookmark_tag" violates foreign key constraint "bookmark_tag_bookmark_id_fk" Mar 30 09:53:59 raspberrypi shiori[1621]: 2022/03/30 09:53:59 error during rollback: sql: transaction has already been committed or rolled back Mar 30 09:53:59 raspberrypi shiori[1621]: time="2022-03-30T09:53:59+02:00" level=warning msg="POST /api/bookmarks" proto=HTTP/1.1 remote="127.0.0.1:53046" reqlen=195 size=82 status=500@fmartingr commented on GitHub (May 3, 2022):
Hey @Mati20187, sorry for being a little absent. Are you still experiencing this? I use SQLite in my personal Shiori server so I would need to test this properly once I have some time.
@Mati20187 commented on GitHub (May 6, 2022):
@fmartingr yes, this is still an issue for me. Also, if you use SQLite, have you noticed a significant performance drop discussed in #408 ?
@fmartingr commented on GitHub (May 26, 2022):
I will check this once I have some time. I have some migrations pending on my local infrastructure and was wondering if migrating to PSql myself.
I did not, actually. But my bookmark database is not as big as others have pointed out in the issue. Hopefully #425 will fix that.
@hrshadhin commented on GitHub (Jun 24, 2022):
i'm also facing this issue like @Mati20187
Can't save bookmarks with tags. i'm using PostgreSQL.
@kolaente commented on GitHub (Aug 1, 2022):
I'm getting a similar error every time I'm trying to save a bookmark with tags:
Saving without tags or adding tags after saving works fine.
@sardaukar commented on GitHub (Sep 5, 2022):
I could only add a bookmark via the API after creating a tag in the Web UI by hand, and then using this payload (
importedis the tag I created):@thelazyoxymoron commented on GitHub (Oct 4, 2022):
+1 for this. Not able to add a tag with Postgres. I was, however, able to add (multiple) tag(s) when trying to edit an existing bookmark. Looks like this is a problem only when you try to add a tag during the "add a bookmark" screen.
@fmartingr commented on GitHub (Oct 4, 2022):
I've tested this locally and #484 should fix the psql problem. I'm sure there are more issues underneath the database wrapper, but we'll try to fix them as they come. Please take a look.
Note: There's still a problem with archives unless we properly use returning or #480 is tested and merged.