logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
30.26k stars 1.77k forks source link

'Image not found!' Images do still exist in the Assets folder #7043

Closed richd67 closed 1 year ago

richd67 commented 1 year ago

Discussed in https://github.com/logseq/logseq/discussions/7028

Originally posted by **tiensonqin** October 18, 2022 - Changelog - [[Features]] - **PDF enhancements** - Full-text search 🎉 - Highlights list and colored label from the toolbar - Demo - https://www.loom.com/embed/fa7ad4bb1dcd4d21b8f76e3e03c19d7f - **Reproducible plugin configuration** - This introduces a config file, `plugins.edn`, which is automatically updated with your installed plugins, this makes it easy to share your plugins set and try others as well. - **How to use it?** - 1. Reload (or restart) the app to have a `plugins.edn` created for you - 2. Installing, updating or removing a plugin updates plugins.edn - 3. Try someone else's plugins a.k.a. install from `plugins.edn` - a. Back up your plugins. If you have plugins.edn, save a copy of that file. If you don't have a plugins.edn, move ~/.logseq/plugins to ~/.logseq/plugins.bak - b. If you want to back up your plugin preferences: move ~/.logseq/settings to ~/.logseq/settings.bak - c. Choose a plugins.edn you want to try - check examples below. - d. Run the command  `Install plugins from plugins.edn`  or choose the 3 dot menu in the plugins dashboard. Click `Install`. - Demo https://www.loom.com/embed/200a0abb096444d1a9e56e826fa06fb0 - Some examples: https://github.com/cldwalker/logseq-config/blob/main/config/plugins.edn - [[Thanks]] - [[Ilya Gusev]] - Improve Russian (ru) translations - [[situ2001]] - Modal not respond to the enter keydown event - Grid mode status not correctly shown - zh_CN translate on graph - [[yoyurec]] - Add `page-property-value` class - [[Patrick Moriarty]] - iOS: Continue recording audio while the phone sleep - [[Fixed issues]] - Create local versions on mobile if there's any conflict - Excalidraw cursor offset - Don't create a journal file when it was initialized by a template - Failed to import OPML - Re-index stuck when there're multiple whiteboards that have the same UUID - Up/down arrow navigation - Remove # doesn't remove the heading property - Sanitize HTML to ensure security - A lot of issues with PDF - Logseq can't be started on Windows 7 - [[Enhancement]] - **New file name rules** - *Motivations* - `%2F`  for namespace separator is ugly - Previous rule of parsing  `.`  into  `/`  breaks file naming conventions (e.g.  `1.xxx.md` ,  `2.xxx.md` ) - *How to use it?* - Settings -> Advanced -> File name format, click the `Edit` button, and follow the instructions in the popup window. - Demo: https://www.loom.com/embed/80286e88c1d345e4abbe2723e1a01c6e - A new theme-based highlighting system and a lot of enhancements to colors - UI enhancements including opacity, icons, etc. - Bump Excalidraw to `0.12.0`
This discussion was created from the release Desktop/Android APP 0.8.9 (Beta Testing).
richd67 commented 1 year ago

There seems to be a problem in displaying images? Just getting the message of 'Image not found!' Images do still exist in the Assets folder so seems to be an issue in the linking to the image?

If I re-index the image very briefly appears before returning to the Image not found! message.

cnrpman commented 1 year ago

What's the links toward your images?

richd67 commented 1 year ago

Here is an example

IMG_20221004_104809_1665664449905_0.jpg

richd67 commented 1 year ago

Ahh that didnt show properly will try in () (IMG_20221004_104809_1665664449905_0.jpg)

cnrpman commented 1 year ago

A screenshot would work if copy-paste here doesn't :)

richd67 commented 1 year ago

image

cnrpman commented 1 year ago

Have you setup asset alias directories previously?

richd67 commented 1 year ago

no alias directories

richd67 commented 1 year ago

It all worked fine on 0.8.8

cnrpman commented 1 year ago

Humm, it's weird if you confirm the file exists in the asset directory, and the asset directory is in the root directory of your graph.

Does restarting Logseq work?

cc. @xyhp915

richd67 commented 1 year ago

