What I’m trying to do
I wanted to see if Web Clipper would help with this post question, but when opening Web Clipper on https://www.youtube.com/feed/history I got an error Unable to initialize page content: Cannot read properties of undefined (reading 'slice')
Before opening an issue on GitHub, I wanted to check if somebody else got this or if they found a solution.
Things I have tried
Removed all my templates from Web Clipper. I tried only on Chrome Version 131.0.6778.205, Windows 11. I Googled and checked this forum for answers.
Cheers, Marko
This has already been reported and will be fixed in the next version.
opened 08:58PM - 10 Dec 24 UTC
bug
**Version :**
- OS: iPadOS
- Browser: Safari
- Web Clipper version: 0.10.5
…
- Obsidian version: 1.7.7
**Describe the bug**
Opening a video in Safari, either with www.youtube.com or m.youtube.com, and then using obsidian web clipper shows only an error in place of the typical dialog with the results and the add to obsidian button. Even the templater selector or the "..." to see the variables are gone, as the following screenshot shows.
![IMG_3672](https://github.com/user-attachments/assets/60d1c00b-9ae0-48ce-a89f-a7683e0d38ac)
The error says: "Unable to initialize page content: undefined is not an object (evaluating 'e.description.slice')"
I deleted all my templates, just in case, and restored the default template, but the result is the same. This bug is new on 0.10.5, everything was fine before.
**Expected behavior**
Not to break the plugin.
**URLs where the bug occurs**
Any video in youtube.
**Additional note**
I guess the problem was introduced in the new youtube extractor, in particular at line 36 in youtube.ts (https://github.com/obsidianmd/obsidian-clipper/blob/d9a87586a0dc2413bc1fb9f610ea907933443817/src/utils/extractors/youtube.ts#L36)
However, other platforms seem to be unaffected (eg. firefox on windows)
It’s the same issue, but the error changes from browser to browser.
1 Like
Thanks for pointing it out!
Cheers, Marko
1 Like