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

Thumbnail not show in app #2

Closed
Monirzadeh opened this issue Jan 11, 2024 · 30 comments
Closed

Thumbnail not show in app #2

Monirzadeh opened this issue Jan 11, 2024 · 30 comments

Comments

@Monirzadeh
Copy link
Contributor

Monirzadeh commented Jan 11, 2024

app not show thumbnail of bookmarks.
in screenshot it is work but in my test not working. is it a bug or this feature not merge yet?

@DesarrolloAntonio
Copy link
Owner

I can see all the thumbnails, can you send me a link to try

@DesarrolloAntonio
Copy link
Owner

The first three bookmarks that I have did not have a thumbnail, I have deleted them, I have created them again and they are now available, perhaps it is a compatibility problem between versions

@Monirzadeh
Copy link
Contributor Author

Monirzadeh commented Jan 11, 2024

i test that with pagekeeper v 1.02 and stable release of shiori 1.5.5.
if i add link with Share menu thumbnail is show up but if you add that from shiori than refresh app thumbnail missing
for example test this link
https://www.1pezeshk.com/archives/2024/01/lactic-acid-isnt-making-your-muscles-sore.html

thumbnail work in shiori. in both way(share menu or directly add from server) .

if you refresh app ,is it check thumbnail for refresh too?

@DesarrolloAntonio
Copy link
Owner

i test that with pagekeeper v 1.02 and stable release of shiori 1.5.5. if i add link with Share menu thumbnail is show up but if you add that from shiori than refresh app thumbnail missing for example test this link https://www.1pezeshk.com/archives/2024/01/lactic-acid-isnt-making-your-muscles-sore.html

thumbnail work in shiori. in both way(share menu or directly add from server) .

if you refresh app ,is it check thumbnail for refresh too?

I've tested the link and the thumbnails look fine to me.
Screenshot_20240115_084345

@Monirzadeh
Copy link
Contributor Author

Do you add that from server or app?

@DesarrolloAntonio
Copy link
Owner

Do you add that from server or app?

From server

@DesarrolloAntonio
Copy link
Owner

Do you add that from server or app?

and from the app too

@Monirzadeh
Copy link
Contributor Author

it happen to me time to time.

@DesarrolloAntonio
Copy link
Owner

it happen to me time to time.

Have you tried deleting the bookmark and adding it again?

@Monirzadeh
Copy link
Contributor Author

yes. i remove that and add again but when i add them from server i missing thumbnail
server log show me

/bookmark/8/thumb                         proto=HTTP/1.1 remote="192.168.1.5:42606" reqlen=0 size=69 status=301

@DesarrolloAntonio
Copy link
Owner

I think I have found the problem. If the URL is saved in this format (http://192.168.1.12:8080/), when the image URL part is added (http://192.168.1.12:8080//bookmark/1/thumb), the slash / gets duplicated. I have implemented a control to remove the slash if it exists.

@Monirzadeh
Copy link
Contributor Author

Hi.
I test latest release on Google Play (v1.05) unfortunately bug still exist.

@DesarrolloAntonio
Copy link
Owner

Hi. I test latest release on Google Play (v1.05) unfortunately bug still exist.

Can you create a user or environment where I could test from my device?

@Monirzadeh
Copy link
Contributor Author

unfortunately in run that locally right now. shiori v1.5.5
but i get https://github.com/DesarrolloAntonio/Shiori-Android-Client/issues/2#issuecomment-1895838147 again in log.

@DesarrolloAntonio
Copy link
Owner

DesarrolloAntonio commented Jan 23, 2024

I've created this for google review, you can test in:
http://144.24.183.231:8085/
user: testing
pass: shiori

Let's see if you can add a bookmark where the thumbnail doesn't appear so I can try it.

@Monirzadeh
Copy link
Contributor Author

is it version 1.5.5 ?
in my test title show url becuse of this bug that fixed in 1.6 rc1.
but in your server thumbnail show correctly and title show correct (instead of url)
on your server
e148b985-7d99-40dd-8db9-589697d40b4c png

my local test on shiori v 1.55
61cdbf5c-0dea-4a20-aa3e-4dfe3447e6aa png

(both show thumbnail on web version)

@DesarrolloAntonio
Copy link
Owner

I've installed Shiori in Docker using a template, but the template uses a very old version from this image: [https://hub.docker.com/r/radhifadlillah/shiori/tags]. I'll try to update the container.

@DesarrolloAntonio
Copy link
Owner

I've created a new container using the latest image, but the thumbnail is not showing in the app, now I can fix the bug. Here are the server details with the same credentials.
http://144.24.183.231:8086/

@DesarrolloAntonio
Copy link
Owner

In my case the problem was that de bookmark was not public, and there was no access to the image. I have edited the bookmark to make it public, and now it appears.

@DesarrolloAntonio
Copy link
Owner

Captura de pantalla_área-de-selección_20240123122546

@Monirzadeh
Copy link
Contributor Author

Monirzadeh commented Jan 23, 2024

you right when i remove bookmark and add that as public bookmark it finally show thumbnail.
so maybe you don't send token for request thumbnail in code (which part of code responsible for request thumbnail?)

as i remember fmartingr migrate UI route in v1.6 this
go-shiori/shiori#775 and close issue go-shiori/shiori#660.
and for private thumbnail you need to authorize

are you sure that send token to accesses thumbnail?

@DesarrolloAntonio
Copy link
Owner

I'm using the direct url
http://144.24.183.231:8086/bookmark/1/thumb

@Monirzadeh
Copy link
Contributor Author

I'm using the direct url http://144.24.183.231:8086/bookmark/1/thumb

so you don't send token in request or cookies to accesses that.
i set that bookmark as private and you can accesses thumbnail if you are not login.
you need attach cookies at least to accesses that.

@DesarrolloAntonio
Copy link
Owner

I can't send cookies from Android in a straightforward way. The only thing I can think of is to send the sessionID as a parameter in the URL

@Monirzadeh
Copy link
Contributor Author

you can add token to header like other request

 curl -H "Authorization: Bearer userToken" http://127.0.0.1:8080/bookmark/1/thumb -o thumb.png  

this request work on shiori 1.6 for me. to authorize and accesses to the thumbnail. if i am not send a valid token that redirect me to the login page

@Monirzadeh
Copy link
Contributor Author

Monirzadeh commented Jan 23, 2024

as you see fmartingr done that for wbeui of shiori that in this PR
go-shiori/shiori#743

@DesarrolloAntonio
Copy link
Owner

In legacy api, I haven't token
{"session":"3bd057b0-196e-43f6-95bb-4680ef966b7f","account":{"id":1,"username":"testing","owner":true},"expires":"Tue, 23 Jan 2024 13:28:18 UTC"}

@Monirzadeh
Copy link
Contributor Author

Monirzadeh commented Jan 23, 2024

In legacy api, I haven't token {"session":"3bd057b0-196e-43f6-95bb-4680ef966b7f","account":{"id":1,"username":"testing","owner":true},"expires":"Tue, 23 Jan 2024 13:28:18 UTC"}

you right we add that in shiori v1.6 with this PR go-shiori/shiori#742
in this line
https://github.com/go-shiori/shiori/blob/84e5b09c4c9944fc881ad6e1c6a5224b6fa07e42/internal/view/login.html#L127

maybe not bad if you add a lable to this issue "migrate new api" and fix that when you start working in new api.
at least we found the source of problem.

@DesarrolloAntonio
Copy link
Owner

I've solved the problem including the X-Session-Id in the headers.

@graphixillusion
Copy link

I'm still having the problem. I can't see anymore the images in the saved bookmarks. I'm using the last version of the app in android 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants