I have been battling errors recently where my dashboards (I have three) - previously running perfectly on iPad gen 2 (x2) and iPad gen 5 (x1) started hanging overnight. Sometimes they would hang within hours of resetting.
I semi correlated this with an update to my Kiosk App - Kiosker Pro. They did a massive UI change.
But over time, I tried several other Kiosk apps and even Guided Access. But nothing seemed to help.
I was going down tbe road of replacing Safari as the default browser hoping the Kiosk apps would use this other browser but decided maube it was iOS and the iPads.
So I bought a lot of three iPad Gen 6âŚ. And oddly they are goving me the same issues.
What I have noticed is a toast message at rhe bottom of my ipads (usually) saying something about âSocketâ
I see Socket Connected when things are fine and Socket Status Unknown when the disboard gets stuck loading and Socket Disconnected when it seem the Dashboard has gone stale
I have read on here this seems to be a known issue?
Is there any advice for an iPad user? Settings to adjust? Logs to review?
Do you recall the approximate date? Looks like you posted about the Kiosker update on March 7th.
I canât think of any changes we made after the introduction of the realtime socket connection in early 2024 that could contribute to this. But I estimate that most devices running the production site cutover to the realtime socket connection in mid-late February.
Can you clarify whatâs a known issue? Perhaps a link to a thread?
The Socket Connected messages is normal. If the device gets stuck with a Socket Disconnected message, thatâs not good as it means your dashboard is not getting realtime updates.
Since you have a variety of devices available for testing, have you tried creating a separate âtestâ SharpTools account?
Itâs not clear exactly what you meant by âstarted hanging overnightâ, but that might determine what type of content you would need for testing. If itâs where you are clearly seeing an error like âSocket Disconnectedâ, then even a blank dashboard or just some dashboard with static content could work.
If itâs actions stopping working and realtime data stopping working, then perhaps just a few variables to test with (Iâm happy to temporarily tag the test account with free premium access to testing this).
What Iâm wondering is if perhaps thereâs some content either on the dashboard or in the account itself which is causing things to get funky. At the very least, if we can rule that out, it helps us focus our efforts elsewhere.
So in this case, this has actually been going on for a while - even before this. However, because this was the only significant change in my configuration, I thought it could have been due to this update. I was a beta tester for Kiosker Pro - so I had advanced access to this update as well.
Here, this is what I typically wake up to after overnight - but this happens randomly even during the day. Sometimes I can go 1-2 days, but eventually all three iPads will wind up looking like this - I didnât get a good photo but the toast says âSocket Status Unknownâ and there is a âloadingâ animation that just sits there.
As an alternative - I tried downloading Brave and making it the âdefaultâ browser - no help.
I bought âKiosk Pro Plusâ - no help
I bought âtKioskâ - no help
I tried âKiosk - Fullscreen Broswerâ - no help
I tried âURL Bookmarkâ / guided access - no help
What I havenât tried yet is using Brave as a âbookmarkâ and guided accessâŚ
i did get this replay from Kiosker Pro:
âWe are aware of memory leaks on some legacy devices. Our investigation points at memory leaks in the Apple WebKit engine. We have filed a bug report to Apple and they have responded that tey are aware of the issue. No solution is available at the moment. The issue seems quite hard to pinpoint since crashes only happens on some devices. We have a iPad Air 2 running a Home Assistant Dashboard for months without crashing.â
I owe them some logs - which I will be working on collectingâŚ
Do you have a rough idea of when it might have started?
Thanks for the feedback. That particular thread is a bit unique as it was a really early introduction of the background worker where it wasnât actually doing anything (intentionally). And this was actually showing an error about the worker itself which theoretically shouldnât ever happen and was really intended as a failsafe.
We refined the notification so it only shows when the background worker is really dead.
The notification you mentioned is around the realtime socket. You would expect to see the âconnectedâ status⌠and perhaps on a phone or device with unstable connection see the âdisconnectedâ status sometimes.
I couldnât see it in your second screenshot, but seeing the âSocket Status Unknownâ and the app stuck on the initial loading screen is definitely unexpected.
You mentioned that you bought a lot of three iPad 6th generation devices and those are giving you the same issues. I just wanted to confirm that itâs the same thing where you are the âSocket Status Unknownâ and the grey blank screen with the loading spinner?
To be fair, all browsers on iOS leverage Safariâs engine under the hood. Even Chrome. Itâs a restriction Apple places on iOS devices.
With âURL Bookmarkâ are you referring to using the Add to Homescreen option in iOS?
And in âGuided Accessâ, is that using regular Safari just with the app âlockedâ using Guided Access?
The reason I ask is the Add to Homescreen approach is kind of like the Kiosk apps where itâs using Safari for rendering, but itâs like its own sandboxed app. But Iâm curious if just native Safari is experiencing this too.
What about a simplified dashboard? I didnât see the whole dashboard, but if any of those media tiles are MJPEG or refreshing images, I wonder if that could contribute to the memory issue.
And if a simplified dashboard doesnât help, it would be could to at least try a test account so we can narrow down whatâs going on.
Correct - similar to the instructions post on the SharpTools user guide for iPads.
Let me add a bit more:
I have literally removed every single app that is removable (even all the Apple Apps).
The only apps left are Kiosker Apps, Camera, Safari, and Messenger (but Messenger is shut down as well)
I have shut off iCloud syncing - absolutely nothing syncs to iCloud
I have shut off Siri entirely,
I have shut off background App refresh (except for Kiosker Pro)âŚ
I have shut off Bluetooth
I have tried associating the WiFi to a dedicated AP (I have six APs in the house)
Notifications are off
I have one iPad with all Network protection shut off
As for the Bookmark method - Iâll explore that a bit more again.
The problem I found was, it had its own quirks when left onscreen for days on end.
Iâd come to a dashboard sitting on the homescreen or unresponsive to touchâŚ
I thought I read in some of the threads here the toast message âSocket connectedâ was a SharpTools thing? Is this correct?
As I troubleshoot this with folks from Kiosker Pro.
Thought Iâd share some of the logs I see which may - or may not - provide any insights.
First, what I have changed (beyond where I was a year ago)âŚ
I have upped all my refreshing images to no less than five minute refresh. Some I bumped to an hour refresh (all weather related). Internally, my cameras by IP - I bumped those to 15 seconds.
I removed a Javascript web part from WillyWeather (which provided a Weather Alert ticker type of display)âŚ
Here are some of the log entries I found interesting:
2024-06-11 20:07:12 INFO - [â[SocketManager::PingUtil::ping] Performing async ping with pingIdâ, âptYpejâ]
2024-06-11 20:07:16 VERBOSE - [âReceived 'collection.set' for 'publicTokens' with 1 documentsâ]
2024-06-11 20:07:12 ERROR - [â[WorkerHeartbeat] Heartbeat and ping failed. Attempting recreation. â]
2024-06-11 20:07:12 DEBUG - [â[SocketManager::PingUtil::awaitPong] PongTimeoutâ, âptYpejâ]
2024-06-11 20:07:12 VERBOSE - [â[SocketManager] SocketWorker is created.â]
2024-06-11 20:07:15 INFO - [â[SocketManager::success]â, âInitialized.â]
2024-06-11 20:07:15 INFO - [â[SocketManager::success]â, âSuccessfully sent command connectâ]
2024-06-11 20:07:15 DEBUG - [â[SocketManager::socket] status=connectingâ]
2024-06-11 19:41:06 DEBUG - [âSubscriptions are filtered from 241 to 148 based on device authorization for location - xxxxxxxâ]
2024-06-11 19:41:06 DEBUG - [âRetrieving subscriptions from samsung-smartthings for location xxxxxxxâ]
2024-06-11 19:41:06 DEBUG - [âThere are 241 subscriptions in the database for location xxxxxxâ]
2024-06-11 19:41:06 WARNING - ["Missing 11 subscriptions for location
----------FROM THE APP LOGS----------------
2024-06-13 11:08:43 INFO updateUIView(:context:): 46 - Screensaver WebView Representable updateUIView
2024-06-13 11:08:44 WARNING webViewWebContentProcessDidTerminate(:): 430 - WebView content process did terminate
Thanks for the updates. It seems like the pages may be âcrashingâ in some way since youâre seeing the grey blank screen with âSocket status unknownâ.
Apps vs Dashboard Content
I would be less concerned about the other apps on the iPad and more curious about the content on the dashboard itself which is why I was suggesting paring down the dashboard or even setting up a simplified test account.
Starting around June '23 was the release of the Homey Integration but that was mostly a backend change. There was a bunch of other improvements including Faster Custom Tiles, Autorefreshing Backgrounds, Rule Engine Improvements, Hero Attribute Improvements, and more, but I canât think of anything that would contribute to this type of issue.
Sockets & Background Worker
The realtime sockets in SharpTools werenât released to production until February '24. In November '23, we released an early implementation of the Background Worker, but it wasnât using a realtime socket for pushing out data â we end up refining that and rolling it out as a background thing in late '23 with the intention being that it would allow us to push out a message to devices running old versions of the web-app when we later did the realtime socket release several months later.
Log Entries
The log entries from the SharpTools side of things are mostly normal - receiving documents, periodic heartbeats, and the socket (re)connecting are normal.
While the healthcheck on the background worker is intentional and designed to recreate the worker in the rare event that it was terminated, itâs not something I would expect to commonly see in day-to-day usage. So thatâs interesting that it needed to recreate itself.
Thank you for your always responsiveness and assistance.
Ultimately my dashboard has been fairly static since I originally bragged about it in the âShow Me Your Dashaboardsâ threads.
On the homepage, I have three static JPGs and two animated GIFs. I am using your OpenWeather Title and then I fill the rest in with âbuttonsâ - none are Hero or Super⌠But highly customized in terms of Images/Colors
I am testing the idea of slowly removing a few blocks one at a time and waiting a period of timeâŚ
As I mentioned, for the most part my dashboards are pretty simple.
I have a lot of devices, but ultimately I just have several pages of on/off buttons.
My Home page does have several weather related tiles. - couple static JPGs and a couple animated GIFs.
One special script I have is related to weather alerts.
When there is a weather alert, a red banner will appear in the tile.
Otherwise, the tile is empty.
It does suck up some tile space, but I made it work by adding it to the bottom of my pages.
This script is available here:
I removed this script from my dashboards and it would seem this alleviated the majority of problems I was seeing.
I did have one dashboard time out âSocket Status Unknownâ but this was after three days of no issues (which I havenât seen in months)âŚ
But this has definitely caused me to rethink where I should be looking for the actual problem.
First I thought it was iOS and the newer versions killing the older iPads.
Then I thought it may be related to Apples built in apps (Siri / Background App Refresh / Bluetooth / etcâŚ)
Then I thought it may be the app I was using (Kiosker Pro)
Then I thought it may be the hardware (out of memory - I had cheap 16GB Gen 2s)
But now I can see it may simply be the code on the âwebsiteâ that is added via this script or perhaps even other widgets.
Script is included below - ultimately itâs pretty simple
Thanks for the update. That is interesting that the weather script seems to be contributing to the issues.
Thereâs a few other weather data related threads in the community that you might find interesting. For example, some community members have setup SharpTools Rules to pull weather information from Open Weather Map and they store things like weather warnings in SharpTools Variables.