angular / angular

Deliver web apps with confidence 🚀
https://angular.dev
MIT License
94.98k stars 24.85k forks source link

DevTools cause Firefox to consume high CPU and memory on Microsoft 365 websites #55854

Open X-Celcius opened 1 month ago

X-Celcius commented 1 month ago

Is this a bug report or a feature request?

Please provide the steps to reproduce the issue [Bug Report only]

When accessing any Microsoft sharepoint or office page, Firefox starts to use around 50% CPU and uses an increasing amount of memory, way beyond 10GB after a few minutes. Disabling Angular DevTools resolves the issue.

Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]

Expected behavior: No noticeable performance impact by Angular DevTools, especially on non-Angular websites Actual behavior: Extreme resource usage on some websites when enabling Angular DevTools

Please provide a screenshot if possible [Bug Report only]

No response

Please provide the exception or error you saw [Bug Report only]

I have tried to get a memory dump or profiling session from Firefox but it is incredibly difficult given that Firefox itself starts to hang after a few seconds and the only way to get it to be responsive again is to close the tab, which will also free up all memory. 

However, I have noticed that the error started roughly 1 week ago, when I also received the latest DevTools update 1.0.16. 
This update mentions: "Adding support for inspecting Angular applications inside iframes"

When I leave the console open when loading sharepoint it reports hundreds of these messages (among other things): 
IFrame: origin https://autologon.microsoftazuread-sso.com is not in the allowed list.
or: 
IFrame: Integrated Windows Authentication failed with status code 401 (Unauthorized).

These messages do not appear once I disable the extension. 

Blind guess: 
I come to the conclusion that the IFrame-inspection causes some issue with the Microsoft SSO mechanism. I read somewhere that authorization inside IFrames requires special attention due to clickjacking attacks: https://datatracker.ietf.org/doc/html/rfc6819#section-4.4.1.9
Maybe the inspection is interfering with this?

Is this a browser-specific issue? If so, please specify the device, browser, and version. [Bug Report only]

Running Firefox 126.0 (64-Bit) on Windows 11

Description [Feature Request only]

No response

Proposed solution [Feature Request only]

No response

Alternatives considered [Feature Request only]

No response

JeanMeche commented 1 month ago

I'm not able to reproduce it (On any Office 365 apps I'm able to access with a corporate account).

I could be related to #49518

DrunkenToast commented 1 week ago

I am experiencing the same issue on Firefox. Workaround for creating site exceptions works. Or simply disabling the extension.

I do indeed believe it is related to SSO. This happens when signing into AWS/Azure SSO for clients using Microsoft.

sakonn commented 1 week ago

Hello,

I am experiencing the same issue in the Firefox dev edition, build 127.0b9 on a MacBook Pro. The issue is also occurring on the website which I use to buy railway tickets. Maybe you can try to reproduce the bug there. Steps to reproduce the bug:

  1. Open the homepage of the railway company: https://www.zssk.sk/en/
  2. Click to search for connections (it's Slovak railway so need to enter Slovak cities). For example, from BRATISLAVA to TRNAVA.
  3. Select any date and time.
  4. Click on search connections.

After these steps, I am redirected to the connections results page where the memory consumption of Firefox starts to explode and generally, the browser gets stuck. Memory usage is increasing in a few seconds in my case. I don't even need to open devtool. It's enough that the angular dev tools plugin is enabled.

ibcht commented 6 days ago

Hi,

User of Firefox 126.0.1 on Windows 11 here, with the Angular DevTools living in my extensions, I experienced a similar story when accessing mail.yahoo.com : high CPU usage, hungry for memory, after a few seconds my favorite browser becomes completely stuck. Shutting down the extension and no more issue.

I also tried the Slovak railway company @sakonn (and could even find some trips, despite my poor Slovak geography knowledges) and I can confirm it is the same.

Similarly to OP, I am not able to launch FF memory profiler fast enough as the browser become unresponsive very quickly ...

No MS SSO involved for me.

Not a big deal to me, I'm not using this extension that much nowadays but I wanted to share my experience to help others.