Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS error thrown by Upload on deleting a just uploaded file #7287

Closed
ThomasMaij opened this issue Mar 29, 2023 · 4 comments
Closed

JS error thrown by Upload on deleting a just uploaded file #7287

ThomasMaij opened this issue Mar 29, 2023 · 4 comments
Assignees
Labels
Bug C: Upload FP: Completed Sync status with associated Feedback Item jQuery SEV: High

Comments

@ThomasMaij
Copy link

ThomasMaij commented Mar 29, 2023

Bug report

Upload control when deleting a just uploaded file it writes errors to the log:

Uncaught TypeError: Cannot read properties of undefined (reading 'value')
    at HTMLDivElement.<anonymous> (kendo.upload.js:1312:1)
    at opt.complete (jquery.js:7822:1)
    at fire (jquery.js:3536:1)
    at Object.fireWith [as resolveWith] (jquery.js:3666:1)
    at tick (jquery.js:7665:1)
    at jQuery.fx.tick (jquery.js:7992:1)
    at schedule (jquery.js:7368:1)

perhaps the progress bar was still being updated asynchronously, but it is already gone from the html.

Reproduction of the problem

  1. Go to https://demos.telerik.com/kendo-ui/upload/index
  2. Select a file and click Upload button to upload it
  3. Delete the just uploaded file, sometimes you will be rewarded
$(PROGRESSBAR_SELECTOR, fileEntry)
                .delay(PROGRESSHIDEDELAY)
                .fadeOut(PROGRESSHIDEDURATION, function() {
                    $(this).data("kendoProgressBar").value(0);
                });

Fix might be as easy as adding a undefined check

Current behavior

it logs errors to the console:

Uncaught TypeError: Cannot read properties of undefined (reading 'value')
    at HTMLDivElement.<anonymous> (kendo.upload.js:1312:1)
    at opt.complete (jquery.js:7822:1)
    at fire (jquery.js:3536:1)
    at Object.fireWith [as resolveWith] (jquery.js:3666:1)
    at tick (jquery.js:7665:1)
    at jQuery.fx.tick (jquery.js:7992:1)
    at schedule (jquery.js:7368:1)

Expected/desired behavior

No errors

Environment

"@progress/kendo-ui": "2023.1.314",
"@progress/kendo-theme-bootstrap": "6.2.0",
 "jquery": "3.6.4",
@github-actions github-actions bot added the FP: Unplanned Sync status with associated Feedback Item label Mar 29, 2023
@ThomasMaij
Copy link
Author

Any updates?

@Dimitar-Goshev
Copy link
Contributor

@ThomasMaij Thank you for your report. The issue is reproducible on my side as well. Track it for updates on its progress.

@Dimitar-Goshev Dimitar-Goshev changed the title Upload control delete file writes errors to console JS error thrown by Upload on deleting a just uploaded file Jul 4, 2023
@pepinho24
Copy link
Contributor

Reported also in ticket 1621779

@gdenchevprog gdenchevprog self-assigned this Sep 27, 2023
@diegobarriosdev
Copy link

I got the same issue:
TypeError: Cannot read properties of undefined (reading 'value')\n
at HTMLDivElement.<anonymous> (/kendo-ui/scripts/kendo.all.min.js:9:1878044)\n
at r.complete (/node_modules/jquery/dist/jquery.min.js:2:61029)\n
at c (/node_modules/jquery/dist/jquery.min.js:2:25266)\n
at Object.fireWith [as resolveWith] (/node_modules/jquery/dist/jquery.min.js:2:26015)\n
at u (/node_modules/jquery/dist/jquery.min.js:2:57736)\n
at ce.fx.tick (/node_modules/jquery/dist/jquery.min.js:2:62744)\n
at dt (/node_modules/jquery/dist/jquery.min.js:2:57060)

@Iankodj Iankodj closed this as completed Oct 2, 2023
@github-actions github-actions bot added FP: Completed Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug C: Upload FP: Completed Sync status with associated Feedback Item jQuery SEV: High
Projects
None yet
Development

No branches or pull requests

5 participants