{"action":"closed","number":125,"pull_request":{"url":"https://api.github.com/repos/Azure/azure-storage-node/pulls/125","id":61057212,"html_url":"https://github.com/Azure/azure-storage-node/pull/125","diff_url":"https://github.com/Azure/azure-storage-node/pull/125.diff","patch_url":"https://github.com/Azure/azure-storage-node/pull/125.patch","issue_url":"https://api.github.com/repos/Azure/azure-storage-node/issues/125","number":125,"state":"closed","locked":false,"title":"Fix range error","user":{"login":"rscreene","id":1532373,"avatar_url":"https://avatars.githubusercontent.com/u/1532373?v=3","gravatar_id":"","url":"https://api.github.com/users/rscreene","html_url":"https://github.com/rscreene","followers_url":"https://api.github.com/users/rscreene/followers","following_url":"https://api.github.com/users/rscreene/following{/other_user}","gists_url":"https://api.github.com/users/rscreene/gists{/gist_id}","starred_url":"https://api.github.com/users/rscreene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rscreene/subscriptions","organizations_url":"https://api.github.com/users/rscreene/orgs","repos_url":"https://api.github.com/users/rscreene/repos","events_url":"https://api.github.com/users/rscreene/events{/privacy}","received_events_url":"https://api.github.com/users/rscreene/received_events","type":"User","site_admin":false},"body":"When calling the getBlobToStream() function I was getting the following error:\r\n'''\r\n     Uncaught TypeError: Cannot read property 'hasOwnProperty' of null\r\n      at BlockRangeStream._getTypeList (node_modules/azure-storage/lib/services/blob/internal/blockrangestream.js:108:26)\r\n      at BlockRangeStream._emitBlockList (node_modules/azure-storage/lib/services/blob/internal/blockrangestream.js:93:8)\r\n      at node_modules/azure-storage/lib/services/blob/internal/blockrangestream.js:80:12\r\n      at finalCallback (node_modules/azure-storage/lib/services/blob/blobservice.js:3266:7)\r\n      at node_modules/azure-storage/lib/common/services/storageserviceclient.js:832:11\r\n      at processResponseCallback (node_modules/azure-storage/lib/services/blob/blobservice.js:3269:5)\r\n      at Request.processResponseCallback [as _callback] (node_modules/azure-storage/lib/common/services/storageserviceclient.js:290:13)\r\n      at Request.self.callback (node_modules/azure-storage/node_modules/request/request.js:354:22)\r\n      at Request.<anonymous> (node_modules/azure-storage/node_modules/request/request.js:1207:14)\r\n      at IncomingMessage.<anonymous> (node_modules/azure-storage/node_modules/request/request.js:1153:12)\r\n      at _stream_readable.js:908:16\r\n'''\r\n\r\nIt turns out that _getTypeList was extracting the commited blocks from the rangeList and then executing the callback via _emitBlockRange.  In the callback we delete the rangeList.  Then, getTypeList attempts to process the uncomitted blocks but the rangeList was already removed.\r\n\r\nIn this PR I have modified the code to ensure that the rangeList array still exists before continuing.\r\n\r\nA more correct fix might be to have _getTypeList call the callback only when both the committed and uncomitted blocks have been processed.\r\n\r\n","created_at":"2016-02-29T10:33:50Z","updated_at":"2016-06-13T08:29:07Z","closed_at":"2016-06-13T08:29:07Z","merged_at":null,"merge_commit_sha":"1ecd2008cbe415a443a91ff53ae4562e314f6a74","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-storage-node/pulls/125/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-storage-node/pulls/125/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-storage-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-storage-node/issues/125/comments","statuses_url":"https://api.github.com/repos/Azure/azure-storage-node/statuses/cdce2ca8a736af55b33ccf4321a6b71460aea28a","head":{"label":"rscreene:fix-range-error","ref":"fix-range-error","sha":"cdce2ca8a736af55b33ccf4321a6b71460aea28a","user":{"login":"rscreene","id":1532373,"avatar_url":"https://avatars.githubusercontent.com/u/1532373?v=3","gravatar_id":"","url":"https://api.github.com/users/rscreene","html_url":"https://github.com/rscreene","followers_url":"https://api.github.com/users/rscreene/followers","following_url":"https://api.github.com/users/rscreene/following{/other_user}","gists_url":"https://api.github.com/users/rscreene/gists{/gist_id}","starred_url":"https://api.github.com/users/rscreene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rscreene/subscriptions","organizations_url":"https://api.github.com/users/rscreene/orgs","repos_url":"https://api.github.com/users/rscreene/repos","events_url":"https://api.github.com/users/rscreene/events{/privacy}","received_events_url":"https://api.github.com/users/rscreene/received_events","type":"User","site_admin":false},"repo":{"id":51378768,"name":"azure-storage-node","full_name":"rscreene/azure-storage-node","owner":{"login":"rscreene","id":1532373,"avatar_url":"https://avatars.githubusercontent.com/u/1532373?v=3","gravatar_id":"","url":"https://api.github.com/users/rscreene","html_url":"https://github.com/rscreene","followers_url":"https://api.github.com/users/rscreene/followers","following_url":"https://api.github.com/users/rscreene/following{/other_user}","gists_url":"https://api.github.com/users/rscreene/gists{/gist_id}","starred_url":"https://api.github.com/users/rscreene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rscreene/subscriptions","organizations_url":"https://api.github.com/users/rscreene/orgs","repos_url":"https://api.github.com/users/rscreene/repos","events_url":"https://api.github.com/users/rscreene/events{/privacy}","received_events_url":"https://api.github.com/users/rscreene/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rscreene/azure-storage-node","description":"Microsoft Azure Storage SDK for Node.js","fork":true,"url":"https://api.github.com/repos/rscreene/azure-storage-node","forks_url":"https://api.github.com/repos/rscreene/azure-storage-node/forks","keys_url":"https://api.github.com/repos/rscreene/azure-storage-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rscreene/azure-storage-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rscreene/azure-storage-node/teams","hooks_url":"https://api.github.com/repos/rscreene/azure-storage-node/hooks","issue_events_url":"https://api.github.com/repos/rscreene/azure-storage-node/issues/events{/number}","events_url":"https://api.github.com/repos/rscreene/azure-storage-node/events","assignees_url":"https://api.github.com/repos/rscreene/azure-storage-node/assignees{/user}","branches_url":"https://api.github.com/repos/rscreene/azure-storage-node/branches{/branch}","tags_url":"https://api.github.com/repos/rscreene/azure-storage-node/tags","blobs_url":"https://api.github.com/repos/rscreene/azure-storage-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rscreene/azure-storage-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rscreene/azure-storage-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/rscreene/azure-storage-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rscreene/azure-storage-node/statuses/{sha}","languages_url":"https://api.github.com/repos/rscreene/azure-storage-node/languages","stargazers_url":"https://api.github.com/repos/rscreene/azure-storage-node/stargazers","contributors_url":"https://api.github.com/repos/rscreene/azure-storage-node/contributors","subscribers_url":"https://api.github.com/repos/rscreene/azure-storage-node/subscribers","subscription_url":"https://api.github.com/repos/rscreene/azure-storage-node/subscription","commits_url":"https://api.github.com/repos/rscreene/azure-storage-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/rscreene/azure-storage-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/rscreene/azure-storage-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/rscreene/azure-storage-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/rscreene/azure-storage-node/contents/{+path}","compare_url":"https://api.github.com/repos/rscreene/azure-storage-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rscreene/azure-storage-node/merges","archive_url":"https://api.github.com/repos/rscreene/azure-storage-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rscreene/azure-storage-node/downloads","issues_url":"https://api.github.com/repos/rscreene/azure-storage-node/issues{/number}","pulls_url":"https://api.github.com/repos/rscreene/azure-storage-node/pulls{/number}","milestones_url":"https://api.github.com/repos/rscreene/azure-storage-node/milestones{/number}","notifications_url":"https://api.github.com/repos/rscreene/azure-storage-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rscreene/azure-storage-node/labels{/name}","releases_url":"https://api.github.com/repos/rscreene/azure-storage-node/releases{/id}","deployments_url":"https://api.github.com/repos/rscreene/azure-storage-node/deployments","created_at":"2016-02-09T16:15:50Z","updated_at":"2016-02-09T16:15:51Z","pushed_at":"2016-02-29T11:21:14Z","git_url":"git://github.com/rscreene/azure-storage-node.git","ssh_url":"git@github.com:rscreene/azure-storage-node.git","clone_url":"https://github.com/rscreene/azure-storage-node.git","svn_url":"https://github.com/rscreene/azure-storage-node","homepage":"http://azure.github.io/azure-storage-node/","size":2196,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"3b62207257bddd16bb2c84ea88a6663f87db3010","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":19546694,"name":"azure-storage-node","full_name":"Azure/azure-storage-node","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-storage-node","description":"Microsoft Azure Storage SDK for Node.js","fork":false,"url":"https://api.github.com/repos/Azure/azure-storage-node","forks_url":"https://api.github.com/repos/Azure/azure-storage-node/forks","keys_url":"https://api.github.com/repos/Azure/azure-storage-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-storage-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-storage-node/teams","hooks_url":"https://api.github.com/repos/Azure/azure-storage-node/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-storage-node/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-storage-node/events","assignees_url":"https://api.github.com/repos/Azure/azure-storage-node/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-storage-node/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-storage-node/tags","blobs_url":"https://api.github.com/repos/Azure/azure-storage-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-storage-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-storage-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-storage-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-storage-node/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-storage-node/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-storage-node/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-storage-node/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-storage-node/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-storage-node/subscription","commits_url":"https://api.github.com/repos/Azure/azure-storage-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-storage-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-storage-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-storage-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-storage-node/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-storage-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-storage-node/merges","archive_url":"https://api.github.com/repos/Azure/azure-storage-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-storage-node/downloads","issues_url":"https://api.github.com/repos/Azure/azure-storage-node/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-storage-node/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-storage-node/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-storage-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-storage-node/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-storage-node/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-storage-node/deployments","created_at":"2014-05-07T19:07:08Z","updated_at":"2016-06-08T17:46:41Z","pushed_at":"2016-06-03T03:20:54Z","git_url":"git://github.com/Azure/azure-storage-node.git","ssh_url":"git@github.com:Azure/azure-storage-node.git","clone_url":"https://github.com/Azure/azure-storage-node.git","svn_url":"https://github.com/Azure/azure-storage-node","homepage":"http://azure.github.io/azure-storage-node/","size":3693,"stargazers_count":117,"watchers_count":117,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":54,"mirror_url":null,"open_issues_count":24,"forks":54,"open_issues":24,"watchers":117,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-storage-node/pulls/125"},"html":{"href":"https://github.com/Azure/azure-storage-node/pull/125"},"issue":{"href":"https://api.github.com/repos/Azure/azure-storage-node/issues/125"},"comments":{"href":"https://api.github.com/repos/Azure/azure-storage-node/issues/125/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-storage-node/pulls/125/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-storage-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-storage-node/pulls/125/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-storage-node/statuses/cdce2ca8a736af55b33ccf4321a6b71460aea28a"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":0,"commits":3,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"rscreene"}}