Disable all the other extensions except for LaTeX Workshop, and check that you still see this issue. [Required] You still see this issue?: Yes
Describe the bug [Required]
PDF invert no longer working from time to time (like after reloading vscode) after 7.0.0 update

Desktop [Required]:
It's working perfectly fine for me with "latex-workshop.view.pdf.invert": 0.86 in 7.0.0 (Arch Linux, VS Code 1.34.0).
@memeplex it happens to me yesterday and then for some reason it's back to normal and then happened again today.
I can verify that the invert setting works for me in Linux but not in Windows.
@trevorgunn If I reload vscode, sometimes it works again, but most of the times, it's not.
Before a stable method of reproducing the problem is found, I cannot debug the problem. You may want to inspect the developer's console for any log messages suspicious.
@James-Yu issue was also found by @trevorgunn as well. I indeed attached all the logo found in the console. The stable method to reproduce is double click a .tex file and then toggle View LaTex PDF and then pdf color will not invert.
Two things:
Between 6.5.1 and 7.0.0 I've found that the wsServer no longer sends a message of loaded when the page is loaded, causing the value of view.pdf.invert never to be sent to the web page. I.e. https://github.com/James-Yu/LaTeX-Workshop/blob/14f188ad7c2e362405256c3f0bb8d2f3443b7e4c/src/components/viewer.ts#L215 is never reached and therefore neither is line 232.
When you open the pdf url in Firefox, rather than in VS Code, somehow it works:
I'm not sure what to make of this.
I've figured out that changing line 127 of viewer.ts https://github.com/James-Yu/LaTeX-Workshop/blob/14f188ad7c2e362405256c3f0bb8d2f3443b7e4c/src/components/viewer.ts#L127 from
localhost:${this.extension.server.port}
to
${this.extension.server.address}
makes colour inversion work again.
This was discussed before in this review: https://github.com/James-Yu/LaTeX-Workshop/pull/1357#pullrequestreview-233721943
I don't know what other effects changing this has.
@tamuratak maybe you know something about this?
@trevorgunn thanks for locating the culprit.
I confirm that it works on OS X too, so this is a Windows only issue. It seems that localhost and 127.0.0.1 are not handled the same way under Windows.
@trevorgunn I have found there has been a bug although I cannot reproduce this issue on my Windows 10 machine. Please confirm that #1402 solves this issue.
Yes, #1402 works for me.
Great. Thanks for your report. It helped us a lot.
@tamuratak It was fixed for me. but I just installed an extension and then uninstalled it, which requires reloading vscode and then the pdf invert stopped working again... am i missing something?
The fixed version of LaTeX Workshop has not been released yet. Please wait for a while.
Most helpful comment
I've figured out that changing line 127 of
viewer.tshttps://github.com/James-Yu/LaTeX-Workshop/blob/14f188ad7c2e362405256c3f0bb8d2f3443b7e4c/src/components/viewer.ts#L127 fromto
makes colour inversion work again.
This was discussed before in this review: https://github.com/James-Yu/LaTeX-Workshop/pull/1357#pullrequestreview-233721943
I don't know what other effects changing this has.
@tamuratak maybe you know something about this?