Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Creating a group with special characters fails with "Cannot read property 'data' of undefined" error and freezes UI #314

Closed
rprakash20 opened this issue Jul 12, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@rprakash20
Copy link

Steps to Reproduce

  1. Open https://skill-search.topcoder-dev.com/ web app
  2. Login with tonyj /appirio123
  3. Select topcoder as organization
  4. Navigate to Groups tab
  5. Select a group
  6. Click on "+" icon to add a group
  7. Enable browser inspector
  8. Type '">' in the textbox and click on Create
  9. Notice the error in console tab

Screenshots or Screen Capture

Screenshot 2020-07-12 at 9 21 51 PM

Current Results

Creating a group with special characters fails with "Cannot read property 'data' of undefined" error and freezes UI

Expected Results

If Group name with special character is not allowed, UI should throw an error instead of crashing.

Console Logs

(index):1 A cookie associated with a cross-site resource at https://topcoder-dev.auth0.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
Node cannot be found in the current page.
xhr.js:178 POST https://api.topcoder-dev.com/v5/groups 400
(anonymous) @ 2.f0003de4.chunk.js:2
e.exports @ 2.f0003de4.chunk.js:2
e.exports @ 2.f0003de4.chunk.js:2
Promise.then (async)
c.request @ 2.f0003de4.chunk.js:2
r.forEach.c.<computed> @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
(anonymous) @ main.36d99be9.chunk.js:1
c @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
forEach.e.<computed> @ 2.f0003de4.chunk.js:2
r @ 2.f0003de4.chunk.js:2
a @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
h @ main.36d99be9.chunk.js:1
b @ main.36d99be9.chunk.js:1
(anonymous) @ main.36d99be9.chunk.js:1
c @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
forEach.e.<computed> @ 2.f0003de4.chunk.js:2
r @ 2.f0003de4.chunk.js:2
a @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
(anonymous) @ main.36d99be9.chunk.js:1
a @ 2.f0003de4.chunk.js:2
d @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
y @ 2.f0003de4.chunk.js:2
ut @ 2.f0003de4.chunk.js:2
ot @ 2.f0003de4.chunk.js:2
at @ 2.f0003de4.chunk.js:2
dt @ 2.f0003de4.chunk.js:2
U @ 2.f0003de4.chunk.js:2
W @ 2.f0003de4.chunk.js:2
$t @ 2.f0003de4.chunk.js:2
Jt @ 2.f0003de4.chunk.js:2
t.unstable_runWithPriority @ 2.f0003de4.chunk.js:2
Vo @ 2.f0003de4.chunk.js:2
L @ 2.f0003de4.chunk.js:2
Ht @ 2.f0003de4.chunk.js:2
Show 11 more frames
groups.js:192 Error: Request failed with status code 400
    at e.exports (createError.js:16)
    at e.exports (settle.js:17)
    at XMLHttpRequest.d.onreadystatechange (xhr.js:61)
groups.js:196 Uncaught (in promise) TypeError: Cannot read property 'data' of undefined
    at groups.js:196
    at c (runtime.js:45)
    at Generator._invoke (runtime.js:274)
    at Generator.forEach.e.<computed> [as throw] (runtime.js:97)
    at r (asyncToGenerator.js:3)
    at c (asyncToGenerator.js:29)
(anonymous) @ main.36d99be9.chunk.js:1
c @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
forEach.e.<computed> @ 2.f0003de4.chunk.js:2
r @ 2.f0003de4.chunk.js:2
c @ 2.f0003de4.chunk.js:2
Promise.then (async)
r @ 2.f0003de4.chunk.js:2
a @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
(anonymous) @ main.36d99be9.chunk.js:1
a @ 2.f0003de4.chunk.js:2
d @ 2.f0003de4.chunk.js:2
(anonymous) @ 2.f0003de4.chunk.js:2
y @ 2.f0003de4.chunk.js:2
ut @ 2.f0003de4.chunk.js:2
ot @ 2.f0003de4.chunk.js:2
at @ 2.f0003de4.chunk.js:2
dt @ 2.f0003de4.chunk.js:2
U @ 2.f0003de4.chunk.js:2
W @ 2.f0003de4.chunk.js:2
$t @ 2.f0003de4.chunk.js:2
Jt @ 2.f0003de4.chunk.js:2
t.unstable_runWithPriority @ 2.f0003de4.chunk.js:2
Vo @ 2.f0003de4.chunk.js:2
L @ 2.f0003de4.chunk.js:2
Ht @ 2.f0003de4.chunk.js:2

Browser version and OS version

  • Device: MacBook Pro 13 inch
  • Browser: Chrome Version 83.0.4103.116 (Official Build) (64-bit)
  • OS Version: macOS Catalina 10.15.4
@rprakash20
Copy link
Author

This issue is because of the group name was of 2 characters not because of special characters.

@callmekatootie
Copy link
Collaborator

duplicate #116

@callmekatootie callmekatootie added the duplicate This issue or pull request already exists label Jul 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants