{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1967","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1967/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1967/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1967/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/1967","id":259415415,"node_id":"MDU6SXNzdWUyNTk0MTU0MTU=","number":1967,"title":"Background Notification: JS stops executing after around 2 seconds","user":{"login":"superbigsoft","id":1934861,"node_id":"MDQ6VXNlcjE5MzQ4NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/1934861?v=4","gravatar_id":"","url":"https://api.github.com/users/superbigsoft","html_url":"https://github.com/superbigsoft","followers_url":"https://api.github.com/users/superbigsoft/followers","following_url":"https://api.github.com/users/superbigsoft/following{/other_user}","gists_url":"https://api.github.com/users/superbigsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/superbigsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superbigsoft/subscriptions","organizations_url":"https://api.github.com/users/superbigsoft/orgs","repos_url":"https://api.github.com/users/superbigsoft/repos","events_url":"https://api.github.com/users/superbigsoft/events{/privacy}","received_events_url":"https://api.github.com/users/superbigsoft/received_events","type":"User","site_admin":false},"labels":[{"id":307723293,"node_id":"MDU6TGFiZWwzMDc3MjMyOTM=","url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/ios","name":"ios","color":"BFD4F2","default":false},{"id":196374009,"node_id":"MDU6TGFiZWwxOTYzNzQwMDk=","url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-09-21T08:28:07Z","updated_at":"2018-06-03T09:15:46Z","closed_at":"2017-11-27T20:45:30Z","author_association":"NONE","body":"### Expected Behaviour\r\nJS keeps executing until **finish** is called or 30 seconds is over\r\n\r\n### Actual Behaviour\r\nJS execution is paused after around 2 seconds\r\n\r\n#### Steps to Reproduce \r\n\r\n1. Debug app with XCode\r\n2. Put app to background\r\n3. Send a silent-push ('content-available': 1)\r\n4. Observe the counter is printed up to 2 while it should print up to 9 \r\n\r\n#### Platform and Version\r\niOS 11\r\n\r\n#### Cordova CLI version and cordova platform version\r\n7.0.1 & 4.4.0\r\n\r\n#### Plugin version\r\n1.6.2\r\n\r\n#### Sample Push Data Payload\r\n```\r\n aps =   {\r\n        alert = \"Hello world\";\r\n        badge = 1;\r\n        \"content-available\" = 1;\r\n        sound = default;\r\n    };\r\n```\r\n\r\n#### Sample Code that illustrates the problem\r\n```\r\npushNotification.on('notification', function (data) {\r\n    // Print a counter every second\r\n    var i = 0;\r\n    var timer = setInterval(function() {\r\n        console.log(i++);\r\n    }, 1000);\r\n    \r\n    // Finish after 10 seconds\r\n    setTimeout(function() {\r\n        clearInterval(timer);\r\n        pushNotification.finish()\r\n    }, 10000)\r\n});\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/394148421","html_url":"https://github.com/phonegap/phonegap-plugin-push/issues/1967#issuecomment-394148421","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/1967","id":394148421,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDE0ODQyMQ==","user":{"login":"lock[bot]","id":33595554,"node_id":"MDM6Qm90MzM1OTU1NTQ=","avatar_url":"https://avatars1.githubusercontent.com/in/6672?v=4","gravatar_id":"","url":"https://api.github.com/users/lock%5Bbot%5D","html_url":"https://github.com/apps/lock","followers_url":"https://api.github.com/users/lock%5Bbot%5D/followers","following_url":"https://api.github.com/users/lock%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lock%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lock%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lock%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lock%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lock%5Bbot%5D/repos","events_url":"https://api.github.com/users/lock%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lock%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-06-03T09:15:46Z","updated_at":"2018-06-03T09:15:46Z","author_association":"NONE","body":"This thread has been automatically locked."}}
{"actor":{"display_login":"lock"}}