gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

Error for icloud3-event-log-card in the latest HA beta #191

Closed gieljnssns closed 1 year ago

gieljnssns commented 1 year ago

I've installed the new HA beta 2023.9.0b0 and now I'm seeing this in my logs.

Logger: frontend.js.latest.202308310
Source: components/system_log/__init__.py:269
First occurred: 01:02:08 (102 occurrences)
Last logged: 14:25:03

Unhandled promise rejection from Chrome 114.0.0.0 on Linux x86_64 "http://192.168.79.54:8123/hacsfiles/icloud3/icloud3-event-log-card.js"
Unhandled promise rejection from Chrome 114.0.0.0 on Linux x86_64 "http://192.168.79.54:8123/hacsfiles/frigate-hass-card/frigate-hass-card.js?hacstag=394082552300"
Unhandled promise rejection from Chrome 116.0.0.0 on Mac OS 10.15.7 { "code": "not_found", "message": "Subscription not found." }
Unhandled promise rejection from WebKit 605.1.15 on iOS 16.6 { "type": "result", "success": false, "error": { "code": 3, "message": "Connection lost" } }
Unhandled promise rejection from WebKit 605.1.15 on iOS 17.0 Error: Cannot parse given Error object parse (node_modules/error-stack-parser/error-stack-parser.js:35:32) error (node_modules/stacktrace-js/stacktrace.js:106:67) Promise ([native code]::) fromError (node_modules/stacktrace-js/stacktrace.js:105:31) lines.push (src/resources/log-message.ts:37:40) createLogMessage (/frontend_latest/81095-aRtMBVJlipY.js:1:1073) ev (src/state/logging-mixin.ts:56:12)

I can't see any errors in the console.

smarthomefamilyverrips commented 1 year ago

@gcobb321 I have same but am still on 2023.8.4 and got same error also for the kiosk-mode resource js file but did delete this as not need it, I a not able to permanent delete the js file for your custom integration

Logger: frontend.js.latest.202309010 Source: components/system_log/init.py:270 First occurred: 19:14:44 (1 occurrences) Last logged: 19:14:44

Unhandled promise rejection from Chrome 112.0.0.0 on Chromecast 1.56.500000 "https://6l9bl6u60.ui.nabu.casa/icloud3-event-log-card.js"

smarthomefamilyverrips commented 1 year ago

@gcobb321 is there anyway to permanent delete this resource js file, if I now manually delete it all the time after restart it again get generated.... I not need this as I not use the event log dashboard

gieljnssns commented 1 year ago

@smarthomefamilyverrips What happens when you delete it at Settings -> Dashboards -> Resources?

Scherm­afbeelding 2023-09-01 om 23 03 44
smarthomefamilyverrips commented 1 year ago

@gieljnssns I delete it from there but at restart the integration places it back again, also tryed to delete the custom folder in "www folder" that contains the file but still after restart all is installed/placed back again

gcobb321 commented 1 year ago

iCloud3 will update the resources to add support for the Event Log custom card when it starts. There is no option to not do this. It looks for a resources entry that contains the “/local/icloud3/event-log-card.js” file.

You mentioned “kiosk” mode. I am not familiar with kiosk mode.
Is that For your complete HA configuration or do you also have devices that run the iosapp or display HA Lovelace screens in a browser? Does this error impact the iCloud3 tracking operation (it is not useable) or is it just an error that shows up in the Log files? Did I not understand the kiosk mode and that has nothing to do with what you are doing?

I could add an option to not set up the Event Log but it would have to be state wide, not for on device.

smarthomefamilyverrips commented 1 year ago

iCloud3 will update the resources to add support for the Event Log custom card when it starts. There is no option to not do this. It looks for a resources entry that contains the “/local/icloud3/event-log-card.js” file.

You mentioned “kiosk” mode. I am not familiar with kiosk mode. Is that For your complete HA configuration or do you also have devices that run the iosapp or display HA Lovelace screens in a browser? Does this error impact the iCloud3 tracking operation (it is not useable) or is it just an error that shows up in the Log files? Did I not understand the kiosk mode and that has nothing to do with what you are doing?

I could add an option to not set up the Event Log but it would have to be state wide, not for on device

@gcobb321 I did use Kiosk mode before for casting dashboards to my Google Hubs with continues dashboard casting custom integration but not use this method anymore, now i use the cast lovelace view service to do this and when calling this service to cast dashboard on my Google Hubs the above mentioned error appears in my logs, I not think it is specific Kiosk Mode nor your ICloud3 integration causing the error, but just the presence of the .js files placed in the resources.

For me would be perfect to add a option so ICloud3 not will set up Event Log at all and not creates the .js file as I not use the event log custom card anyway and then I can permanently remove the .js file it creates to see if it solves the error in my logs

gcobb321 commented 1 year ago

I don’t think it will work but have you tried this.

WHY DO SOME CUSTOM CARDS NOT WORK? Home Assistant needs to be configured to allow Home Assistant Cast to load custom cards. Starting with Home Assistant 0.97, this is done automatically. If you are on an older version, or have manually configured CORS for the HTTP integration, add the following to your configuration.yaml file:

http:
  cors_allowed_origins:
    - https://cast.home-assistant.io
smarthomefamilyverrips commented 1 year ago

I don’t think it will work but have you tried this.

WHY DO SOME CUSTOM CARDS NOT WORK? Home Assistant needs to be configured to allow Home Assistant Cast to load custom cards. Starting with Home Assistant 0.97, this is done automatically. If you are on an older version, or have manually configured CORS for the HTTP integration, add the following to your configuration.yaml file:

http:
  cors_allowed_origins:
    - https://cast.home-assistant.io

@gcobb321 this indeed did not solve the issue unfortunately

SleepyNinja0o commented 1 year ago

I am seeing this same issue on my HA: image

gcobb321 commented 1 year ago

I’ll add the option to disable the automatic Lovelace resource setup in the next Prerelease version. I am out of town and will be back home about September 21st.

Change _/icloud3/support/startic3.py. Insert the following after line 128.

return Make sure the ‘return’ lines up with the ‘try:’ statement. Save the file and restart HA

gieljnssns commented 1 year ago

Since I've opened this issue, I've updated HA to all new beta versions and now I don't see this error anymore for this card only this ones

Logger: frontend.js.latest.202309050
Source: components/system_log/__init__.py:269
First occurred: 10:20:51 (35 occurrences)
Last logged: 14:56:19

Unhandled promise rejection from Chrome 116.0.0.0 on Linux x86_64 TypeError: Cannot read properties of undefined (reading 'attributes') changedProps.has (src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts:49:46) updated (src/reactive-element.ts:1378:9) _$AE (src/reactive-element.ts:1343:11) performUpdate (src/reactive-element.ts:1261:16) scheduleUpdate (src/reactive-element.ts:1233:24)
Unhandled promise rejection from Chrome 116.0.0.0 on Linux x86_64 TypeError: Cannot read properties of undefined (reading 'attributes') changedProps.has (src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts:50:46) updated (src/reactive-element.ts:1378:9) _$AE (src/reactive-element.ts:1343:11) performUpdate (src/reactive-element.ts:1261:16) scheduleUpdate (src/reactive-element.ts:1233:24)
Unhandled promise rejection from WebKit 605.1.15 on iOS 17.0 { "code": "not_found", "message": "Subscription not found." }

So I will close this issue...