Electron App Linux - HTTP requests do not run until the terminal window is resized
<p>I have this bizarre issue on Electron when running my app on Linux. This is just a linux related problem as this doesn't happen on OSX or Windows.</p>

<p>Basically I run <code>electron .</code> and when it gets to a nodejs http.get request the code stops executing. The weird thing is once I resize the terminal window the script starts working again and the app works just fine! Sometimes the code is executed but rarely is executed as well. This is the weirdest thing I've ever come across and I can't seem to find anything about this issue on the web.</p>

<p>Here is my code for the http request:</p>

<pre><code>let api,data = '',root = this
let options = {
   hostname: apiUrl,
   path: '/api/playlists',
   method: 'GET'
}    
return new Promise((resolve, reject) =&gt; {
      http.get('http://' + options.hostname + options.path, (res) =&gt; {
        res.setEncoding('utf8')
        res.on('data', (chunk) =&gt; {
          data += chunk
        })
        res.on('end', () =&gt; {
          // data is a json in string format so it needs to converted to an js array
          root.updateFiles(JSON.parse(data))
            .then((res) =&gt; resolve('Playlists synced!'))
            .catch((err) =&gt; {
              reject('Playlists synced with errors!')
              console.log(err)
            })
        })
      }).on('error', (err) =&gt; {
        console.log('Error:' + err.message)
      })
    })
</code></pre>

<p>Note: I am running Linux on a VM using Parallels.</p>

<p>Thanks for your help!</p>