question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

localhost refused to connect when viewing pdf file

See original GitHub issue

I use the code-server with latex-workshop for remote latex editing. But there is a problem that when I try to view the pdf file, it always reported “localhost refused to connect”. I made it in docker using Ubuntu 20.04 image and work with jupyterhub, and also tried directly in Ubuntu 20.04, both the same error.

Thanks.

  • Web Browser: Chrome/New Edge
  • Local OS: Windows 10
  • Remote OS: Ubuntu/Ubuntu Docker
  • Remote Architecture: X64
  • code-server --version: 3.4.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
code-ashercommented, Sep 14, 2020

That error might mean that you aren’t using https since browsers only allow service workers in a secure context.

The only way I can think of to work around the localhost issue without making the required code changes is to forward localhost ports to the remote host. Otherwise the only solution is to wait until we can implement one of the fixes.

1reaction
fockezcommented, Aug 20, 2020

From my test, the extension works. Only pdf viewer fails. And the standalone pdf viewer extension vscode-pdf works. But they cannot work together, and latex-workshop develop group insist the localhost way for the security consideration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

localhost refused to connect when viewing pdf file · Issue #1862
I use the code-server with latex-workshop for remote latex editing. But there is a problem that when I try to view the pdf...
Read more >
How to Resolve MAMP's “Localhost Refused to Connect” Error ...
2. Allow Incoming Connections · 3. Check MAMP's Document Root · 4. Change the Port Settings · 5. Verify That Your Apache Web...
Read more >
Localhost Refused to Connect Error: 5 Confirmed Ways to Fix It
Localhost refused to connect error can be caused by an incorrectly configured port, insufficient permissions, or an inoperative web server.
Read more >
Ask Question - Stack Overflow
Refused to display 'http://127.0.0.1:8000/files/xxx.pdf' in a frame because it set 'X-Frame-Options' to 'sameorigin' in Node Express API ; You're ...
Read more >
Chrome PDF Viewer Not Working? Here's How to Fix It
Open the Chrome menu by clicking the three dots in the top-right corner. Click Settings. Scroll to the bottom of the page and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found