Giter Site home page Giter Site logo

Causes Safari to Freeze about nocodb HOT 12 CLOSED

itopaloglu83 avatar itopaloglu83 commented on July 30, 2024
Causes Safari to Freeze

from nocodb.

Comments (12)

o1lab avatar o1lab commented on July 30, 2024 2

Thank you for reporting the issue with all the details.

from nocodb.

christiankriedemann avatar christiankriedemann commented on July 30, 2024 1

Same here on a Apple M3 Pro with Sonoma 14.5 (23F79) and Safari 17.5 (19618.2.12.11.6).
Nocodb runs as a Docker Container on my Debian Server.
It works for me when I switch to Google Chrome temporarily.

from nocodb.

christiankriedemann avatar christiankriedemann commented on July 30, 2024 1

Works like a charm. Replacing await pollNotifications() with setTimeout(pollNotifications, 0) resolved the issue. I used the following sed command to update the compiled code in place.

sed -i 's/await i()/setTimeout(i, 0);/g' /usr/src/app/./node_modules/nc-lib-gui/lib/dist/_nuxt/BVffXuyZ.js

Thank you very much @itopaloglu83 it works for me too. I ran your sed command inside my Docker container and it works like a charm. πŸ‘πŸ»

Chrome needs 3-5 times more RAM, compared to Safari, for the same Websites open. So i use Chrome only if really necessary.

from nocodb.

christiankriedemann avatar christiankriedemann commented on July 30, 2024 1

Yes, it works flawlessly for me too

from nocodb.

o1lab avatar o1lab commented on July 30, 2024 1

Thank you @itopaloglu83 @christiankriedemann for lending a helping a hand here.

from nocodb.

itopaloglu83 avatar itopaloglu83 commented on July 30, 2024

It might be a problem with my computer as well. I just don’t have any other device to test with.

from nocodb.

o1lab avatar o1lab commented on July 30, 2024

Have narrowed down the scenario - if we go to kanban and back to project home screen. The clicks freeze after like 5-10 seconds. Otherwise they mostly function.

from nocodb.

itopaloglu83 avatar itopaloglu83 commented on July 30, 2024

I wasn't able to replicate the kanpan path, but it seems like switching to another tab expedites the issue.

Here's the bare minimum way I was able to replicate it.

  • Navigate to app.nocodb.com
  • Wait for over 90 seconds without interacting with the page.

I believe this might be related to how Safari stops the execution of background tabs, especially when they are invisible.

Another interesting thing is the polling request getting stuck right around the same time. So I blocked the api/v1/notifications/poll endpoint which seems to alleviate the issue.

Screenshot 2024-06-15 at 11 01 52

from nocodb.

christiankriedemann avatar christiankriedemann commented on July 30, 2024

For me, the tab freezes after I have worked in another tab and return.
Sometimes while I am working in nocodb
Interestingly, it doesn't seem to occur when I have the web information (CMD + OPTION + I) open.

from nocodb.

itopaloglu83 avatar itopaloglu83 commented on July 30, 2024

I'm not familiar with the code base but it looks like 55425f5 made the pollNotifications function recursive. Check L31 below.

const pollNotifications = async () => {
try {
const res = await api.notification.poll()
if (res.status === 'success') {
if (notificationTab.value === 'unread') {
unreadNotifications.value = [JSON.parse(res.data), ...unreadNotifications.value]
}
unreadCount.value = unreadCount.value + 1
}
await pollNotifications()
} catch (e) {
// If network error, retry after 2 seconds
setTimeout(pollNotifications, 2000)
}
}

This might be the issue, I'm going to update the code to see what if it removes the issue.

from nocodb.

itopaloglu83 avatar itopaloglu83 commented on July 30, 2024

Works like a charm. Replacing await pollNotifications() with setTimeout(pollNotifications, 0) resolved the issue. I used the following sed command to update the compiled code in place.

sed -i 's/await i()/setTimeout(i, 0);/g' /usr/src/app/./node_modules/nc-lib-gui/lib/dist/_nuxt/BVffXuyZ.js

from nocodb.

DarkPhoenix2704 avatar DarkPhoenix2704 commented on July 30, 2024
docker run -d -p 8888:8080 nocodb/nocodb-timely:0.250.2-pr-8772-20240616-1919

Can you verify if this image fixes the issue

from nocodb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.