{"action":"created","issue":{"url":"https://api.github.com/repos/ioBroker/ioBroker.vis/issues/149","repository_url":"https://api.github.com/repos/ioBroker/ioBroker.vis","labels_url":"https://api.github.com/repos/ioBroker/ioBroker.vis/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/ioBroker/ioBroker.vis/issues/149/comments","events_url":"https://api.github.com/repos/ioBroker/ioBroker.vis/issues/149/events","html_url":"https://github.com/ioBroker/ioBroker.vis/issues/149","id":282462352,"node_id":"MDU6SXNzdWUyODI0NjIzNTI=","number":149,"title":"some states not loading: Trying to get empty list, because the whole list could not be loaded","user":{"login":"Locke","id":53905,"node_id":"MDQ6VXNlcjUzOTA1","avatar_url":"https://avatars1.githubusercontent.com/u/53905?v=4","gravatar_id":"","url":"https://api.github.com/users/Locke","html_url":"https://github.com/Locke","followers_url":"https://api.github.com/users/Locke/followers","following_url":"https://api.github.com/users/Locke/following{/other_user}","gists_url":"https://api.github.com/users/Locke/gists{/gist_id}","starred_url":"https://api.github.com/users/Locke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Locke/subscriptions","organizations_url":"https://api.github.com/users/Locke/orgs","repos_url":"https://api.github.com/users/Locke/repos","events_url":"https://api.github.com/users/Locke/events{/privacy}","received_events_url":"https://api.github.com/users/Locke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-15T15:30:06Z","updated_at":"2018-09-06T14:31:02Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nfor a while now (several months? not quite sure..) I have an issue of some states to not load. I didn't investigate this further as I didn't had to remotely change the temperature at home, but now as it's getting colder I started looking into this issue ;)\r\n\r\nI am running ioBroker on my webserver in a docker container behind a nginx reverse proxy handling http2 and https, not sure if it's related to my symptoms or not. I am using SliderTabs to separate the different rooms / floors.\r\n\r\nI figured out that the section at https://github.com/ioBroker/ioBroker.vis/commit/3a71ab461ceddb2ee07fcecf67c4f3e44ab5af50#diff-cac666adcc96f99ac47921351950e570R605 seems to cause that some states are not loading, as I saw the entry `Trying to get empty list, because the whole list could not be loaded` in the console. When I comment out the `IDs = [];` assignment everything works fine for me.\r\n\r\nI figured out that `getStates` is called multiple times, and mostly while an older request is still pending. So it seems reasonable in my case that `this.gettingStates` is indeed bigger than 1 and I don't think this should be limited to a single \"getStates\" call at a time in my case?\r\n\r\nAfter some manual peeking with breakpoints I added console.log statements to get a timeline of the `getStates` calls (my line 698) and it's calls of the supplied callback (my line 718):\r\n\r\n```\r\nconn.js loaded at 1513350629.118\r\n\r\nconn.js:698 getStates: Array(71) this.gettingStates=0 at 1513350629.602\r\nconn.js:718 getStates completed call from 1513350629.602 at 1513350629.614\r\nconn.js:698 getStates Array(8)  this.gettingStates=0 at 1513350629.844\r\nconn.js:698 getStates Array(9)  this.gettingStates=1 at 1513350629.847\r\nconn.js:698 getStates Array(9)  this.gettingStates=2 at 1513350629.849\r\nconn.js:698 getStates Array(7)  this.gettingStates=3 at 1513350629.852\r\nconn.js:698 getStates Array(38) this.gettingStates=4 at 1513350629.854\r\nconn.js:718 getStates completed call from 1513350629.844 at 1513350629.868\r\nconn.js:718 getStates completed call from 1513350629.847 at 1513350629.941\r\nconn.js:718 getStates completed call from 1513350629.849 at 1513350630.006\r\nconn.js:718 getStates completed call from 1513350629.852 at 1513350630.068\r\nconn.js:718 getStates completed call from 1513350629.854 at 1513350630.116\r\n```\r\n\r\n\r\nbtw, while manually debugging I noticed errors on `this._socket.emit` (socket closing / already closed). This only happened when I paused the execution via the debugger, therefore I suspect a timeout of the websocket. It might be worth catching the error caused by the `emit` function and incrementing `this.gettingStates` only afterwards when the request could be sent.."},"comment":{"url":"https://api.github.com/repos/ioBroker/ioBroker.vis/issues/comments/419115164","html_url":"https://github.com/ioBroker/ioBroker.vis/issues/149#issuecomment-419115164","issue_url":"https://api.github.com/repos/ioBroker/ioBroker.vis/issues/149","id":419115164,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTExNTE2NA==","user":{"login":"Locke","id":53905,"node_id":"MDQ6VXNlcjUzOTA1","avatar_url":"https://avatars1.githubusercontent.com/u/53905?v=4","gravatar_id":"","url":"https://api.github.com/users/Locke","html_url":"https://github.com/Locke","followers_url":"https://api.github.com/users/Locke/followers","following_url":"https://api.github.com/users/Locke/following{/other_user}","gists_url":"https://api.github.com/users/Locke/gists{/gist_id}","starred_url":"https://api.github.com/users/Locke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Locke/subscriptions","organizations_url":"https://api.github.com/users/Locke/orgs","repos_url":"https://api.github.com/users/Locke/repos","events_url":"https://api.github.com/users/Locke/events{/privacy}","received_events_url":"https://api.github.com/users/Locke/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T14:31:02Z","updated_at":"2018-09-06T14:31:02Z","author_association":"NONE","body":"Note: this issue might be the cause for #179"}}
{"actor":{"display_login":"Locke"}}