Skip to content

[bug]: Unable to read empty (= never used) meta directory (readDirAsync): not exists #2998

@klein0r

Description

@klein0r

No existing issues.

  • There is no existing issue for my problem.

Description

I'm not able to read an empty and never used meta object. Expected an empty array instead.

Screenshot 2025-01-06 at 14 10 19

Reproduction instruction

  1. Use the instance configuration to create a new meta object in io-package
  "instanceObjects": [
    {
      "_id": "",
      "type": "meta",
      "common": {
        "name": {
          "en": "Meta storage for user files",
          "de": "Meta-Speicher für Benutzerdateien",
          "ru": "Meta Storage для файлов пользователей",
          "pt": "Meta de armazenamento para arquivos de usuário",
          "nl": "Meta opslag voor gebruikersbestanden",
          "fr": "Stockage Meta pour les fichiers utilisateur",
          "it": "Meta storage per i file utente",
          "es": "Meta almacenamiento para archivos de usuario",
          "pl": "Meta storage for user files",
          "uk": "Зберігання мета для файлів користувачів",
          "zh-cn": "用户档案的储存"
        },
        "type": "meta.user"
      },
      "native": {}
    }
]
  1. Start the instance and ensure the object has been created
  2. Use the files tab in admin and access the meta object
  3. Use const files = await this.readDirAsync(this.adapter.namespace, '/');

The last 2 steps will fail (Error: Not exists) until a file has been created.

JS-controller version

7.0.6

Node version

v20.18.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions