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

Cannot read property 'statusCode' of undefined and Error: connect ENOENT /path.m3u8 #3

Open
kaanozcan opened this issue May 16, 2018 · 0 comments

Comments

@kaanozcan
Copy link

kaanozcan commented May 16, 2018

Hello, I am getting a strange error.

TypeError: Cannot read property 'statusCode' of undefined`  
    at Request._callback (/node-index-page/node_modules/hls-buffer/index.js:30:17)
    at self.callback (/node-index-page/node_modules/hls-buffer/node_modules/request/request.js:129:22)
    at emitOne (events.js:115:13)
    at Request.emit (events.js:210:7)
    at ClientRequest.self.clientErrorHandler (/node-index-page/node_modules/hls-buffer/node_modules/request/request.js:239:10)
    at emitOne (events.js:120:20)
    at ClientRequest.emit (events.js:210:7)
    at Socket.socketErrorListener (_http_client.js:385:9)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Which is caused by this line https://github.com/mafintosh/hls-buffer/blob/master/index.js#L30 because there is no error check. Which I can offer my help. So with a help of a global request logger I have managed to get the actual request and its error which is:

{
    port: 80,                                                                                                                                                        
    path: '/tjktv.m3u8',                                                                                                                                                            
    host: 'tjktv.ercdn.net',                                                                                                                                                        
    href: 'http://tjktv.ercdn.net/tjktv.m3u8',                                                                                                                                      
    method: 'GET',                                                                                                                                                                  
    headers: { host: 'tjktv.ercdn.net' },                                                                                                                                           
    error:  {
      Error: connect ENOENT /tjktv.m3u8                                                                                                                                            
      at Object._errnoException (util.js:1021:11)                                                                                                                                   
      at _exceptionWithHostPort (util.js:1043:20)                                                                                                                                   
      at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1175:14)                                                                                                              
      code: 'ENOENT',                                                                                                                                                              
      errno: 'ENOENT',                                                                                                                                                             
      syscall: 'connect',                                                                                                                                                          
      address: '/tjktv.m3u8'
    }
}

When I curl http://tjktv.ercdn.net/tjktv.m3u8

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1050000,NAME=576p,RESOLUTION=1024x576
tjktv_576p.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=770000,NAME=480p,RESOLUTION=845x480
tjktv_480p.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=520000,NAME=360P,RESOLUTION=640x360
tjktv_360p.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=260000,NAME=240P,RESOLUTION=426x240
tjktv_240p.m3u8

My initialization code is same as in the README.md

I can offer my help for the first one but I have no idea why the second one is happening. Project is running on node:8.7.0-slim

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

1 participant