I know weird? I have tried re-index. Reload of the programme. I have also tried re-pasting the image into the page, thats the screenshot. That is two instances of the same image one showing Image not found and the other the link? I have about 30 images on different pages with the same problem. Not yet found an image that is unaffected.

cnrpman commented 1 year ago

Sorry to hear that. Is this happening on another graph?

xyhp915 commented 1 year ago

image

What's the text link of the "image not found" block? Also, is this graph being served with built-in file syncing?

richd67 commented 1 year ago

The link for the image not found is identical Switched to a graph that I have on my google drive where there is a common image and it is fine it renders properly? So its something to do with this graph?

richd67 commented 1 year ago

Could it be something to do with the filename conversion? As I suspect that has changed IMG-20221004-104809.jpg to IMG_20221004_104809.jpg

cnrpman commented 1 year ago

We need more information about the graph, e.g. where it host on? Any special config?

cnrpman commented 1 year ago

It's case-insensitive on most file systems on most OS (e.g. Windows, macOS)

richd67 commented 1 year ago

The graph is on my local root c: drive as I have sync. Nothing particularly special, several plugins and Awesom UI

richd67 commented 1 year ago

Running Windows 11

richd67 commented 1 year ago

Inrterstingly just noticed that these three files are of the same image same timestamps but different filenames? Thsi is all from the assets folder. This is the same image from the previous screenshot. image

richd67 commented 1 year ago

Another problem possibly related? Just found a number of pdf highlights/pastes not rendering both snapshots and text highlighting.

richd67 commented 1 year ago

Seems to work ok for new highlights ths issue is with historic ones.

cnrpman commented 1 year ago

It can greatly boost the debugging process if you'd like to provide a minimum reproduce-able graph for the issue

richd67 commented 1 year ago

Ok I will give it a go, when you say minimal is that in terms of pages or other aspects like plugins etc? I have also just had a thought that I will have the same graph synced to my laptop but it will still be running 0.8.8. So just looking now whether the issue is present there.

richd67 commented 1 year ago

So just started laptop and the image rendered properly, I deliberately did not sync but as far as I can tell everything else is the same except logseq version 0.8.8 vs 0.8.9.

richd67 commented 1 year ago

I have also opened a new graph on my pc attached a couple of images to the Journal page and it renders ok. So the issue seems to be with my existing graph?

richd67 commented 1 year ago

This leaves me pondering the solution? Is there something I can do with a sync rollback?

richd67 commented 1 year ago

Just went back to my main graph and it initially worked, but when I navigated to another page and then returned I was back to the same problem of image not found

richd67 commented 1 year ago

I have now rolled back to 0.8.8 and images have returned permamently

cnrpman commented 1 year ago

This leaves me pondering the solution? Is there something I can do with a sync rollback?

We have no solution for now as we have no clue to locate / reproduce the issue.

richd67 commented 1 year ago

I note that someone (ItsMeMario) on Discord had the same problem and has also rolled back to 0.8.8

hmamigo commented 1 year ago

Same problem on Linux.

hambo2 commented 1 year ago

I'm having the same issue. It renders correctly when I first open the graph, but when I click on the block with the link to the image it again says image not found. It seems to be looking for them in 'C\logseq__colon\Users[my graph folder]\assets' which doesn't exist - I think the first part of the address is wrong?

cnrpman commented 1 year ago

@hambo2 Important finding. Seems the dir path is mistakenly encoded. Can you provide the expected dir path in your case?

hambo2 commented 1 year ago

@cnrpman I think it would be "C:\Users[my windows username][my graph folder]\assets\image_1666199999181_0.png". Hope that's the right info and thanks for looking into it

cnrpman commented 1 year ago

Seems like decoding is missed in someplace https://github.com/logseq/logseq/blob/d53ac94bfc019926f85690224deb5f3517b8bb3c/src/main/frontend/handler/assets.cljs#L23-L27

cc. @xyhp915

xyhp915 commented 1 year ago

Hi @hambo2 @richd67 Thank you for your details! Try to be fixed here #7043. It will be reviewed soon!

Porrumentzio commented 1 year ago

I reported a similar problem when publishing: https://github.com/logseq/logseq/issues/7150

cnrpman commented 1 year ago

Closing since #7043 is merged.