[BUG] Unable start `TypeError: Cannot read properties of null (reading 'includes')`
See original GitHub issueDescribe the bug Can`t start youtubedl-m due error includes null
2022-05-05T08:58:55.945Z INFO: Config items set using ENV variables.
/home/debian/youtubedl-material/youtube-dl.js:93
if (!is_windows && details_json && details_json['path'].includes('.exe')) {
^
TypeError: Cannot read properties of null (reading 'includes')
at Object.exports.verifyBinaryExistsLinux (/home/debian/youtubedl-material/youtube-dl.js:93:61)
at startYoutubeDL (/home/debian/youtubedl-material/app.js:671:19)
at loadConfig (/home/debian/youtubedl-material/app.js:514:11)
at async setAndLoadConfig (/home/debian/youtubedl-material/app.js:483:5)
I see the PR about checking binary of youtube-dl
, seems it solve some weird behaviour thinking run windows? and no .exe
extension here. Full path will be node_modules/youtube-dl/bin/youtube-dl
To Reproduce Steps to reproduce the behavior:
- Follow install guide
- node ./app.js
Expected behavior Application should start
Screenshots
Environment
- YoutubeDL-Material git master
- Dockerized nodejs 16 self build
Youtube-dl version
Youtube-dl itself installed by NPM correctly with version 2021.12.17
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >TypeError: Cannot read properties of null (reading 'user')
Initially, in the first render, user state has a value null and thus user cant have a property. WHat you can do to...
Read more >TypeError: Cannot read property 'includes' of Null in JS
The "Cannot read property 'includes' of null" error occurs when the `includes()` method is called on a variable that stores a `null` value....
Read more >Cannot read properties of null (reading 'contains')error in react ...
TypeError : Cannot read properties of null ( reading ' contains '), Need useEffect Cleanup,EventBubblingtypeerror cannot read property of null ...
Read more >Creating comment failed: TypeError: Cannot read properties of ...
Issue a comment for repo B; will fail and not be saved. Works once you restart Vscode and edit the PR of B...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@GlassedSilver no need to overcomplicate it! We can just check if the path is null and handle that case. More ideally we should check all necessary fields to make sure they’re set properly.
I actually expected the details file to be more mangled than this. The hotfix will prevent the error from coming up but I’ll make a more permanent solution that handles more edge cases. Thanks for the info @martadinata666!
Technically, yes it works. But can’t really tell specific situation like #601 , as i myself build for my arm64 and not encountering something like that. Maybe some node 12 quirk. I will send PR to test nodejs upgrade.