daredoes / linked-lovelace-ui

Create cards that can be re-used, updated, and handle templated data.
MIT License
27 stars 3 forks source link

button "load Data" stopped updating card configuration #38

Closed Phos69 closed 1 week ago

Phos69 commented 2 weeks ago

Checklist:

Release with the issue: core 2024.5.0

Supervisor 2024.04.4

Operating System 12.2

Frontend 20240501.0

Last working release (if known): I suppose it was working with previous relase but cannot confirm

Browser and Operating System: Chrome 124.0.6367.119 64bit windows 11 I also tried on Android phone running companion version 2024.4.1-full and it does not work as well

Description of problem:

When changing a templated card, and then pressing the Load Data button from the LinkedLovelaceStatus Card to apply edits, I used to get a refresh page button that would refresh the configuration and apply all the new settings. I am not getting that anymore and even after manually refreshing the webpage, the configuration on the cards does not update

Javascript errors shown in the web inspector (if applicable): In the browser console, after activating the debug mode from the status I get the following messages when trying to update the card:

linked-lovelace-ui.js?hacstag=559360809222:59   LINKED-LOVELACE-UI   Backing up current dashboard data. Ignore 'Update' Messages. Dry-Run is enabled.    {timestamp: '2024-05-02T10:50:19.972Z'}
linked-lovelace-ui.js?hacstag=559360809222:82 Uncaught (in promise) {code: 'config_not_found', message: 'No config found.'}
Fr.handleClick @ linked-lovelace-ui.js?hacstag=559360809222:82
await in Fr.handleClick (async)
handleEvent @ linked-lovelace-ui.js?hacstag=559360809222:32

image Additional information:

The cards were previously working as intended so I assume some recent updates broke it

Please let me know if you need any additional information

daredoes commented 1 week ago

@Phos69 Just merged 2.2.3 to help provide more clarity around this, and ideally fail silently in the background

erkr commented 1 week ago

Thanks for working on this issue. With v2.2.3 I lost both the partials and status card. During start up of HA there is an error in HA log:

Logger: frontend.js.latest.202405010
Source: components/system_log/__init__.py:333
First occurred: 11:27:34 (1 occurrences)
Last logged: 11:27:34

Uncaught error from WebKit 605.1.15 on iOS 17.4.1 TypeError: undefined is not an object (evaluating '(void 0).diff=Lr') module code (/hacsfiles/linked-lovelace-ui/linked-lovelace-ui.js:72:10372)

I provided some screenshots on discord.

One remark: could it be related to the Map as a dashboard?! That one doesn't have an URL in the config.

Best Eric

daredoes commented 1 week ago

@erkr that's what I get for trying to update an import. Reverting that line, should fix the above bug. 2.2.4 will hopefully work

Phos69 commented 1 week ago

Hi @daredoes,

thanks for working on it.

I attached the full logs I got from browser console

linkedlovelace.log

daredoes commented 1 week ago

Looks like it is the map config that seems to crash when creating a diff. I'll add some safety around the diffing process and see if that fixes it fast

daredoes commented 1 week ago

Just published 2.2.5 to handle that specific error in the attached logs @Phos69.

erkr commented 1 week ago

@daredoes It works. The overview errors are still in the console log.

daredoes commented 1 week ago

Marking as resolved