mafintosh / mafintosh/peercast

cannot read property `playerState` of undefined

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
519
Forks
39
PR merge metrics
No merged PRs in 30d

Description

Error appears a few seconds after launching peercast sometimes - so far haven't noticed any condition that correlates.

Chromecast is connecting
Connected to 3/5 peers
Downloaded 1 MB (346.7 kB/s) with 0 hotswaps
Uploaded 0 Bytes (0 b/s)
/Users/rds45/.nvm/v5.7.1/lib/node_modules/peercast/bin.js:28
    status = st.playerState.toLowerCase()
               ^

TypeError: Cannot read property 'playerState' of undefined
    at EventEmitter.<anonymous> (/Users/rds45/.nvm/v5.7.1/lib/node_modules/peercast/bin.js:28:16)
    at emitOne (events.js:90:13)
    at EventEmitter.emit (events.js:182:7)
    at DefaultMediaReceiver.<anonymous> (/Users/rds45/.nvm/v5.7.1/lib/node_modules/peercast/index.js:55:20)
    at emitOne (events.js:90:13)
    at DefaultMediaReceiver.emit (events.js:182:7)
    at MediaController.onstatus (/Users/rds45/.nvm/v5.7.1/lib/node_modules/peercast/node_modules/castv2-client/lib/senders/default-media-receiver.js:16:10)
    at emitOne (events.js:90:13)
    at MediaController.emit (events.js:182:7)
    at MediaController.onmessage (/Users/rds45/.nvm/v5.7.1/lib/node_modules/peercast/node_modules/castv2-client/lib/controllers/media.js:19:12)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in bin.js at line 28 and trace the status event from index.js at line 55, then run peercast with Chromecast to investigate the intermittent failure after launch. Done means the reported scenario no longer throws the playerState TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.