Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResizeObserver loop limit exceeded #5616

Closed
1 of 2 tasks
cryptomilk opened this issue Nov 2, 2021 · 8 comments
Closed
1 of 2 tasks

ResizeObserver loop limit exceeded #5616

cryptomilk opened this issue Nov 2, 2021 · 8 comments

Comments

@cryptomilk
Copy link
Contributor

cryptomilk commented Nov 2, 2021

  • I have searched open and closed issues for duplicates
  • I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.

I'm packaging Signal-Desktop for openSUSE and Fedora in the openSUSE Build Service.
https://build.opensuse.org/project/show/network:im:signal


Bug Description

With version 5.22 I get my .config/Signal/logs/app.log filled very quickly with:

{"level":50,"time":"2021-11-02T08:12:00.710Z","pid":23028,"hostname":"magrathea","msg":"Top-level unhandled error: null"}

If I extend the logging in ts/logging/set_up_renderer_logging.ts to get more details I see:

{"level":50,"time":"2021-11-02T08:57:45.629Z","pid":30404,"hostname":"magrathea","msg":"Top-level unhandled error: ResizeObserver loop limit exceeded file://[REDACTED]/resources/app.asar/background.html ...

Steps to Reproduce

  1. I dunno what cause the ResizeObserver in ts/hooks/useHasWrapped.ts to exceed the loop limit :-(

Platform Info

Signal Version: 5.22.0

Operating System:

openSUSE Tumbleweed

@cryptomilk
Copy link
Contributor Author

It writes ~1G per hour

@cryptomilk
Copy link
Contributor Author

Maybe this can help to fix it: WICG/resize-observer#38

@EvanHahn-Signal
Copy link
Contributor

Sorry you're running into this. Let's get to the bottom of it.

Because you opened a pull request, it looks like you've gotten the code up and running. When you see this error, could you add a debugger to figure out what's causing it, and why there's a loop?

Also: are you sure that the error comes from useHasWrapped.ts? That's the only place we use a ResizeObserver directly, but some of our subdependencies use it.

@cryptomilk
Copy link
Contributor Author

Could you tell me which debugger I could use and how to attach it? I'm not really the JS guy :-)

@EvanHahn-Signal
Copy link
Contributor

Find a spot in the code where you want to put a breakpoint and add debugger. For example, here's a function with debugger in the middle:

function foo() {
  console.log('before the debugger');
  debugger;
  console.log('after the debugger');
}

With the developer tools open, you should see the code stop on that line. You should be able to see a stack trace and find out additional information.

@darix
Copy link

darix commented Nov 3, 2021

FTR: 5.21.0 works fine with the other packages we use to build.

@cryptomilk
Copy link
Contributor Author

tsc tells me it doesn't know about debugger.

@EvanHahn-Signal
Copy link
Contributor

I'm going to close this issue because we don't officially support the openSUSE build and I can't reproduce this myself. If you can reproduce this on an officially-supported build, lemme know and we can reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants