balena-io-experimental / browser

A drop-in web browser block
98 stars 75 forks source link

Browser hangs unexpectedly #82

Open razmikarm opened 2 years ago

razmikarm commented 2 years ago

We're working on a Jetson Nano with TFT display and are using browser container to show some stuff. We also use its API to configure what exactly needed to be shown. And from time to time it happens, that browser hangs and when we change the URL of a browser, it shows no changes on display, but on API level it shows, that everything works properly and browser is on a latest page you set.

phil-d-wilson commented 2 years ago

Hey @razmikarm - do you get any error logs in balenaCloud dashboard when the crash happens?

razmikarm commented 2 years ago

@phil-d-wilson Thank you for reply. No, seems like it even doesn't realize that.

phil-d-wilson commented 2 years ago

@razmikarm if you remove TFT and use HDMI, can you recreate?

razmikarm commented 2 years ago

It is actually connected from HDMI port.

phil-d-wilson commented 2 years ago

@razmikarm To be clear, the TFT is powered from the nano, but connected to the HDMI port?

If so, can you then tell me the steps to recreate the crash, and I'll see if I can get my nano to do it.

razmikarm commented 2 years ago

Actually I haven't found a reproduce way, it just happens unexpectedly, now We are working on it to find a way to reproduce this somehow.

phil-d-wilson commented 2 years ago

@razmikarm excellent, thanks! If you find a way, let me know. I'll run mine up and see if it does it on it's own, but some repro steps are more likely to help me debug it.

razmikarm commented 2 years ago

@phil-d-wilson, turns out problem is related to multiple tabs. We were using it in KIOSK mode and after exiting it we saw that there have been opened multiple tabs, which was unexpected for us, as we were only updating url by sending POST request to the /url endpoint (also would like to mention, that it is mentioned PUT method in documentation, but that method isn't maintained in server.js). Our system is fully automated, so when we tried to reproduce the issue manually, it turned out, that browser opens tabs without changing one tab's url, when multiple requests in a row is done. Also it shows 'Restore tabs' chrome pop-up and refuses to response to any API call even after closing that pop-up window.

photo_2021-09-16_18-25-06