0

Google Chrome debug tools cause a network failure when using an Apple MacBook Pro. When not in the debugger, the following code works just fine:

async getQuotes() { const uriParams = new HttpParams().set('page', ++this.page);

await lastValueFrom(this.httpClient.get(`${environment.baseUrl}/api/quotes`, { params: uriParams}))
  .then (result => {
    this.message = `${JSON.stringify(result)}`;
  })
  .catch(() => {
    this.message = '*** Failed ***';
  })

}

proxy.conf.json contains:

{ "/api/*": { "target": "http://localhost:3000", "changeOrigin": true, "logLevel": "debug", "secure": false }, "/candy": { "target": "http://localhost:3000", "changeOrigin": true, "logLevel": "debug", "secure": false } }

It seems that the developer tools for Chrome on the Mac don't pick up the proxy.

So...

Same project in Linux. Everything works just fine.

Result - can't use the Mac for Angular development since the debugger causes the api to fail. It looks for http://localhost:4200/api/quotes instead of http://localhost:3000.

1 Answer 1

0

I had set throttling in Chrome Developers Tools. As soon as I unset it, the problem was solved. Thanks to Angular support team :-)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.