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.

Cannot read property 'profileToken' of undefined

See original GitHub issue

When trying to connect to the camera an error occurs:

TypeError: Cannot read property 'profileToken' of undefined
    at Cam.getStreamUri ([...]node_modules/onvif/lib/media.js:802:67)
    at Cam.<anonymous> ([...]index.js:11:8)
    at Cam.<anonymous> ([...]node_modules/onvif/lib/cam.js:128:19)
    at Cam.<anonymous> ([...]node_modules/onvif/lib/media.js:729:14)
    at parseSOAPString ([...]node_modules/onvif/lib/utils.js:98:3)
    at IncomingMessage.<anonymous> ([...]node_modules/onvif/lib/cam.js:206:4)
    at IncomingMessage.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
distantecommented, Sep 20, 2022

Maybe this helps someone, I got this error because I was using http://123.my.camera.ip, and I should just use 123.my.camera.ip

1reaction
agshcommented, Oct 29, 2019

@strarsis It seems that your cam sends a response for the getCapabilities method even with the wrong credentials or it hasn’t got any active source. You can check cam.activeSources property before calling any media method. Also, I’ve added a new event warning in the master branch. So you can check this trouble by subscribing:

cam.on('warning' msg => { console.warning(msg); });
Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native, GraphQL, Apollo - Error thrown during mutation
Well the error means something is searching for x.variables and x being null. The only time variables seems to be called is in...
Read more >
Onvif camera control - General - Node-RED Forum
Onvif media-related SOAP requests require to specify the profile token. ... TypeError: Cannot read property '0' of undefined nodered.service: Main process ...
Read more >
req.headers.authorization undefined - You.com - You.com
req.headers['authorization'] is undefined in Nodejs JWT(JSON WEB TOKEN) ... error: client gets "Cannot read property 'headers' of undefined"#1537.
Read more >
node-red-contrib-onvif-nodes - npm
... to get a usable set of nodes (without needing great tools like ONVIF ... results in TypeError: Cannot read property 'call' of...
Read more >
How to use the superagent.put function in superagent - Snyk
... res); // cannot read property of null if (error && error.code === 'ENOTFOUND') { console.log('\nThere has been an error publishing your resume....
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