You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of WebTorrent Desktop? (See the 'About WebTorrent' menu)
0.8.1
What operating system and version?
OS X latest
What did you do?
Add a torrent
What did you expect to happen?
It starts.
What actually happened?
rendering error: Cannot read property 'numPiecesPresent' of undefined
TypeError: Cannot read property 'numPiecesPresent' of undefined
at renderFileRow (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:227:24)
at torrentSummary.files.map.sort.map (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:200:26)
at Array.map (native)
at renderTorrentDetails (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:200:10)
at renderTorrent (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:51:24)
at TorrentList.state.saved.torrents.map (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:12:25)
at Array.map (native)
at Object.TorrentList as home
at getView (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/app.js:81:20)
at App (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/app.js:44:30)
main.js:470 webtorrent: sent wt-save-torrent-file
main.js:470 webtorrent: sent wt-generate-torrent-poster
main.js:470 webtorrent: got wt-progress
/Applications/WebTorrent.app/Contents/Resources/app.asar/node_modules/raf/index.js:74 Uncaught TypeError: Cannot read property 'ownerDocument' of null
The text was updated successfully, but these errors were encountered:
I've gotten this error before (since a few versions back), but I'm not too sure why. If I read the code correctly, the code that accesses numPiecesPresent shouldn't be run if the torrent isn't ready yet.
This seems to happen if the torrent is expanded too fast, i.e. renderFileRow gets called before the wt-progress event. This especially becomes a problem when the torrent is expanded initially as it's added. I don't know why this would be the case, but when i tested it, if I removed a torrent when it was expanded and added it again it would still be expanded and often cause this crash.
A simple fix might be to null-check torrentSummary.progress.files[index] at this line, which seems alright since we are already checking the progress and files properties. However a more general way of determining the ready state of a torrent seems ideal.
What version of WebTorrent Desktop? (See the 'About WebTorrent' menu)
0.8.1
What operating system and version?
OS X latest
What did you do?
Add a torrent
What did you expect to happen?
It starts.
What actually happened?
rendering error: Cannot read property 'numPiecesPresent' of undefined
TypeError: Cannot read property 'numPiecesPresent' of undefined
at renderFileRow (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:227:24)
at torrentSummary.files.map.sort.map (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:200:26)
at Array.map (native)
at renderTorrentDetails (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:200:10)
at renderTorrent (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:51:24)
at TorrentList.state.saved.torrents.map (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/home.js:12:25)
at Array.map (native)
at Object.TorrentList as home
at getView (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/app.js:81:20)
at App (/Applications/WebTorrent.app/Contents/Resources/app.asar/renderer/views/app.js:44:30)
main.js:470 webtorrent: sent wt-save-torrent-file
main.js:470 webtorrent: sent wt-generate-torrent-poster
main.js:470 webtorrent: got wt-progress
/Applications/WebTorrent.app/Contents/Resources/app.asar/node_modules/raf/index.js:74 Uncaught TypeError: Cannot read property 'ownerDocument' of null
The text was updated successfully, but these errors were encountered: