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.

Error in heartbeat function

See original GitHub issue

When using the launcher, we encounter an error in the heartbeat function

[20:01:01] TypeError: Cannot read property 'title' of undefined
    at Timeout._onTimeout (/home/travis/build/ampproject/amphtml/node_modules/karma-sauce-launcher/dist/launcher/launcher.js:36:20)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

Relevant snippet:

  // Heartbeat function to keep alive sessions on Sauce Labs via webdriver JSON wire calls
  const heartbeat = () => {
    pendingHeartBeat = setTimeout( (driver) => {
      log.debug('Heartbeat to Sauce Labs (%s) - fetching title', browserName)

      driver.title()
        .then(null, (err) => {
          log.error('Heartbeat to %s failed\n  %s', browserName, formatSauceError(err))

          clearTimeout(pendingHeartBeat)
          return this._done('failure')
      });

      heartbeat()
      }, 60000);
}

I’m not sure how driver could get set; I’m not familiar with setTimeout providing any arguments to its callback. Should this be trying to read from connectedDrivers or something similar?

/cc @joshmgrant

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
joshmgrantcommented, May 13, 2020

@rcebulko not yet but I’m going to see if I can get something together in the next few days

1reaction
triadiprabowocommented, Apr 1, 2020

I am experiencing same problem in version 4.1.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Heartbeat (computing) - Wikipedia
In computer science, a heartbeat is a periodic signal generated by hardware or software to indicate normal operation or to synchronize other parts...
Read more >
Effectiveness of the heartbeat interval error and compensation ...
The purpose of this study is to evaluate the effectiveness of heartbeat error and compensation methods on heart rate variability (HRV) with mobile...
Read more >
Heartbeat (PDA cluster) not able to start RPCs not reachable
Symptom. You try to start hearbeat but it fails with long list of error messages. If these lines are visible it means there...
Read more >
Detecting Dead TCP Connections with Heartbeats ... - RabbitMQ
Setting heartbeat timeout value too low can lead to false positives (peer being considered unavailable while it is not really the case) due...
Read more >
Error control protocols - CAN in Automation (CiA)
Error control protocols enable the monitoring of a CANopen network. They comprise the Heartbeat-, Node-/Life-Guarding-, as well as the Boot-up protocol.
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