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

BUG: iOS version fails in youtube site #249

Open
jldiaz opened this issue Dec 10, 2024 · 3 comments
Open

BUG: iOS version fails in youtube site #249

jldiaz opened this issue Dec 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@jldiaz
Copy link

jldiaz commented Dec 10, 2024

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

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 (

description: videoData.description.slice(0, 200).trim() || '',
)

However, other platforms seem to be unaffected (eg. firefox on windows)

@jldiaz jldiaz added the bug Something isn't working label Dec 10, 2024
@kepano
Copy link
Collaborator

kepano commented Dec 10, 2024

Will be fixed in the next version!

@DiCaver
Copy link

DiCaver commented Jan 2, 2025

I just want to reply on this part "However, other platforms seem to be unaffected (eg. firefox on windows)" ...

Same/similar error on:

  • OS: Windows 11
  • Browser: Chrome 131.0.6778.205
  • Web Clipper version: 0.10.5

Cheers, Marko

@d-kaue
Copy link
Contributor

d-kaue commented Jan 2, 2025

Just addressing the possible errors in order: Chrome, Firefox and Safari.

  1. Unable to initialize page content: Cannot read properties of undefined (reading 'slice')
  2. Unable to initialize page content: e.description is undefined
  3. Unable to initialize page content: undefined is not an object (evaluating 'e.description.slice')

It is already fixed in ade476b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants