learningequality / studio

Content curation tools for Kolibri
https://studio.learningequality.org/
MIT License
116 stars 163 forks source link

Uncaught DOM exception during copying #2867

Open metodimilevqa opened 3 years ago

metodimilevqa commented 3 years ago

Summary

When the user initiates a copying process of many resources (1000+) many 502 & 500 errors are seen in the console.

Category

BUG

Usage Details

Tested at: https://hotfixes.studio.learningequality.org/

Traceback or relevant snippet from browser console

POST
hotfixes.studio.learningequality.org/api/sync
Status502
Bad Gateway
VersionHTTP/2
Transferred5.84 KB (5.36 KB size)
Referrer Policyno-referrer-when-downgrade

cache-control
private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-ray
617304c2496e1ca4-SOF
content-type
text/html; charset=UTF-8
date
Mon, 25 Jan 2021 15:27:29 GMT
expires
Thu, 01 Jan 1970 00:00:01 GMT
server
cloudflare
set-cookie
cf_ob_info=502:617304c2496e1ca4:SOF; path=/; expires=Mon, 25-Jan-21 15:27:59 GMT
set-cookie
cf_use_ob=443; path=/; expires=Mon, 25-Jan-21 15:27:59 GMT
X-Firefox-Spdy
h2
x-frame-options
SAMEORIGIN

Accept
application/json, text/plain, /
Accept-Encoding
gzip, deflate, br
Accept-Language
en-US,en;q=0.5
Connection
keep-alive
Content-Length
22622
Content-Type
application/json;charset=utf-8
Cookie
__cfduid=d362ef5249973e9e3202e191540f2b7d91610702761; _ga=GA1.2.1331302399.1610525707; fs_uid=rs.fullstory.com#FCSD3#6432990809145344:4930464540639232/1642061707; csrftoken=8dAtf1IkkiN6MEUvtYn5Zl238Jr2aXMandH9wOa8yLTw4ljWo0URAFLiDEnx7kKA; _gid=GA1.2.2058105693.1611560334; kolibri_studio_sessionid=lba7phkod2ws1yfvs5iwxd4n37n6spl0; cf_ob_info=502:617304b5ae7e1ca4:SOF; cf_use_ob=443
Host
hotfixes.studio.learningequality.org
Origin
hotfixes.studio.learningequality.org
Referer
hotfixes.studio.learningequality.org/en/channels/cc9bcec1bd90426397e87af97e68a54c
TE
Trailers
User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
X-CSRFToken
8dAtf1IkkiN6MEUvtYn5Zl238Jr2aXMandH9wOa8yLTw4ljWo0URAFLiDEnx7kKA

...............

GET

scheme
https
host
hotfixes.studio.learningequality.org
filename
/api/task
channel
cc9bcec1bd90426397e87af97e68a54c
Address
104.18.8.53:443
Status504
Gateway Timeout
VersionHTTP/2
Transferred5.86 KB (5.38 KB size)
Referrer Policyno-referrer-when-downgrade

cache-control
private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-ray
61730656eb521ca4-SOF
content-type
text/html; charset=UTF-8
date
Mon, 25 Jan 2021 15:29:34 GMT
expires
Thu, 01 Jan 1970 00:00:01 GMT
server
cloudflare
set-cookie
cf_ob_info=504:61730656eb521ca4:SOF; path=/; expires=Mon, 25-Jan-21 15:30:04 GMT
set-cookie
cf_use_ob=443; path=/; expires=Mon, 25-Jan-21 15:30:04 GMT
X-Firefox-Spdy
h2
x-frame-options
SAMEORIGIN

Accept
application/json, text/plain, /
Accept-Encoding
gzip, deflate, br
Accept-Language
en-US,en;q=0.5
Connection
keep-alive
Cookie
__cfduid=d362ef5249973e9e3202e191540f2b7d91610702761; _ga=GA1.2.1331302399.1610525707; fs_uid=rs.fullstory.com#FCSD3#6432990809145344:4930464540639232/1642061707; csrftoken=8dAtf1IkkiN6MEUvtYn5Zl238Jr2aXMandH9wOa8yLTw4ljWo0URAFLiDEnx7kKA; _gid=GA1.2.2058105693.1611560334; kolibri_studio_sessionid=lba7phkod2ws1yfvs5iwxd4n37n6spl0; cf_ob_info=502:61730631789a1ca4:SOF; cf_use_ob=0
Host
hotfixes.studio.learningequality.org
Referer
hotfixes.studio.learningequality.org/en/channels/cc9bcec1bd90426397e87af97e68a54c
TE
Trailers
User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
X-CSRFToken
8dAtf1IkkiN6MEUvtYn5Zl238Jr2aXMandH9wOa8yLTw4ljWo0URAFLiDEnx7kKA

How to reproduce

Preconditions: A channel created with at least 1000+ resources imported

  1. Login to Studio using Firefox
  2. Click the channel
  3. Select resources (~1000)
  4. Click the copy button from the selection toolbar
  5. See the browser Console and Network tab

Screenshots

2021-01-25_130239 2021-01-25_172710
rtibbles commented 3 years ago

The 502 and 504 errors are probably due to excess load on hotfixes, but the uncaught DOM exceptions here are problematic.

bjester commented 3 years ago

I've seen this occur under different circumstances. Perhaps easily reproducible using the clipboard

rtibbles commented 3 years ago

Need to double check that this reproduces.