Gutenberg: Media library can only be opened once - upload freezes on second opening

Created on 1 Nov 2018  路  10Comments  路  Source: WordPress/gutenberg

I keep having to refresh the whole editor page when I open the media library upload for the second time. I can see the upload for a new photo start, but it then stops, and just hangs. Closing the media library and opening it does not help, I have to refresh the whole page.

[Feature] Media [Type] Bug

All 10 comments

I was unable to reproduce the problem using the following testing steps and testing with WordPress 4.9.8 and Gutenberg 4.2.0 using Firefox 63.0.1 on macOS 10.13.6:

  1. Go to Posts > Add new.
  2. Add a title.
  3. Insert an image using the "Media Library" button in the image block.
  4. Insert another image using the "Media Library" button in the image block.
  5. Add some text in a paragraph.
  6. Insert another image using the "Media Library" button in the image block.

Result: the media library opened normally for me when using the "Media Library" button in the image block. (58s)

Are your steps the same as the ones I've noted above?

Are you using a classic block (or some other block) instead of an image block?

Are you able to open the Media Library directly using that option in the left sidebar?

Can you note your OS and browser versions for reference?

If possible, can you try to see if there are any errors in the browser console at the time you try to open the media library for the second time?

Hi @designsimply

I have a Windows 10 machine, running Chrome Version 70.0.3538.102 (Official Build) (64-bit). I can't seem to find the version number of Gutenberg, but I first installed it the day I submitted the comment.

Here are my steps:

  1. Go to Posts > Add new.
  2. Add a title.
  3. Add a Gallery block.
  4. Click on Media Library inside the Gallery Block, add two photos.
  5. Enter the gallery on to the page. The photos appear. All is fine.
  6. Add another Gallery block.
  7. Click on Media Library in the Gallery Block again,
  8. Drag a photo onto the Media library to upload it.
  9. The upload bar shows 15%-ish done, but then just hangs. Nothing is shown on the far right side. If I click on the photo upload, I get the name of the image, so the Media library is only partially not working.
  10. Using the x on the upper right to close the Media library and opening it again, just brings up the same frozen upload.
  11. Drag another photo into the Media Library, upload also hangs.
  12. To resolve I have to refresh the entire page. Then I can resume uploading via the Media library.

The developer console has the following message
Active resource loading counts reached to a per-frame limit while the tab is in background. Network requests will be delayed until a previous loading finishes, or the tab is foregrounded. See for more details
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.8:9 JQMIGRATE: Migrate is installed, version 1.4.1
media-views.min.js?ver=4.9.8:2 Uncaught TypeError: Cannot read property 'text' of undefined
at n.info (media-views.min.js?ver=4.9.8:2)
at _ (backbone.min.js?ver=1.2.3:1)
at m (backbone.min.js?ver=1.2.3:1)
at f (backbone.min.js?ver=1.2.3:1)
at n.u.trigger (backbone.min.js?ver=1.2.3:1)
at n._onModelEvent (backbone.min.js?ver=1.2.3:1)
at _ (backbone.min.js?ver=1.2.3:1)
at m (backbone.min.js?ver=1.2.3:1)
at f (backbone.min.js?ver=1.2.3:1)
at n.u.trigger (backbone.min.js?ver=1.2.3:1)

Let me know if you need more info.

I experienced the same problem with a similar scenario; attempting to upload and set the featured image. Having failed to make any progress while attempting to debug my scenario I attempted to reproduce the problem with the steps listed above. The console log , using WordPress 5.0.2 and Gutenberg v4.7.1, is almost identical.

Uncaught TypeError: Cannot read property 'text' of undefined
    at n.info (media-views.min.js?ver=5.0.2:2)
    at _ (backbone.min.js?ver=1.2.3:1)
    at m (backbone.min.js?ver=1.2.3:1)
    at f (backbone.min.js?ver=1.2.3:1)
    at n.u.trigger (backbone.min.js?ver=1.2.3:1)
    at n._onModelEvent (backbone.min.js?ver=1.2.3:1)
    at _ (backbone.min.js?ver=1.2.3:1)
    at m (backbone.min.js?ver=1.2.3:1)
    at f (backbone.min.js?ver=1.2.3:1)
    at n.u.trigger (backbone.min.js?ver=1.2.3:1)

image

I was also able to reproduce the problem with define('SCRIPT_DEBUG', true ); in WordPress 5.0.2 with no plugins and the Twenty Nineteen theme v1.1

Uncaught TypeError: Cannot read property 'text' of undefined
    at n.info (media-views.js?ver=5.0.2:5015)
    at _ (backbone.min.js?ver=1.2.3:1)
    at m (backbone.min.js?ver=1.2.3:1)
    at f (backbone.min.js?ver=1.2.3:1)
    at n.u.trigger (backbone.min.js?ver=1.2.3:1)
    at n._onModelEvent (backbone.min.js?ver=1.2.3:1)
    at _ (backbone.min.js?ver=1.2.3:1)
    at m (backbone.min.js?ver=1.2.3:1)
    at f (backbone.min.js?ver=1.2.3:1)
    at n.u.trigger (backbone.min.js?ver=1.2.3:1)

I added console.log( this ); to the info: function. This screen capture might help.
image

having the exact same issue. I have posts that are 100% relying on the galleries. Has anyone come up with a patch? or any info when WP will fix this?

This is still an issue, just confirmed it in Gutenberg 5.4.0 on Windows 10 and Chrome Version 73.0.3683.103 (Official Build) (64-bit).

Would be good to have some eyes on this as time allows @antpb @joemcgill @getsource

If this helps in advancing this in Cue having the same exact issue.
Server Cache = Litespeed. If I clear cache between uploads this does not occur.

Still nothing going on in this issue?

I got this, but on an ACF settings page. I'm probably being stupid, but I cannot find a ticket for it on Trac. Does anyone know if its even being looked at by the core team?

Was this page helpful?
0 / 5 - 0 ratings