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

Common error: Cannot read property 'files' of null #891

Closed
dcposch opened this issue Sep 4, 2016 · 1 comment
Closed

Common error: Cannot read property 'files' of null #891

dcposch opened this issue Sep 4, 2016 · 1 comment

Comments

@dcposch
Copy link
Contributor

dcposch commented Sep 4, 2016

Processes: webtorrent, platforms: darwin linux win32, versions: 0.13.1
TypeError: Cannot read property 'files' of null
    at selectFiles (...\build\renderer\webtorrent.js:343:36)
    at EventEmitter.ipc.on (...\build\renderer\webtorrent.js:77:58)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)
@dcposch
Copy link
Contributor Author

dcposch commented Sep 4, 2016

How to reproduce

  • Expand any torrent that's not currently active (not downloading or seeding, eg one of the default torrents on a fresh install)
  • Click X next to any file

Easy fix

@dcposch dcposch closed this as completed in f2007be Sep 6, 2016
feross added a commit that referenced this issue Oct 5, 2016
This PR fixes one of our number 2 top error (142 error reports today
alone):

Processes: webtorrent window, platforms: darwin linux win32, versions:
pre-0.12 0.14.0 0.17.0 0.17.1
TypeError: Cannot read property 'files' of null
    at getAudioMetadata (.../build/renderer/webtorrent.js:328:21)
    at EventEmitter.<anonymous> (.../build/renderer/webtorrent.js:84:74)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

This error is reproducible if you start webtorrent for the first time
and click the WIRED CD torrent. This causes the webtorrent process to
get a  'wt-get-audio-metadata' before 'wt-start-torrenting'.

You can reproduce it 100% of the time if you force the race condition
to show itself by slowing down the sending of the 'wt-start-torrenting'
event.

(This same error was showing for an unrelated reason in the past: #891)
feross added a commit that referenced this issue Oct 5, 2016
This PR fixes one of our number 2 top error (142 error reports today
alone):

Processes: webtorrent window, platforms: darwin linux win32, versions:
pre-0.12 0.14.0 0.17.0 0.17.1
TypeError: Cannot read property 'files' of null
    at getAudioMetadata (.../build/renderer/webtorrent.js:328:21)
    at EventEmitter.<anonymous> (.../build/renderer/webtorrent.js:84:74)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

This error is reproducible if you start webtorrent for the first time
and click the WIRED CD torrent. This causes the webtorrent process to
get a  'wt-get-audio-metadata' before 'wt-start-torrenting'.

You can reproduce it 100% of the time if you force the race condition
to show itself by slowing down the sending of the 'wt-start-torrenting'
event.

(This same error was showing for an unrelated reason in the past: #891)
@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant