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

Video upload isn't working like expected #32910

Closed
marecar3 opened this issue May 8, 2019 · 8 comments
Closed

Video upload isn't working like expected #32910

marecar3 opened this issue May 8, 2019 · 8 comments
Assignees
Labels
[Feature] VideoPress A feature to help you upload and insert videos on your site. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@marecar3
Copy link

marecar3 commented May 8, 2019

Describe the bug

  1. When I try to upload an mp4 video using Premium account, It's with success in 30% of attempts and in a case of failure, I am getting random errors :
  • Stuck on "converting 99% "
  • Stuck on "Loading..."
  • Stuck on "Conversion error"
  • Stuck on "converting 52%"
  1. When it's a success I can't preview uploaded video

To reproduce
Steps to reproduce the behavior:

  1. Download video from https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4
  2. Create a new Gutenberg (Block Editor) Post
  3. Add video block
  4. Select Upload and pick a downloaded video from step 1.

Expected behavior
Sometimes it's stuck with uploading, sometimes it's working

Screenshots

Screen Shot 2019-05-08 at 1 34 45 PM

Screen Shot 2019-05-08 at 11 10 02 AM

Desktop (please complete the following information):

  • OS Mac OS Mojave : 10.14.3
  • Browser Chrome
  • Version 73.0.3683.86 (Official Build) (64-bit)
@gwwar gwwar added [Feature] VideoPress A feature to help you upload and insert videos on your site. [Type] Bug When a feature is broken and / or not performing as intended and removed [Feature] VideoPress A feature to help you upload and insert videos on your site. labels May 8, 2019
@cecoates
Copy link

cecoates commented Aug 16, 2019

I had a similar issue today.

#14530001-hc

This error was a bit less helpful, "unknown error". The Learn More link just redirects to the Videopress website.

That error shows when using the video block AND in the media library.

The video itself seems fine, and if you copy the video URL into a paragraph block it embeds as expected.

Screen Shot on 2019-08-16 at 13_32_15

@nagpai
Copy link
Contributor

nagpai commented Aug 22, 2019

Noticed this on #14691764-hc

@kwight
Copy link
Contributor

kwight commented Oct 11, 2019

This seems to be caused by some sort of polling to https://io.videopress.com/socket.io/?guid=<guid>&... that never resolves; they just continue endlessly (which presumably means that some UI check never completes, leaving the preview in an unresolved state).

The VideoPress preview is also an iframe within an iframe within the Video block; that can't be good.

Screen Shot 2019-10-11 at 3 35 04 PM

@mmtr
Copy link
Member

mmtr commented Oct 15, 2019

I noted an interesting pattern. Every time the previews gets stuck in the loading state, requests to https://public-api.wordpress.com/rest/v1/videos/<guid>?http_envelope=1 return valueless width/height:

Screen Shot 2019-10-15 at 11 30 09

However, working previews get proper values:

Screen Shot 2019-10-15 at 11 31 14

I think this is related to some kind of race condition and it's depending on the speed of the transcoder job (sometimes data is retrieved when the transcoder already set the dimensions, sometimes it is retrieved too early).

@mmtr
Copy link
Member

mmtr commented Oct 15, 2019

Just confirmed the issue is coming from the VideoPress JS library. The player gets stuck because it is not refetching the data when the video is processing, although it should do it according to https://github.com/Automattic/videopress/blob/ff199f65feff54db19799005237b11687e3b9385/lib/watch.js#L28. Will keep investigating.

@mmtr
Copy link
Member

mmtr commented Oct 15, 2019

It ended up being a problem of the video-wp-com theme in WP.com. That theme is setting a custom request provider that is executed only once because it is hooked into the window's load event. I'm preparing a diff refactoring that function to see if that solves this issue.

@mmtr
Copy link
Member

mmtr commented Oct 16, 2019

Fix undergoing in D34084-code.

@kwight
Copy link
Contributor

kwight commented Oct 16, 2019

The first part of this bug is now fixed by @mmtr in D34084-code: uploads complete predictably and consistently 🎉

When it's a success I can't preview uploaded video

This part remains; I'm closing this issue and we'll use #36836 to track the inactive UI.

@kwight kwight closed this as completed Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] VideoPress A feature to help you upload and insert videos on your site. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

6 participants