Bug 1987944 Comment 12 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The Chrome call stack includes: https://www.verizon.com/speedtest/ak-cached/1w/js/bundle.js

```js
                            E = function (e, t) {
                              return console.log('entered fetchServerList', t),
                              new Promise(
                                (
                                  function (e, t) {
                                    var r = n.oneclickInitialiseFieldsData.regionCode.toUpperCase();
                                    console.log('regionCode', r, '-');
                                    var o = '';
                                    o = 'https://www.verizon.com'.includes('www.verizon.com') ? fetch(
                                      'https://WASKDCFN-0222304B-INET.vzbi.com:8081/api/ndtServers'
                                    ) : fetch(
                                      'https://WASKDCFN-0222304B-INET.vzbi.com:8081/api/ndtServers',
                                      {
                                        method: 'GET',
                                        headers: {
                                          'Content-Type': 'application/json'
                                        },
                                        proxy: 'https://proxy.ebiz.verizon.com:9290'
                                      }
                                    ),
                                    console.log('fetchApiURL:', o),
                                    o.then((function (e) {
                                      return e.json()
                                    })).then((function (e) {
                                      return _(r, e)
                                    })).then(
                                      (
                                        function (t) {
                                          return Promise.allSettled(t.map(S)).then(
                                            (
                                              function (t) {
                                                var n = t.filter((function (e) {
                                                  return 'fulfilled' === e.status
                                                })).map((function (e) {
                                                  return e.value
                                                }));
                                                e(n),
                                                console.log('End of fetchServerList :' + n)
                                              }
                                            )
                                          )
                                        }
                                      )
                                    ).catch(
                                      (
                                        function (e) {
                                          console.log('test failed', e),
                                          k(
                                            'SET_IS_ERRORED',
                                            {
                                              isErrored: !0,
                                              whoInvoked: '',
                                              reqID: '',
                                              error: 'connection error'
                                            }
                                          )
                                        }
                                      )
                                    )
                                  }
                                )
                              )
                            },
```

Interestingly I found that the promise from `fetch('https://WASKDCFN-0222304B-INET.vzbi.com:8081/api/ndtServers')` never resolves, nor it shows up in the network log in devtools. Thus passing it to networking.
The Chrome call stack includes: https://www.verizon.com/speedtest/ak-cached/1w/js/bundle.js

```js
                            E = function (e, t) {
                              return console.log('entered fetchServerList', t),
                              new Promise(
                                (
                                  function (e, t) {
                                    var r = n.oneclickInitialiseFieldsData.regionCode.toUpperCase();
                                    console.log('regionCode', r, '-');
                                    var o = '';
                                    o = 'https://www.verizon.com'.includes('www.verizon.com') ? fetch(
                                      'https://WASKDCFN-0222304B-INET.vzbi.com:8081/api/ndtServers'
                                    ) : fetch(
                                      'https://WASKDCFN-0222304B-INET.vzbi.com:8081/api/ndtServers',
                                      {
                                        method: 'GET',
                                        headers: {
                                          'Content-Type': 'application/json'
                                        },
                                        proxy: 'https://proxy.ebiz.verizon.com:9290'
                                      }
                                    ),
                                    console.log('fetchApiURL:', o),
                                    o.then((function (e) {
                                      return e.json()
                                    })).then((function (e) {
                                      return _(r, e)
                                    })).then(
                                      (
                                        function (t) {
                                          return Promise.allSettled(t.map(S)).then(
                                            (
                                              function (t) {
                                                var n = t.filter((function (e) {
                                                  return 'fulfilled' === e.status
                                                })).map((function (e) {
                                                  return e.value
                                                }));
                                                e(n),
                                                console.log('End of fetchServerList :' + n)
                                              }
                                            )
                                          )
                                        }
                                      )
                                    ).catch(
                                      (
                                        function (e) {
                                          console.log('test failed', e),
                                          k(
                                            'SET_IS_ERRORED',
                                            {
                                              isErrored: !0,
                                              whoInvoked: '',
                                              reqID: '',
                                              error: 'connection error'
                                            }
                                          )
                                        }
                                      )
                                    )
                                  }
                                )
                              )
                            },
```

The call to WebSocket is done via `Promise.allSettled(t.map(S))`. Interestingly I found that the promise from `fetch('https://WASKDCFN-0222304B-INET.vzbi.com:8081/api/ndtServers')` never resolves, nor it shows up in the network log in devtools. This blocks S being called, and thus passing it to networking.

Back to Bug 1987944 Comment 12