YouTube embed previews show "Error 153" on iOS

Aperta
#872 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ios, javascript, vite
Ambito
frontend, mobile

Direzione di ricerca

Start with the embed preview's sandboxed frame and the sandbox attribute on it, then check EditorNavigationPolicy for how target="_blank" links are handled. Reproduce by running a production build (make build) on iOS and comparing it with the Vite dev server. Done means the preview plays or its links open in the system browser, but the cause is still a hypothesis, so confirm it first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug iOS
Description

On iOS, YouTube embed previews in the editor show "Video player configuration error / Error 153" instead of the video. The links in the error overlay ("Watch on YouTube", "Learn more") do nothing when tapped. I expect the preview to play, or at least the links to open in the system browser.

This only happens in production builds. With the Vite dev server, previews play.

YouTube shows Error 153 when the embed request has no Referer. A production build loads the editor as a file:// document, so neither the embed preview's sandbox frame nor the YouTube iframe inside it has an http(s) URL to send as Referer. The dev server's page is http://localhost, so it sends one. Gutenberg's Safari referrer fix (WordPress/gutenberg#84014) sets the sandbox's URL to the page's URL, which is still file:// in production.

The dead links are probably caused by the embed preview's sandbox frame. Its sandbox attribute has no allow-popups, and nested frames inherit that, so YouTube's target="_blank" links are blocked before they reach EditorNavigationPolicy. This hasn't been tested yet.

Step-by-step reproduction instructions
  1. Run a production build of the editor (make build, not the dev server).
  2. Open the editor for any site.
  3. Insert a YouTube embed block with https://www.youtube.com/watch?v=dQw4w9WgXcQ.
  4. Note the preview shows "Error 153".
  5. Tap "Watch on YouTube" or "Learn more" and note nothing happens.
Screenshots, screen recording, code snippet

No response

Environment info
  • GutenbergKit trunk (3389e86f), iOS demo app, production build
  • iPhone 18 Pro Max Simulator, iOS 27.0
  • Seen on a WP Cloud site and a WordPress.com Simple site
  • Android not checked yet
Please confirm that you have searched existing issues in the repo.
  • Yes
Lingua principale
JavaScript
Stelle
29
Fork
6
Merge medio
2g 1h
PR unite (30g)
76

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wordpress-mobile/GutenbergKit

Tutte le issue di wordpress-mobile/GutenbergKit

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.