-
Notifications
You must be signed in to change notification settings - Fork 590
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
Template Tile null pointer exception on non-null parameter renderedTemplate #2714
Comments
So just that we are understanding htis correctly. You clear data on the watch and don't login and continue to use the phone app to edit the template? |
Sorry, should've clarified there: clear data on watch, login again on the watch (the phone is never logged out or reset here, only the watch), and then, as a separate step, attempt to set the template tile content to what I quoted. Rephrased: I start from an entirely clean config on the watch, then login, then try to set the tile content. Throughout, the phone side remains as-is (no reset, no logout-login cycle, etc); additionally, the phone app stops crashing after I clear the watch's app data and re-login the watch again (suggesting that data retrieved from the watch is breaking the phone side). |
Possible cause: Here, line 53, there's a |
That would probably refer to #2653, which hasn't been released yet. While reviewing that PR it actually became obvious that templates can be |
Can I claim Absolutely! I'll install them a little later this morning and let you know. |
Well, the phone app isn't crashing anymore, which is good, although I'm not sure it's actually sending back the rendered template from the watch: the preview is blank, or indicates a generic template error, when using a known-good previous iteration of that laundry_remaining sensor (previous iteration split the minutes and seconds up). I grabbed this from the phone-side logs (using the current iteration of the template; I can add logs for the previous iteration, but it'll take some time since I'll have to opt-out of beta, reinstall, etc first, so lmk if you'd like me to try):
Edit: also, when the template is short enough (eg |
The rendered template isn't sent between the phone and watch, only the 'original' template is sent. They render the template independently for respectively the preview in settings and the template tile. If the preview on your phone changes, it should also send the template to the watch. Look in the logs for one of these messages, that should indicate if it is sent successfully or not: android/app/src/full/java/io/homeassistant/companion/android/settings/wear/SettingsWearViewModel.kt Lines 200 to 201 in 90a9a27
These logs indicate that the server result for the template
I see the text input color randomly changing to blue, but not the white text. If you're able to reproduce it reliably, could you open a new issue for this with screenshots? The input text isn't being converted from HTML. This issue only concerns to a NullPointerException when editing a template, inputs not rendering correctly isn't the same so to keep the discussion easier to follow another issue is preferred. |
Ack
A previous comment of mine in this thread mentions exactly that log text 😄
Ack (Sidebar on app behaviour:)
IMO, that message is not correct given the template is syntactically valid and doesn't throw an exception:
Not inconsistent with what I observed since I didn't spend much time on it at the time, because it'd need a new issue anyways 😄 |
This wasn't discussed in depth so your comment is welcome 🙂. I agree and have submitted a change to improve it; |
The change I referred to has been merged and with that I believe the original crash and related problems have been solved. Closing this issue as completed. If you're able to reliably reproduce the color of the preview changing when editing a template on the latest beta release of the app (beta-2556 or newer), feel free to open a new issue. As I previously said, I don't believe it is related to the HTML or template itself and haven't observed exactly the same. |
Home Assistant Android version:
Phone: beta-2510-f9ceeb0b-full
Wearable: beta-2510-f9ceeb0b-full
Android version:
11
Phone model:
OP7
Home Assistant version:
2022.7.6
Last working Home Assistant release (if known):
Description of problem:
Reproduction of #2157 by a different user (myself). Crashed half a second after the final
}
was appended to the text:I can reproduce the crash every time so long as I clear the app data on the wearable first (the phone's app data remains, only the watch's data is cleared).
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
Screenshot of problem:
Additional information:
Advised to open what amounts to a duplicate as the prior ticket was old.
The text was updated successfully, but these errors were encountered: