{"action":"closed","issue":{"url":"https://api.github.com/repos/FineUploader/fine-uploader/issues/1533","repository_url":"https://api.github.com/repos/FineUploader/fine-uploader","labels_url":"https://api.github.com/repos/FineUploader/fine-uploader/issues/1533/labels{/name}","comments_url":"https://api.github.com/repos/FineUploader/fine-uploader/issues/1533/comments","events_url":"https://api.github.com/repos/FineUploader/fine-uploader/issues/1533/events","html_url":"https://github.com/FineUploader/fine-uploader/issues/1533","id":136477381,"number":1533,"title":"Receiving error intermittently when using cancelAll()","user":{"login":"AzureCloudDev","id":865171,"avatar_url":"https://avatars.githubusercontent.com/u/865171?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureCloudDev","html_url":"https://github.com/AzureCloudDev","followers_url":"https://api.github.com/users/AzureCloudDev/followers","following_url":"https://api.github.com/users/AzureCloudDev/following{/other_user}","gists_url":"https://api.github.com/users/AzureCloudDev/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureCloudDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureCloudDev/subscriptions","organizations_url":"https://api.github.com/users/AzureCloudDev/orgs","repos_url":"https://api.github.com/users/AzureCloudDev/repos","events_url":"https://api.github.com/users/AzureCloudDev/events{/privacy}","received_events_url":"https://api.github.com/users/AzureCloudDev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FineUploader/fine-uploader/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-02-25T18:55:14Z","updated_at":"2016-03-03T21:18:45Z","closed_at":"2016-03-03T21:18:45Z","body":"1. BUG (seems to be)\r\n\r\n2. Azure in basic mode\r\n\r\n3. FineUploader v5.5.0\r\n\r\n4. Using Firefox\r\n\r\n5. Windows 8.1 Pro\r\n\r\n6. Occurs intermittently. Can't reproduce all the time, please see the detailed explanation below.\r\n\r\n7.\r\n> onComplete: function(id, fileName, response) {\r\n>                 var imageCount = $('#imagesTable tr td').length;\r\n> \r\n>                 if (imageCount === 8) {\r\n>                     imageUploader.cancelAll();\r\n>                     CustomValidationSummary.addMessage('Please upload no more than 8 images.', CustomValidationSummary.MessageTypes.Error);\r\n>                 } else {\r\n>                     var imageId = GetPropertyValue(response, \"imageId\");\r\n>                     appendUploadedImage(imageId);\r\n>                 }\r\n>             }\r\n> \r\n\r\n\r\n\r\nI am working on functionality to try to limit the number of images a user can upload at one time. Images are uploaded, then each image is rendered inside its own table-cell, and then appended to a table-row. A user can delete the images and then upload new images again. But caveat is that there can never be more than 8 images displayed on the screen.\r\n\r\nSo the way I am trying to solve this is that upon a successful image upload, I count the number of table-cells inside the table-row. If the number of table-cells is 8, I want to cancel all remaining uploads because the user has already uploaded 8 images. Otherwise I create a new table-cell with an image and append it to the table-row. My onComplete() method is above.\r\n\r\nThis works pretty well most of the time. Yet after playing around with this for some time I noticed that intermittently I would get an error:\r\n\r\n> TypeError: c._getFileState(...) is undefined\r\n> ...function(a,b,d,e){var f=null==b?-1:b,g=c._getFileState(a).temp;return g.xhrs=g.x...\r\n> \r\n> azure.f....min.js (line 18, col 7400)\r\n\r\nSometimes it would happen and sometimes it wouldn't. Sometimes it happens when I try to upload 10 images instead of 8 from the start. Sometimes it would happen when there are already 8 images on the screen and I try to delete 2, an then upload 10, then it can happen. Other times both situations fly without any errors. So I can't say that a certain condition causes it for certain. Just trying to figure out why this happens?\r\n\r\np.s. maxConnections: 1\r\n\r\nThanks.\r\n"}}