title: Angular4 http request freezes
body: <p>sorry for my bad english :-)</p>
  
  <p>I have a problem I can't actually not really explain.</p>
  
  <p>I use these versions of angular right now: @angular/*: 4.4.6
  (Meaning also the @angular/http: 4.4.6 package).</p>
  
  <p>I use RxJS to do http GET request like this one:</p>
  
  <pre><code>import {EventEmitter, Injectable} from '@angular/core';
  import {Headers, Http} from '@angular/http';
  
  @Injectable()
  export class DataService {
  
  //SOME-CODE
  
  constructor(private _http: Http) {
      //SOME-CODE
  }
  
  getStatus() {
      const headers = new Headers({
          'Content-Type': 'application/json'
      });
  
      return new Promise((resolve, reject) =&gt; {
          return  this._http.get(
                      'https://[URL]:[PORT]/[PATH]',
                      {headers: headers}
                  ).map(
                      (res) =&gt; res.json()
                  ).toPromise()
                  .then(
                      (res) =&gt; {
                          if (/*SOME-CONDITION*/) {
                              return true;
                          }else{
                              return false;
                          }
  
                          resolve();
                      }
                  ).catch(
                      e =&gt; {
                          //ERROR-HANDLING
                          return false;
                      }
                  );
          }
      }
  }
  </code></pre>
  
  <p>The request seems to work fine for some browser-sessions but after a while (I cannot tell exactly when) at a certain point when angular app is reloaded/called again after the initial loading the http request gets stuck and browser freezes because of high CPU usage.</p>
  
  <p>My debugging efforts so far:</p>
  
  <ul>
  <li>It happens at Android, Chrome Browser, Firefox, Safari.</li>
  <li>When using incognito mode in Chrome f.e. it's works, no freezing.</li>
  <li>When using chrome debugging tools and looking into 'network' activities you'll see the 'pending' status on that specific request. When trying to see whats the request header you'll getting a black page in that window where normally informations should be displayed.</li>
  <li>Looking into 'Application' like LocalStorage or cookies there's no hint (f.e. LocalStorage exceeded or cookies being cached).</li>
  <li>When looking into server (simple nodejs webserver) who will provide a response, no request at all comes in.</li>
  <li>I tried to use an another service like "<a href="https://jsonplaceholder.typicode.com/" rel="nofollow noreferrer">https://jsonplaceholder.typicode.com/</a>" to be sure it's not my server who is not working properly. Same behavior here.</li>
  <li>I tried to use 'Performance' tool from chrome which is really hard to get a snapshot cause CPU freezes fast. Although I made it a few times all I could see was a lot of event firing and zone.js stuff. Nothing special to debug there. Fair to say that I am not an expert to debug internal angular processes.</li>
  <li>Then I tried kicking out every module which I don't need at this dataService. No luck.</li>
  <li>Finally I used a simple XMLHttpRequest() to avoid the angular http module. Nothing changed. Request obviously fired but pending with freeze.</li>
  </ul>
  
  <p>If you're giving up at a certain point and delete Browser cache (f.e. in chrome) and reload the app it's working again.</p>
  
  <p>Does anyone had this kind of issue or was dealing with it?
  I am going crazy here :-(</p>
  
  <p>Thanks for helping.</p>