learningequality / learningequality/studio

Uncaught DOM exception during copying

Open
#2,867 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DEV: frontend P2 - normal TAG: tech update / debt
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

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/

  • Windows 10
  • Browser: Firefox (latest)
  • Channel: ?
  • Topic/Content Item: ?

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Firefox by selecting roughly 1,000 resources and using the copy button from the selection toolbar. Inspect the /api/sync POST and /api/task GET requests alongside the browser console to determine where the DOM exception and 502/504 responses originate; done means large copies complete without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.