-
Notifications
You must be signed in to change notification settings - Fork 97
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
Images appear as broken in preview pane in AsciiDoc 3.1.8 #819
Comments
When I try it using AsciiDoc 3.1.7, I see the image in the preview pane. |
Please note that you don't need to use |
Same here (on Windows) 🤔 |
I'm on the new AsciiDoc 3.1.8 - Windows10 - and I can see the image in the preview pane. I also see the original bug was posted where VSCode is using its native preview, I tested that as well and it all came out fine. |
@ggrossetie This is what I get with AsciiDoc 3.1.5
This is what I see with AsciiDoc 3.1.8
That |
I have what appears to be the same issue. Mine appears to be related to case in the path. I have images in same folder as .adoc file AsciiDoc v3.1.8 Version: 1.84.2 (user setup) |
Are you using an absolute path? Could you please share the content of |
@RoxvilleRooster looks like a workspace permission issue. Could you please open the network tab and inspect the request that returns a 401. The URI should be something like:
Also, do you open your AsciiDoc file in a workspace? |
Entire adoc
|
in a folder in A folder
Not sure. I right click (empty area) in folder > Open with Code |
In Console for A I get the error below. In a there is no error.
|
I am using GitHub Desktop and VSCode, So when I edit the docs in a repo, I assume that means I am operating in the workspace. If I save extension settings to the workspace, the settings.json file gets saved in the repo/workspace in I am not 100% sure that I am doing the right thing but in the Network tab in Developer Tools, I see this (which does not appear new info):
|
@RoxvilleRooster could you please take a screenshot of your network tab? Here's an example where you can see the request that loads the @kodermho As far as I know, Windows is case insensitive. Do you use WSL? How do you open your |
I agree. I not sure how to test that but if I put "c:\a" into run it will open c:\A folder
Yes, I use it.
I am renaming c:\A->a->A->... |
I'm also encountering this issue. By playing around I found that it does have something to do from where I start vscode.
I usually launch vscode from the command line in the repository root directory: I've also completely reset my entire vscode/asciidoc tool chain during troubleshooting this (uninstalled and deleted all remaining folders, reinstalled). I have the latest stable versions from official sources of all tools involved (vscode user install, asciidoc extension, ruby and asciidoctor gem). Except Windows, unfortunately (Windows 10 Enterprise, 22H2, build 19045.3570).
Hope this helps. |
Opening just the file in vscode renders image in preview Edited prcoess from above
|
@lutopastialis I was able to reproduce this issue by launching VS code from the command line. Interestingly, the Markdown extension is using the exact same request: Markdown extension
AsciiDoc extension
It seems like a limitation/bug in VS code... you should open a new issue upstream: https://github.com/microsoft/vscode |
Found a similar issue: microsoft/vscode#197103 |
@ggrossetie you beat me to it :) Thank you for adding your comment in the vscode issue thread #197103, I appreciate it. I seem to be among only a few collegues in my team who open vscode almost always from the command line (Powershell 7 and the latest stable Windows Terminal). I've posted this info internally, which really helps as we're working on some very large asciidoc files with lots of images. |
It seems that VS Code normalizes some paths (on Windows) so I would strongly recommend to use lowercase names to avoid issues. |
Oooh! It seems that we are normalizing the path in: asciidoctor-vscode/src/features/preview.ts Lines 400 to 410 in d0df68a
|
I think I finally found the root cause, thanks all for providing reproduction cases! The 401 error was a bit misleading and it was even more weird that in some cases it worked (that's because VS code is using a cache). Anyway, I will add tests, merge #825, update the CHANGELOG and release 3.1.9 |
Original discussion is in https://asciidoctor.zulipchat.com/#narrow/stream/406819-users.2Fasciidoctor-vscode/topic/images.20missing.20in.20preview
Please provide details about:
Please share relevant sample content. Or better yet, provide a link to a minimal reproducible example.
vscode details:
I am specifying no extension properties for asciidoctor (I want to stick to the defaults for this troubleshooting).
Here is the preview pane when I used AsciiDoc 3.1.7
Here is the preview pane when I used AsciiDoc 3.1.5
Attached is very simple project to illustrate:
simple_project_image_preview_issue.zip
This is the text of test.adoc
Install AsciiDoc 3.1.7.
Does the image appear as expected (i.e., not broken) in the preview pane? I expect that the image will appear as broken.
Install AsciiDoc 3.1.5 and reload.
Does the image appear as expected (i.e., not broken) in the preview pane? I expect that the image will appear rendered correctly in the preview pane.
The text was updated successfully, but these errors were encountered: