{"action":"closed","issue":{"url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/324","repository_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push","labels_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/324/comments","events_url":"https://api.github.com/repos/nordnet/cordova-hot-code-push/issues/324/events","html_url":"https://github.com/nordnet/cordova-hot-code-push/issues/324","id":278015495,"node_id":"MDU6SXNzdWUyNzgwMTU0OTU=","number":324,"title":"getInputStream take 30 to 31 seconds for a chcp.json file","user":{"login":"Rakiah","id":16012885,"node_id":"MDQ6VXNlcjE2MDEyODg1","avatar_url":"https://avatars0.githubusercontent.com/u/16012885?v=4","gravatar_id":"","url":"https://api.github.com/users/Rakiah","html_url":"https://github.com/Rakiah","followers_url":"https://api.github.com/users/Rakiah/followers","following_url":"https://api.github.com/users/Rakiah/following{/other_user}","gists_url":"https://api.github.com/users/Rakiah/gists{/gist_id}","starred_url":"https://api.github.com/users/Rakiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rakiah/subscriptions","organizations_url":"https://api.github.com/users/Rakiah/orgs","repos_url":"https://api.github.com/users/Rakiah/repos","events_url":"https://api.github.com/users/Rakiah/events{/privacy}","received_events_url":"https://api.github.com/users/Rakiah/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-30T06:49:47Z","updated_at":"2018-09-19T11:09:03Z","closed_at":"2018-09-19T11:09:03Z","author_association":"NONE","body":"##### Problem\r\n\r\nOn android devices, fetching an update even if there is nothing to update may take 30 to 31 seconds, this problem is extremly strange and with a lot of effort and debug I managed to isolate the problem which look like this one :\r\nhttps://stackoverflow.com/questions/1920623/sometimes-httpurlconnection-getinputstream-executes-too-slowly\r\nbut the responses in this thread didn't managed to make it work, what is sure is that getInputStream was what took 30 to 31 seconds (30 to 31 seconds is very precise because this is the exact time it took EVERYTIME it had a problem, because yes, the problem appeared pretty much randomly like 50% of the time), also, this exclusively happened in the downloadJson in the JsonDownloader class, and most of the times was when request the chcp.json file\r\n\r\n##### Steps to reproduce\r\n\r\nI can't really say for sure that it will works for you and what i did was on a full and well advanced project, so that may not help, but all i did was to follow the installation steps,\r\ncordova run android, and the bug started to appear\r\n\r\n##### System info\r\n\r\nRun `cordova info` (or `ionic info`) and paste it here, or give us information like:\r\n- Platform: Android\r\n- Platform version: android 6.3.0\r\n- Cordova version:  7.1.0\r\n- Ionic version : 3.19.0\r\n- Node version: v6.10.1\r\n\r\n##### Plugins\r\ncordova-hot-code-push-plugin/\r\ncordova-plugin-add-swift-support/\r\ncordova-plugin-badge/\r\ncordova-plugin-calendar/\r\ncordova-plugin-compat/\r\ncordova-plugin-device/\r\ncordova-plugin-inappbrowser/\r\ncordova-plugin-splashscreen/\r\ncordova-plugin-statusbar/\r\ncordova-plugin-whitelist/\r\nionic-plugin-keyboard/\r\nonesignal-cordova-plugin/\r\n\r\n##### What i did to make it work\r\nI found a solution after trying pretty much everything, I had very little time to find a solution so I didn't had time to clean up to find what is really helping there, but this definitely fixed the bug, I ended up forking this project and adding directly the git repo as my plugin, so I don't know if you guys have the same bug and may be interested in integrating my changes, I just post it here and feel free to do whatever you want with it\r\nhttps://github.com/nordnet/cordova-hot-code-push/compare/master...Mfron-42:fix-slow-fetch-updates\r\n"}}
{"actor":{"display_login":"nordnet-deprecation-bot"}}