payload: {"action":"closed","issue":{"url":"https://api.github.com/repos/DevExpress/testcafe/issues/3828","repository_url":"https://api.github.com/repos/DevExpress/testcafe","labels_url":"https://api.github.com/repos/DevExpress/testcafe/issues/3828/labels{/name}","comments_url":"https://api.github.com/repos/DevExpress/testcafe/issues/3828/comments","events_url":"https://api.github.com/repos/DevExpress/testcafe/issues/3828/events","html_url":"https://github.com/DevExpress/testcafe/issues/3828","id":448236151,"node_id":"MDU6SXNzdWU0NDgyMzYxNTE=","number":3828,"title":"t.takeScreenshot fails and deletes screenshot when runs on browserstack","user":{"login":"Bogdan-Lyashenko","id":2098309,"node_id":"MDQ6VXNlcjIwOTgzMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/2098309?v=4","gravatar_id":"","url":"https://api.github.com/users/Bogdan-Lyashenko","html_url":"https://github.com/Bogdan-Lyashenko","followers_url":"https://api.github.com/users/Bogdan-Lyashenko/followers","following_url":"https://api.github.com/users/Bogdan-Lyashenko/following{/other_user}","gists_url":"https://api.github.com/users/Bogdan-Lyashenko/gists{/gist_id}","starred_url":"https://api.github.com/users/Bogdan-Lyashenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bogdan-Lyashenko/subscriptions","organizations_url":"https://api.github.com/users/Bogdan-Lyashenko/orgs","repos_url":"https://api.github.com/users/Bogdan-Lyashenko/repos","events_url":"https://api.github.com/users/Bogdan-Lyashenko/events{/privacy}","received_events_url":"https://api.github.com/users/Bogdan-Lyashenko/received_events","type":"User","site_admin":false},"labels":[{"id":1225665975,"node_id":"MDU6TGFiZWwxMjI1NjY1OTc1","url":"https://api.github.com/repos/DevExpress/testcafe/labels/STATE:%20Need%20response","name":"STATE: Need response","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":{"login":"aleks-pro","id":14822473,"node_id":"MDQ6VXNlcjE0ODIyNDcz","avatar_url":"https://avatars1.githubusercontent.com/u/14822473?v=4","gravatar_id":"","url":"https://api.github.com/users/aleks-pro","html_url":"https://github.com/aleks-pro","followers_url":"https://api.github.com/users/aleks-pro/followers","following_url":"https://api.github.com/users/aleks-pro/following{/other_user}","gists_url":"https://api.github.com/users/aleks-pro/gists{/gist_id}","starred_url":"https://api.github.com/users/aleks-pro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleks-pro/subscriptions","organizations_url":"https://api.github.com/users/aleks-pro/orgs","repos_url":"https://api.github.com/users/aleks-pro/repos","events_url":"https://api.github.com/users/aleks-pro/events{/privacy}","received_events_url":"https://api.github.com/users/aleks-pro/received_events","type":"User","site_admin":false},"assignees":[{"login":"aleks-pro","id":14822473,"node_id":"MDQ6VXNlcjE0ODIyNDcz","avatar_url":"https://avatars1.githubusercontent.com/u/14822473?v=4","gravatar_id":"","url":"https://api.github.com/users/aleks-pro","html_url":"https://github.com/aleks-pro","followers_url":"https://api.github.com/users/aleks-pro/followers","following_url":"https://api.github.com/users/aleks-pro/following{/other_user}","gists_url":"https://api.github.com/users/aleks-pro/gists{/gist_id}","starred_url":"https://api.github.com/users/aleks-pro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleks-pro/subscriptions","organizations_url":"https://api.github.com/users/aleks-pro/orgs","repos_url":"https://api.github.com/users/aleks-pro/repos","events_url":"https://api.github.com/users/aleks-pro/events{/privacy}","received_events_url":"https://api.github.com/users/aleks-pro/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2019-05-24T15:42:39Z","updated_at":"2019-05-30T09:54:00Z","closed_at":"2019-05-30T09:53:59Z","author_association":"NONE","body":"### What is your Test Scenario?\r\nRunning tests on browserstack (iPhone) and trying to take screenshot using `takeScreenshot` API method.\r\n \r\n### What is the Current behavior?\r\n`takeScreenshot` fails with the next error\r\n```javascript\r\nError: Unable to locate the page area in the browser window screenshot at /path/screen.png, because the page area mark with ID 3717636 is not found in the screenshot.\r\n      at calculateClipInfo (/node_modules/testcafe/src/screenshots/crop.js:81:19)\r\n      at /node_modules/testcafe/src/screenshots/crop.js:104:18\r\n```\r\nAs far as I realised testcafe wasn't able to calc crop area and thrown an error. I found this issue https://github.com/DevExpress/testcafe-browser-provider-browserstack/issues/51 which is exactly same one (setting `BROWSERSTACK_USE_AUTOMATE=1` doesn't change anything). I understood the logic behind the error, it's probably fine, but **screenshot is not created, what's more it's deleted** (if file was there before).  \r\n\r\nIt happens on this line https://github.com/DevExpress/testcafe/blob/master/src/screenshots/capturer.js#L142 \r\n \r\n### What is the Expected behavior?\r\nIf I simply comment the line https://github.com/DevExpress/testcafe/blob/master/src/screenshots/capturer.js#L142 screenshot is being taken and saved. Since (I guess) original behaviour for `takeScreenshot` should just take screenshot (not crop it to element bounds) it would be nice to keep that screenshot. \r\n \r\n### Your Environment details:\r\n \r\n* testcafe version:                   1.1.1\r\n* testcafe-browser-provider-browserstack:                    1.8.0\r\n\r\nPlease let me know if I can help/contribute to make this moving. "}}
other: {"actor":{"display_login":"aleks-pro"}}