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.

Getting `'clockOffset' of undefined` when following the Getting Started guide

See original GitHub issue

Expected Behavior

Running the example from the β€œGetting Started” section should work successfully.

Current Behavior

Getting 'clockOffset' of undefined error when following the β€œGetting Started” example

Cannot read property 'clockOffset' of undefined
➜  clinic doctor --autocannon [ / ] -- node ./slow-io
Running 10s test @ http://localhost:3000/
10 connections

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Stat    β”‚ 2.5%   β”‚ 50%     β”‚ 97.5%   β”‚ 99%     β”‚ Avg        β”‚ Stdev     β”‚ Max        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Latency β”‚ 711 ms β”‚ 1304 ms β”‚ 1861 ms β”‚ 1887 ms β”‚ 1315.23 ms β”‚ 341.29 ms β”‚ 1887.37 ms β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Stat      β”‚ 1%    β”‚ 2.5%  β”‚ 50%    β”‚ 97.5%   β”‚ Avg     β”‚ Stdev β”‚ Min   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Req/Sec   β”‚ 2     β”‚ 2     β”‚ 8      β”‚ 9       β”‚ 7       β”‚ 2.05  β”‚ 2     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Bytes/Sec β”‚ 300 B β”‚ 300 B β”‚ 1.2 kB β”‚ 1.35 kB β”‚ 1.05 kB β”‚ 307 B β”‚ 300 B β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜

Req/Bytes counts sampled once per second.

70 requests in 10.06s, 10.5 kB read
[    ] Analysing data/Users/cowchimp/temp/node-clinic-doctor-examples-master/node_modules/@nearform/doctor/format/trace-event-decoder.js:49
          self.clockOffset = systemInfo.clockOffset
                                        ^

TypeError: Cannot read property 'clockOffset' of undefined
    at /Users/cowchimp/temp/node-clinic-doctor-examples-master/node_modules/@nearform/doctor/format/trace-event-decoder.js:49:41
    at Endpoint.finish (/Users/cowchimp/temp/node-clinic-doctor-examples-master/node_modules/endpoint/endpoint.js:36:5)
    at Object.onceWrapper (events.js:281:20)
    at Endpoint.emit (events.js:198:15)
    at finishMaybe (_stream_writable.js:646:14)
    at endWritable (_stream_writable.js:663:3)
    at Endpoint.Writable.end (_stream_writable.js:594:5)
    at onend (/Users/cowchimp/temp/node-clinic-doctor-examples-master/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:627:10)
    at processTicksAndRejections (internal/process/task_queues.js:79:9)

Steps to Reproduce (for bugs)

  1. Test against node-clinic-doctor-examples as detailed here https://clinicjs.org/documentation
git clone git@github.com:nearform/node-clinic-doctor-examples.git
cd node-clinic-doctor-examples
npm install
clinic doctor --autocannon [ / ] -- node ./slow-io

Sample upload

Environment

  • Clinic.js version: Clinic 5.0.0 and doctor 4.1.0
  • Node.js version: Node 11.14.0 and npm 6.9.0
  • Browser name and version: Chrome 78.0.3904.97
  • Operating system and version: OS X 10.13.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
goto-bus-stopcommented, Mar 10, 2020

This should be fixed in doctor πŸ“¦ 4.1.1. Thanks!

1reaction
mrdownscommented, Feb 15, 2020

The same thing is happening to me, both on the sample app and in my own codebase. Ran the sample app after this stopped me from using clinic in my own app.

➜  node-clinic-doctor-examples git:(master) clinic doctor --autocannon [ / ] -- node ./slow-io
? May Clinic.js report anonymous usage statistics to improve the tool over time? No
Running 10s test @ http://localhost:3000/
10 connections

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Stat    β”‚ 2.5%   β”‚ 50%     β”‚ 97.5%   β”‚ 99%     β”‚ Avg        β”‚ Stdev     β”‚ Max        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Latency β”‚ 675 ms β”‚ 1211 ms β”‚ 1883 ms β”‚ 1950 ms β”‚ 1242.78 ms β”‚ 301.25 ms β”‚ 1950.16 ms β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Stat      β”‚ 1%    β”‚ 2.5%  β”‚ 50%    β”‚ 97.5%  β”‚ Avg     β”‚ Stdev β”‚ Min   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Req/Sec   β”‚ 2     β”‚ 2     β”‚ 8      β”‚ 10     β”‚ 7.5     β”‚ 2.34  β”‚ 2     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Bytes/Sec β”‚ 300 B β”‚ 300 B β”‚ 1.2 kB β”‚ 1.5 kB β”‚ 1.13 kB β”‚ 350 B β”‚ 300 B β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜

Req/Bytes counts sampled once per second.

75 requests in 10.07s, 11.3 kB read
[==  ] Analysing data/Users/mdowns/.nvm/versions/node/v10.16.0/lib/node_modules/clinic/node_modules/@nearform/doctor/format/trace-event-decoder.js:49
          self.clockOffset = systemInfo.clockOffset
                                        ^

TypeError: Cannot read property 'clockOffset' of undefined
    at /Users/mdowns/.nvm/versions/node/v10.16.0/lib/node_modules/clinic/node_modules/@nearform/doctor/format/trace-event-decoder.js:49:41
    at Endpoint.finish (/Users/mdowns/.nvm/versions/node/v10.16.0/lib/node_modules/clinic/node_modules/endpoint/endpoint.js:36:5)
    at Object.onceWrapper (events.js:286:20)
    at Endpoint.emit (events.js:203:15)
    at finishMaybe (_stream_writable.js:646:14)
    at endWritable (_stream_writable.js:663:3)
    at Endpoint.Writable.end (_stream_writable.js:594:5)
    at onend (/Users/mdowns/.nvm/versions/node/v10.16.0/lib/node_modules/clinic/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:646:10)
    at process._tickCallback (internal/process/next_tick.js:61:11)

Clinic 5.0.0 node v10.16.0 npm 6.11.3 OS X 10.15.3

Followed the same steps as above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'uuid' of undefined Β· Issue #166
Hey guys, I get the following error: ... while trying to read a characteristic using the following code from the Getting Started tutorial....
Read more >
runzero-manual.pdf
To get started, you'll need to sign up for a runZero account. runZero offers three editions: starter, professional, and enterprise. Choose theΒ ...
Read more >
Java 8 Clock offset() method with Examples - GeeksforGeeks
Parameters: This method accepts two mandatory parameters: baseclock – a clock for adding duration. It cannot be a null value. offsetDuration – ...
Read more >
Use Best Practices for Network Time Protocol - Cisco
Introduction. This document describes the best practices to design Network Time Protocol. Prerequisites. Requirements.
Read more >
A.19. Common libvirt Errors and Troubleshooting
Restart libvirt to determine if this has solved the problem. If libvirtd still does not start successfully, an error similar to the following...
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