ioBroker / ioBroker.admin

user interface for configuration and administration
https://iobroker.net
MIT License
273 stars 78 forks source link

[bug]: WARNUNG: Aktuelles Repository ist "Offizielles stabiles Repository". Benutzung auf eigene Gefahr! #2689

Closed raldi01 closed 1 month ago

raldi01 commented 1 month ago

No existing issues.

Describe the bug

I have updated today to admin 7.1.2 . Since the update i get the warning as discribed. Is this really wanted?

To Reproduce

Click on the adapters tab and the warning appears.

Expected behavior

This should give no warning.

Screenshots & Logfiles

grafik

Adapter version

7.1.2

js-controller version

6.0.11

Node version

20.17.0

Operating system

Debian 12 bookworm on an Proxmox VM

Additional context

No response

raldi01 commented 1 month ago

These are my settings for the repos. grafik

foxriver76 commented 1 month ago

It is still present with 7.1.3? I cannot reproduce it, can you show the raw of the system.repositories object please

Michel83 commented 1 month ago

Hello, yes still there:

image

is the content from this data point required?

image

foxriver76 commented 1 month ago

Yep on this datapoint, please click on the Pen icon and go to tab raw, copy paste the content here as text please.

raldi01 commented 1 month ago

On my site the message disappiered after updating to admin 7.1.3.It is not possible to paste the RAW. It is to long. The message here is: There was a problem saving your comment. Your comment is too long (maximum is 65536 characters). Please try again.

foxriver76 commented 1 month ago

This part would be helpful


 "native": {
    "repositories": {
      "stable": {
        "link": "http://download.iobroker.net/sources-dist.json",
        "json": {
          "_repoInfo": {
            "stable": true,
            "name": {
              "en": "Official stable repository",
              "de": "Offizielles stabiles Repository",
              "ru": "Официальный стабильный репозиторий",
              "pt": "Repositório estável oficial",
              "nl": "Officiële stabiliteit",
              "fr": "Dépôt stable officiel",
              "it": "Repository stabile ufficiale",
              "es": "Repositorio estable oficial",
              "pl": "Repozytorium",
              "zh-cn": "A. 正式稳定存放处"
            },
            "repoTime": "2024-09-24T02:57:07.508Z",
            "recommendedVersions": {
              "nodeJsAccepted": [
                16,
                18,
                20
              ],
              "nodeJsRecommended": 20,
              "npmRecommended": 10
            }
          },
``
klein0r commented 1 month ago

If you don't know how to access the object definition, you can share the results of

sudo apt install jq
iobroker object get system.repositories | jq | head -n 50
udondan commented 1 month ago

Got the same warning since 7.1.2, also with 7.1.5.

In my repo config I have http://repo.iobroker.live/sources-dist.json as active repository. I have never touched this myself, so it must currently or previously have been the default. In the screenshot above, though, I see http://download.iobroker.net/sources-dist.json

Which of the URLs should be used?

I updated the value to the one from the screenshot but the warning is still present.

$ iobroker object get system.repositories | jq | head -n 50
{
  "_id": "system.repositories",
  "type": "config",
  "common": {
    "name": {
      "en": "System repositories",
      "de": "System-Repositorys",
      "ru": "Системные репозитории",
      "pt": "Repositórios do sistema",
      "nl": "Systeemrepository's",
      "fr": "Référentiels système",
      "it": "Repository di sistema",
      "es": "Repositorios del sistema",
      "pl": "Repozytoria systemowe",
      "zh-cn": "系统资料库"
    },
    "dontDelete": true
  },
  "native": {
    "repositories": {
      "Stable (default)": {
        "link": "https://download.iobroker.net/sources-dist.json",
        "json": {
          "_repoInfo": {
            "stable": true,
            "name": {
              "en": "Official stable repository",
              "de": "Offizielles stabiles Repository",
              "ru": "Официальный стабильный репозиторий",
              "pt": "Repositório estável oficial",
              "nl": "Officiële stabiliteit",
              "fr": "Dépôt stable officiel",
              "it": "Repository stabile ufficiale",
              "es": "Repositorio estable oficial",
              "pl": "Repozytorium",
              "zh-cn": "A. 正式稳定存放处"
            },
            "repoTime": "2024-09-27T02:57:37.613Z",
            "recommendedVersions": {
              "nodeJsAccepted": [
                16,
                18,
                20
              ],
              "nodeJsRecommended": 20,
              "npmRecommended": 10
            }
          },
          "accuweather": {
            "name": "accuweather",
foxriver76 commented 1 month ago

http://download.iobroker.net/sources-dist.json is the correct one, but both have _repoInfo.stable = true which should not display the warning.

Can you show a screenshot of the warning + the tab on which it occurs? Host and Adapters? @udondan

udondan commented 1 month ago

As far as I can see, this is only shown on the Adapters page.

Screenshot 2024-09-27 at 13 38 27@2x

foxriver76 commented 1 month ago

Can you show from the system.config object the common.activeRepo attribute, this is currently my last idea to look into. From code it seems that it checks if one repo does not have the _repoInfo.stable = true and name does not start with stable, so maybe there is a dead repository somehow.

klein0r commented 1 month ago

default configuration

"repositories": { "stable": { "link": "http://download.iobroker.net/sources-dist.json",

@udondan configuration

"repositories": { "Stable (default)": { "link": "https://download.iobroker.net/sources-dist.json",

Maybe the admin checks for the key instead of the stable flag?

https://github.com/ioBroker/ioBroker.admin/blob/84e927d82c935da0398f7d4a834af5874c59ad5c/packages/admin/src-admin/src/tabs/Adapters.tsx#L1911

udondan commented 1 month ago

The value of common.activeRepo lgtm:

$ iobroker object get system.config | jq .common.activeRepo
"Stable (default)"
foxriver76 commented 1 month ago

Ah it's still a string for you, I can reproduce it now. Thanks

foxriver76 commented 1 month ago

will be fixed with https://github.com/ioBroker/ioBroker.admin/pull/2707

foxriver76 commented 1 month ago

default configuration

"repositories": { "stable": { "link": "http://download.iobroker.net/sources-dist.json",

@udondan configuration

"repositories": { "Stable (default)": { "link": "https://download.iobroker.net/sources-dist.json",

Maybe the admin checks for the key instead of the stable flag?

https://github.com/ioBroker/ioBroker.admin/blob/84e927d82c935da0398f7d4a834af5874c59ad5c/packages/admin/src-admin/src/tabs/Adapters.tsx#L1911

Yep, one line below the string case was inverted. I also changed these double negations for the array, they are hard to read imo^^

udondan commented 1 month ago

Awesome, thank you @foxriver76!