klein0r / ioBroker.octoprint

ioBroker adapter to manage your 3D printer over ioBroker
https://haus-automatisierung.com/
MIT License
35 stars 18 forks source link

octoprint has an invalid jsonConfig: #160

Closed Brainbug01 closed 10 months ago

Brainbug01 commented 10 months ago

The problem

Admin v6.12.1 meldet beim öffnen des octoprint Adapter:

octoprint has an invalid jsonConfig: 
[{
"instancePath":"",
"schemaPath":"#/additionalProperties",
"keyword":"additionalProperties",
"params":{"additionalProperty":"iconPosition"},
"message":"must NOT have additional properties"
}]

Version of nodejs

v18.18.2

Version of ioBroker js-controller

5.0.15

Version of Adapter

v5.1.0

Operating system running ioBroker

Linux

Checklist of files to include below

Additional information & file uploads

No response

github-actions[bot] commented 10 months ago

Thanks for reporting a new issue @Brainbug01!

  1. Please make sure your topic is not covered in the documentation
  2. Ensure that you use the latest beta version (not the current stable version): 5.1.0
  3. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue
  4. Search for the issue topic in other/closed issues to avoid duplicates!

    Otherwise this issue will be closed.

klein0r commented 10 months ago

https://github.com/ioBroker/adapter-react-v5/issues/197

mcm1957 commented 10 months ago

Hmmm Wenn das angeblich schon gefixed ist, dann dürfte der Fehler eigentlich nicht mehr auftreten. Lt. foxriver prüft der admin gegen das ONLINE schema -das hätt ich als gegen Github verstanden,

klein0r commented 10 months ago

Naja, da liegen nur ein paar Stunden zwischen Issue und Fix. Eventuell hat sich das auch Überschnitten?

https://github.com/ioBroker/ioBroker.admin/blob/41225cdb7132a2081ab8011ca363613ce8294a90/lib/web.js#L362C11-L368

Anscheinend wird das wirklich bei jedem Öffnen der Konfiguration durchgeführt 😮

https://github.com/ioBroker/ioBroker.admin/blob/41225cdb7132a2081ab8011ca363613ce8294a90/src/src/components/JsonConfig.tsx#L614C1-L618

mcm1957 commented 10 months ago

Ja, der Check wird bei jedem Öffnen der Config ausgeführt. Aber so oft wird die Config ja wohl nicht geöffnet :-) Der obige Fehler ist gefixed,

Aber es gibt einen weiteren Fehler bei Multilanguage. Hab dazu issue erstellt: https://github.com/ioBroker/adapter-react-v5/issues/207

klein0r commented 10 months ago

Ja, der Check wird bei jedem Öffnen der Config ausgeführt

Naja, ein Cache wäre schon nett. Das Repository wird ja z.B. auch nicht jedes Mal geladen, wenn man auf die Adapter-Liste geht.

mcm1957 commented 10 months ago

Im Prinzip geb ich dir recht, Derzeit (mit fehlerhaftem Schema) ist no cache sicher sinnvoll. Mittelfristig macht cache ev. durchaus Sinn. Erstell ggF mal einen Issue (oder gleich PR :-) )

Brainbug01 commented 9 months ago

Die warn Meldung ist noch da, liegt das an mir? Admin v 6.12.6

klein0r commented 9 months ago

Die warn Meldung ist noch da, liegt das an mir?

Mittlerweile ist iconPosition eigentlich enthalten und die Validierung sollte klappen

Brainbug01 commented 9 months ago

Wie gesagt ist es bei mir immer noch da. Ich bin im Beta unterwegs und habe alle Adapter ( außer sayit ) auf aktuellem Stand.

2023-12-02 08:35:17.351 warn    octoprint has an invalid jsonConfig:
[{
"instancePath":"",
"schemaPath":"#/additionalProperties",
"keyword":"additionalProperties",
"params":{"additionalProperty":"iconPosition"},
"message":"must NOT have additional properties"
}]
klein0r commented 9 months ago

Danke, ich nutze das Attribut auf einem anderen Element als im Schema definiert ist. Habe es nochmal addressiert:

https://github.com/ioBroker/adapter-react-v5/issues/197#issuecomment-1837146845

mcm1957 commented 7 months ago

@klein0r Issue sollte reopend werden.

https://github.com/klein0r/ioBroker.octoprint/blob/12f9b463dc62b1d537cc4d10be7f8203282395d6/admin/jsonConfig.json#L4

Attribut iconPosition sollte lt. schema.md nicht auf TOP Ebene sondern innerhalb PANEL / TAB angegeben werden - dort wo auch das icon angegeben wird. Zumindest les ich die Doku so.

klein0r commented 7 months ago

@mcm1957 see https://github.com/ioBroker/adapter-react-v5/issues/197

Ich nutze die iconPosition genau so wie hier in allen Adaptern und kann diese wunderbar darüber steuern. Also ist das Schema richtig, aber der Code falsch (welcher ja funktioniert)? 😄

mcm1957 commented 7 months ago

@klein0r Du hast wieder mal vollkommen recht. Ich hab die Spezifikation falsch gelesen. Da scheint wirklich das SChem flsch zu sein, Nur ich find dazu kein offenen SCHEMA Issue. Das referenziert Issue ist ja schon zu ...

Ich stells nochmal mit den aktuellen Meldungen ein

klein0r commented 7 months ago

Ich bekomme überall Issues zu dem Thema und mache die immer zu, weil ja der Admin-Adapter die jsonConfig aufgebaut und das Schema dazu in adapter-react-v5 liegt. Gäbe es hier Handlungsbedarf von meiner Seite, hätte ich das natürlich direkt umgesetzt.

mcm1957 commented 7 months ago

Ja nur schau bitte ob ein passendes Issue in react-v5 existiert und verlink das. Ist für die User verständlicher. Für die iconPosition hab ich mal ein (neues) Issue angelegt.

klein0r commented 7 months ago

@mcm1957 Genau das mache ich doch? Siehe erste Antwort hier

mcm1957 commented 7 months ago

Passt schon. DANKE jedenalls Hab Moritz getriggert. Er schaut wann er Zeit freischaufeln kann um die offenen Schmea Dinge mal durchzugehen.

klein0r commented 7 months ago

Die Validation wäre irgendwie besser im adapter-checker aufgehoben als sie jedem User einzeln als Warning vor die Füße zu werfen...