Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'findtext' of null #27

Open
KenADev opened this issue Jan 10, 2017 · 2 comments
Open

TypeError: Cannot read property 'findtext' of null #27

KenADev opened this issue Jan 10, 2017 · 2 comments

Comments

@KenADev
Copy link

KenADev commented Jan 10, 2017

Hey,

yesterday everything was working okay, but today i get this error when i try to send a video to one of my Samsung TVs:
(Everything is working for my other two Samsung TVs, and i didn't change anything...)

C:\Users\***\Documents\nodejs-projects\samsung-dlna\node_modules\upnp-device-client\index.js:571
    var value = node.findtext('./' + field);
                    ^

TypeError: Cannot read property 'findtext' of null
    at C:\Users\***\Documents\nodejs-projects\samsung-dlna\node_modules\upnp-device-client\index.js:571:21
    at Array.forEach (native)
    at extractFields (C:\Users\***\Documents\nodejs-projects\samsung-dlna\node_modules\upnp-device-client\index.js:570:10)
    at parseDeviceDescription (C:\Users\***\Documents\nodejs-projects\samsung-dlna\node_modules\upnp-device-client\index.js:440:14)
    at C:\Users\***\Documents\nodejs-projects\samsung-dlna\node_modules\upnp-device-client\index.js:46:16
    at C:\Users\***\Documents\nodejs-projects\samsung-dlna\node_modules\upnp-device-client\index.js:559:7
    at ConcatStream.<anonymous> (C:\Users\***\Documents\nodejs-projects\samsung-dlna\node_modules\concat-stream\index.js:36:43)
    at emitNone (events.js:91:20)
    at ConcatStream.emit (events.js:185:7)
    at finishMaybe (C:\Users\***\Documents\nodejs-projects\samsung-dlna\node_modules\readable-stream\lib\_stream_writable.js:513:14)

The error is blocking furher execution.

I wonder what is going on there.
It's neither working from my Windows PC nor my Raspberry Pi.
Even though, I can send videos per upnp from Windows Media Player to this TV...

Can you give me a hint what is going on there in the code?

This is my code by the way:

var MediaRendererClient = require('upnp-mediarenderer-client');
var options = {
    autoplay: true, //play immediately
    contentType: 'video/x-ms-wmv',
    metadata: {
        title: 'Tuer klingelt',
        creator: 'Smarthome',
        type: 'video' //, // can be 'video', 'audio' or 'image'
    }
};

var client = new MediaRendererClient('http://192.168.178.26:7676/smp_11_');
client.load('http://*****/img/doorbell.wmv', options, function (err, result)
{
    console.log(result);
    if (err) throw err;
    console.log('VIDEO SUCCESSFULLY SENT TO TV!');
});
@rzfzr
Copy link

rzfzr commented Jul 28, 2022

@KenADev Did you ever solve it?

@KenADev
Copy link
Author

KenADev commented Jul 28, 2022

@KenADev Did you ever solve it?

I solved it somehow, but unfortunately, it's been over 5 years ago and I don't have the code anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants