Bug 462045 - No preview in Html
Summary: No preview in Html
Status: CLOSED WORKSFORME
Alias: None
Product: ghostwriter
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: megan.conkle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-20 02:33 UTC by renaud.guezennec
Modified: 2023-04-23 00:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description renaud.guezennec 2022-11-20 02:33:26 UTC
SUMMARY
I can't see the preview in html. It does not work. I tried to change the Markdown Flavor to any type available but not of them are improving the situation.

When I start the application I got this in the command line:
Using pandoc version 2.9.2.1
"multimarkdown" process timed out and cannot be used.
QProcess: Destroyed while process ("multimarkdown") is still running.
Using cmark version

STEPS TO REPRODUCE
1.  Load any md file
2.  press Ctrl + P to show the preview
3.  The preview is full white (the application is in dark mode).

OBSERVED RESULT
 The preview is full white (the application is in dark mode).
There is no log about the generation of the preview going wrong. Neither in the app or in command line output.

EXPECTED RESULT
See the preview

SOFTWARE/OS VERSIONS
Ghostwriter version: ghostwriter 2.1.1
Linux/KDE Plasma:  Ubuntu 22.04 (from packages)
Qt Version:  From package
Comment 1 megan.conkle 2022-11-24 08:45:58 UTC
Would you please try out version 2.2.0 from the old PPA and let me know if the behavior is still there?  Also if you could please provide a sample file to help me replicate the error, that would be helpful.
Comment 2 renaud 2022-11-25 16:54:38 UTC
(In reply to megan.conkle from comment #1)
> Would you please try out version 2.2.0 from the old PPA and let me know if
> the behavior is still there?  Also if you could please provide a sample file
> to help me replicate the error, that would be helpful.

Hello, 
I did the update on my own for the same result. Even in 2.2.0, I have the same result.
As far as I remember it works before on Ubuntu 20.04 but since I upgrade to ubuntu 22.04. It does not work. 

I though at first it was due to the length of the document (I has a pretty heavy md file) but event with a small one. I have nothing on the preview panel. 
I believe it is something on my computer a missing package or something. 
The export works fine.

I also tried to remove completely the conf file in ~/.config/ghostwriter. It changes nothing. 
I will give a try to compile the project based on source and see if I have an improvement.
Comment 3 renaud 2022-11-25 16:58:36 UTC
You can download my file at: http://blog.rolisteam.org/file/01_Notes.md (I did not include the pictures)
Comment 4 renaud.guezennec 2022-11-25 19:45:19 UTC
I just compiled the software myself and it works. I believe the issue come from the packages. It is probably compiled with missing package.
Comment 5 renaud.guezennec 2022-11-25 21:42:33 UTC
It works when I start it from QtCreator but I got the same issue when I run cmake --target install.
Comment 6 Bug Janitor Service 2022-12-10 05:12:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 megan.conkle 2022-12-12 17:40:37 UTC
What happens if you switch from using Pandoc to the built-in cmark-gfm processor, and use cmake --target install?  I'm trying to determine if you have a Pandoc package that is missing or if the issue is with a missing Qt package.
Comment 8 renaud.guezennec 2022-12-15 16:10:26 UTC
I'm not sure I know how to do that. cmark-gfm  seems to be compiled but how can I make sure it is the one in use. I don't know.
Comment 9 megan.conkle 2022-12-22 21:14:07 UTC
(In reply to renaud.guezennec from comment #8)
> I'm not sure I know how to do that. cmark-gfm  seems to be compiled but how
> can I make sure it is the one in use. I don't know.

From the menu bar, select "Settings", and then select "Preview Options" from the menu.  Set the "Markdown Flavor" combo box to "cmark-gfm".  This processor is already built into ghostwriter by default, so you should not have to build and install it separately.
Comment 10 renaud.guezennec 2022-12-24 11:59:03 UTC
In fact, the problem is not about generating html, that works perfectly (according to my investigation) whatever which markdown flavor I select. cmark-gfm is working as well. The issue is about displaying the generated html code.
The issue is around the webchannel and the proxy.
Comment 11 renaud.guezennec 2022-12-24 16:54:06 UTC
Ok, it's getting weirder. 
I put some debug output around the loading of the preview.html page. 

```
connect(
        this,
        &QWebEngineView::loadFinished,
        [d](bool ok) {
            qDebug() << "load finished" << ok;
            d->onLoadFinished(ok);
        }
    );
    connect(this, &QWebEngineView::loadProgress, this, [](int p){
        qDebug() << "progress" << p;
        });
    connect(this, &QWebEngineView::loadStarted, this, [](){
        qDebug() << "load started";
        });
```

From QtCreator:
load started
progress 0
progress 70
progress 100
load finished true


on the installed application:
load started
progress 0
export as HTML 100298
Future finished
onHtmlReady true
set Future
progress 100


The loading is working fine from QtCreator but when installed, the loadFinished is never received and during the load it is already trying to display the preview.
Comment 12 Bug Janitor Service 2023-01-08 05:15:36 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 13 Bug Janitor Service 2023-01-23 05:05:46 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!