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.

Can't load specific urls

See original GitHub issue

Hello, i’m trying to load the following urls:

  1. https://nevnov.ru/487640-v-peterburge-otkrylas-vystavka-illyustracii-k-romanu-evgeniya-vodolazkina-lavr
  2. https://nevnov.ru/488016-v-noch-alyh-parusov-v-peterburge-budut-kursirovat-avtobusy

and some other articles from that site. But loading via headless chrome is freezing, but in normal mode everything alright.

Sample code is:

const CDP = require('chrome-remote-interface');

CDP((client) => {
    // extract domains
    const {Network, Page} = client;
    // setup handlers
    Network.requestWillBeSent((params) => {
        console.log(params.request.url);
    });
    Page.loadEventFired(() => {
        console.log('Page loaded...');
        client.close();
    });
    // enable events then start!
    Promise.all([
        Network.enable(),
        Page.enable()
    ]).then(() => {
        return Page.navigate({url: 'https://nevnov.ru/488016-v-noch-alyh-parusov-v-peterburge-budut-kursirovat-avtobusy'});
    }).catch((err) => {
        console.error(`ERROR: ${err.message}`);
        client.close();
    });
}).on('error', (err) => {
    console.error('Cannot connect to remote endpoint:', err);
});

As i understand, some resources can’t be loaded. How can i fix it? Hope on your response.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cyrus-andcommented, Jul 31, 2017

Oh that’d explain then, see this FAQ entry.

1reaction
cyrus-andcommented, Jun 21, 2017

The freezing may happen if the Page.loadEventFired event is not fired, for example if some important resource never finishes loading, i.e., the server keeps the request pending, I’m not talking about errors. In this case a timeout is usually fired so the freezing should be temporary. In automated page loads it’s a good idea though to explicitly set a custom timeout to avoid that a bougus site blocks the whole testbed, for example:

setTimeout(() => {
    client.close();
}, giveupSeconds * 1000);

Still it doesn’t quite explain while it happens in headless mode only…

But I’m unable to reproduce your issue: I always get “Page loaded…”. What version of Chrome are you using?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to Do When a Website Won't Load | PCMag
What to Do When a Website Won't Load · Check Your Connection (and Other Sites) · See if the Problem Is on Your...
Read more >
How to Fix if You Can't Access a Particular Website - wikiHow
1. Find out if the website is down. If it's just one website you can't access, there's probably nothing wrong with your computer,...
Read more >
How to Fix Web Pages That Won't Load - Online Tech Tips
Check Out Our Dedicated Guide for Your Specific Web Page Error · Make Sure Your Internet Connection Is Working · Check if the...
Read more >
How to Fix URL Problems- 6 Effective Techniques - Appsero
How to Fix URL Problems: 6 Easy Tips to Solve Invalid URL Issues · 1. Clearing Cache · 2. Disable Problematic Extensions ·...
Read more >
How to Troubleshoot Web Pages That Won't Load
Check Your Network Connection · Research Any Error Message in Your Browser · Disable Software That Might Be Interfering · Try a Different...
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