Describe the bug
When creating multiple Gallery Blocks to a page, uploads to the Media Gallery will freeze when uploading via selecting Media Library > Upload after doing this more than once.
I've tested on fresh installs of WP Engine, WP Sandbox, and WordPress.com. On the wp.com it provides the error "Updating failed. User cannot access this private blog.".
To reproduce
Steps to reproduce the behavior:
Expected behavior
Images should upload without issue and they should be able to repeat steps 3-4 as many times as needed.
Screenshots

Uploading failed on wpsandbox.pro

Uploading failed on wp.com
https://www.loom.com/share/129e1208503b4c4390edaef3afdd8e6b
Video showing issue in action
Editor version (please complete the following information):
Desktop (please complete the following information):
@Kpudlo Thanks so much for reporting this. I was able to replicate this as well with 5.5.1 and found the upload flow to be very odd as well. Here's a video for good measure showing the upload just "hangs": https://cloudup.com/ccY7nYSqiJj I labeled this appropriately so devs can jump in.
Can confirm this does not work with Gutenberg installed in version 8.9.1 either using WordPress 5.5.1 in a new test site with TwentyTwenty and no other plugins active.
Console shows Uncaught TypeError: Cannot read property 'text' of undefined (media-views.js:5585), leading to me to this line.
It looks like this.$index only gets properly set for the first gallery instance (or upload instance?). The underlying code hasn't changed in eight years which leads me to assume the media modal doesn't get set up properly?
Not sure who Gutenberg's resident Media expert is, @mcsf or @draganescu know maybe?
It looks like
this.$indexonly gets properly [鈥
Thanks for looking into this.
Not sure who Gutenberg's resident Media expert is [鈥
Maybe @antpb or @johnbillion can help?
Most helpful comment
Console shows
Uncaught TypeError: Cannot read property 'text' of undefined (media-views.js:5585), leading to me to this line.It looks like
this.$indexonly gets properly set for the first gallery instance (or upload instance?). The underlying code hasn't changed in eight years which leads me to assume the media modal doesn't get set up properly?Not sure who Gutenberg's resident Media expert is, @mcsf or @draganescu know maybe?