[GH-ISSUE #78] Panic while adding a tag to an existing bookmark #54

Closed
opened 2026-02-25 23:33:21 +03:00 by kerem · 4 comments
Owner

Originally created by @Hunter-Github on GitHub (Mar 13, 2018).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/78

Version: 6bab302785
OS: Linux (Debian 9)
Browser: Chromium 67.0.3369.0
Problem: shiori serve doesn't handle progress bar panics gracefully (?)
Actions: import bookmarks, then import bookmarks again (with some additions), then edit tags for 1 card (success, checked via the next run of shiori), then edit tags for another bookmark card (failure, panic, server down)
Reproducibility: same stuff on the 2nd try (the first bookmark edit succeeds, the second one fails)

Fetching new bookmarks data
   0s [====================================================================] 100%

Saving new data
   0s [====================================================================] 100%
  --- [--------------------------------------------------------------------]   0%
panic: close of closed channel

goroutine 2955 [running]:
github.com/gosuri/uiprogress.(*Progress).Listen(0xc42007a180)
        /home/xxx/gofiles/src/github.com/gosuri/uiprogress/progress.go:117 +0x160
created by github.com/gosuri/uiprogress.(*Progress).Start
        /home/xxx/gofiles/src/github.com/gosuri/uiprogress/progress.go:134 +0x3f
Originally created by @Hunter-Github on GitHub (Mar 13, 2018). Original GitHub issue: https://github.com/go-shiori/shiori/issues/78 Version: 6bab302785263e942ee50421fda500316fa253b0 OS: Linux (Debian 9) Browser: Chromium 67.0.3369.0 Problem: shiori serve doesn't handle progress bar panics gracefully (?) Actions: import bookmarks, then import bookmarks again (with some additions), then edit tags for 1 card (success, checked via the next run of shiori), then edit tags for another bookmark card (failure, panic, server down) Reproducibility: same stuff on the 2nd try (the first bookmark edit succeeds, the second one fails) ``` Fetching new bookmarks data 0s [====================================================================] 100% Saving new data 0s [====================================================================] 100% --- [--------------------------------------------------------------------] 0% panic: close of closed channel goroutine 2955 [running]: github.com/gosuri/uiprogress.(*Progress).Listen(0xc42007a180) /home/xxx/gofiles/src/github.com/gosuri/uiprogress/progress.go:117 +0x160 created by github.com/gosuri/uiprogress.(*Progress).Start /home/xxx/gofiles/src/github.com/gosuri/uiprogress/progress.go:134 +0x3f ```
kerem closed this issue 2026-02-25 23:33:21 +03:00
Author
Owner

@gissehel commented on GitHub (Apr 9, 2018):

I've got the same issue. It always works for the first tag change, and always fails for the second one.

Here is the exact exhaustive easy steps to reproduce:

docker image used: latest available (8fe4587a0f6a)

Steps to reproduce

Requierements

  • Docker
  • sudo access & root access to /tmp (not mandatory, both can be changed by tweeking the command lines below)

Steps

sudo rm -f /tmp/shiori.db
sudo touch /tmp/shiori.db
docker rm -f shiori-test-step1
docker rm -f shiori-test-step2
docker rm -f shiori-test-step3
docker run -ti --volume /tmp/shiori.db:/srv/shiori.db:rw --name shiori-test-step1 radhifadlillah/shiori /usr/local/bin/shiori account add test

Here put testtest as password

docker run -ti --volume /tmp/shiori.db:/srv/shiori.db:rw --name shiori-test-step2 radhifadlillah/shiori /usr/local/bin/shiori add http://www.google.com/
docker run -ti -p 8080:8080 --volume /tmp/shiori.db:/srv/shiori.db:rw --name shiori-test-step3 radhifadlillah/shiori
  • browse the web site on ip:8080
  • Login with test/testtest
  • Edit the tag of the only entry "google"
  • Put "#test" as a tag
  • Check the test is "test"
  • Edit the tag of the only entry "google"
  • Put "test2" as a tag

Expected result

  • The tag is now "#test2"

Actual result

  • Network error (or error 502 while browsing threw nginx reverse proxy) on the web site
  • panic: close of closed channel on the server stderr
<!-- gh-comment-id:379907167 --> @gissehel commented on GitHub (Apr 9, 2018): I've got the same issue. It always works for the first tag change, and always fails for the second one. Here is the exact exhaustive easy steps to reproduce: docker image used: latest available (8fe4587a0f6a) Steps to reproduce ============ Requierements ---------------- * Docker * sudo access & root access to /tmp (not mandatory, both can be changed by tweeking the command lines below) Steps ------ ``` sudo rm -f /tmp/shiori.db sudo touch /tmp/shiori.db docker rm -f shiori-test-step1 docker rm -f shiori-test-step2 docker rm -f shiori-test-step3 docker run -ti --volume /tmp/shiori.db:/srv/shiori.db:rw --name shiori-test-step1 radhifadlillah/shiori /usr/local/bin/shiori account add test ``` Here put `testtest` as password ``` docker run -ti --volume /tmp/shiori.db:/srv/shiori.db:rw --name shiori-test-step2 radhifadlillah/shiori /usr/local/bin/shiori add http://www.google.com/ docker run -ti -p 8080:8080 --volume /tmp/shiori.db:/srv/shiori.db:rw --name shiori-test-step3 radhifadlillah/shiori ``` * browse the web site on ip:8080 * Login with test/testtest * Edit the tag of the only entry "google" * Put "#test" as a tag * Check the test is "test" * Edit the tag of the only entry "google" * Put "test2" as a tag Expected result ----------------- * The tag is now "#test2" Actual result -------------- * Network error (or error 502 while browsing threw nginx reverse proxy) on the web site * `panic: close of closed channel` on the server stderr
Author
Owner

@gissehel commented on GitHub (Apr 10, 2018):

I worked around the problem by commenting the 5 lines referencing uiprogress in cmd/update.go (import, Start, AddBar, bar.Incr and Stop).

No more progress bars, but no more crash ( github.com/gissehel/shiori@4f54cdfef8 )

<!-- gh-comment-id:380230606 --> @gissehel commented on GitHub (Apr 10, 2018): I worked around the problem by commenting the 5 lines referencing uiprogress in cmd/update.go (import, Start, AddBar, bar.Incr and Stop). No more progress bars, but no more crash ( https://github.com/gissehel/shiori/commit/4f54cdfef8d7bb1dccd43e7230e9287409c49c93 )
Author
Owner

@gissehel commented on GitHub (Apr 29, 2018):

The issue doesn't seem to be present anymore after refactoring in commit 2c23f98 as the progress bars only seems to be diplayed in interactive commands and not in serve command anymore.

<!-- gh-comment-id:385239158 --> @gissehel commented on GitHub (Apr 29, 2018): The issue doesn't seem to be present anymore after refactoring in commit 2c23f98 as the progress bars only seems to be diplayed in interactive commands and not in serve command anymore.
Author
Owner

@RadhiFadlillah commented on GitHub (May 26, 2018):

Since it seems it's already fixed, I will close this issue for now.

<!-- gh-comment-id:392267371 --> @RadhiFadlillah commented on GitHub (May 26, 2018): Since it seems it's already fixed, I will close this issue for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#54
No description provided.