cuba-platform / cuba-sdk

Software development kit for CUBA Platform
Apache License 2.0
4 stars 3 forks source link

Translation addon installation error: Index 0 out of bounds for length 0 #99

Open konyashkina opened 2 years ago

konyashkina commented 2 years ago

https://github.com/cuba-platform/cuba-sdk/issues/98 was fixed, but the same issue occurs for some Translation add-ons (exept Greek Translation).

Steps: Pre-condition: Run Cuba SDK, set your target repository.

  1. Start to install jmix-addon: sdk>install jmix-addon

(Message Select Jmix addon category appears).

  1. Select Translation: type 2.

(List of Translation add-ons appears:

  1. German Translation
  2. Romanian Translation
  3. Russian Translation
  4. Simplified Chinese Translation)
  1. Select an addon: type a nubmer (e.g. 3 for Russian Translation).
  2. Select version of the addon.

ER: Translation addon is installed successfully.

AR: Command execution failed with an exception.

FAILURE: Command execution failed with an exception.

* What went wrong:
> Index 0 out of bounds for length 0

stacktrace

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
        at java.base/java.util.Objects.checkIndex(Objects.java:372)
        at java.base/java.util.ArrayList.get(ArrayList.java:458)
        at com.haulmont.cuba.cli.plugin.sdk.components.cuba/com.haulmont.cli.plugin.sdk.component.cuba.providers.JmixAddonProvider.searchInMarketplace(JmixAddonProvider.kt:150)
        at com.haulmont.cuba.cli.plugin.sdk.components.cuba/com.haulmont.cli.plugin.sdk.component.cuba.providers.JmixAddonProvider.searchInMarketplace$default(JmixAddonProvider.kt:147)
        at com.haulmont.cuba.cli.plugin.sdk.components.cuba/com.haulmont.cli.plugin.sdk.component.cuba.providers.JmixAddonProvider.resolveCoordinates(JmixAddonProvider.kt:136)
        at com.haulmont.cuba.cli.plugin.sdk/com.haulmont.cuba.cli.plugin.sdk.commands.artifacts.BaseComponentCommand.providerSearchContext$cuba_sdk(BaseComponentCommand.kt:388)
        at com.haulmont.cuba.cli.plugin.sdk/com.haulmont.cuba.cli.plugin.sdk.commands.artifacts.InstallComponentCommand.createSearchContext(InstallComponentCommand.kt:34)
        at com.haulmont.cuba.cli.plugin.sdk/com.haulmont.cuba.cli.plugin.sdk.commands.artifacts.BaseInstallCommand.run(BaseInstallCommand.kt:36)
        at com.haulmont.cli.core/com.haulmont.cli.core.commands.AbstractCommand.execute(AbstractCommand.kt:37)
        at com.haulmont.cli.core/com.haulmont.cli.core.ShellCli.evalCommand(ShellCli.kt:138)
        at com.haulmont.cli.core/com.haulmont.cli.core.ShellCli.run(ShellCli.kt:124)
        at com.haulmont.cli.core/com.haulmont.cli.core.EntryPointKt.main(EntryPoint.kt:116)
konyashkina commented 1 year ago

Re-tested on cuba-sdk-0.3-SNAPSHOT #121 OS Windows 10 Pro jmix-dependencies-1.4.0

The same result:

FAILURE: Command execution failed with an exception.

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
        at java.base/java.util.Objects.checkIndex(Objects.java:372)
        at java.base/java.util.ArrayList.get(ArrayList.java:458)
        at com.haulmont.cuba.cli.plugin.sdk.components.cuba/com.haulmont.cli.plugin.sdk.component.cuba.providers.JmixAddonProvider.searchInMarketplace(JmixAddonProvider.kt:150)
        at com.haulmont.cuba.cli.plugin.sdk.components.cuba/com.haulmont.cli.plugin.sdk.component.cuba.providers.JmixAddonProvider.searchInMarketplace$default(JmixAddonProvider.kt:147)
        at com.haulmont.cuba.cli.plugin.sdk.components.cuba/com.haulmont.cli.plugin.sdk.component.cuba.providers.JmixAddonProvider.resolveCoordinates(JmixAddonProvider.kt:136)
        at com.haulmont.cuba.cli.plugin.sdk/com.haulmont.cuba.cli.plugin.sdk.commands.artifacts.BaseComponentCommand.providerSearchContext$cuba_sdk(BaseComponentCommand.kt:388)
        at com.haulmont.cuba.cli.plugin.sdk/com.haulmont.cuba.cli.plugin.sdk.commands.artifacts.InstallComponentCommand.createSearchContext(InstallComponentCommand.kt:34)
        at com.haulmont.cuba.cli.plugin.sdk/com.haulmont.cuba.cli.plugin.sdk.commands.artifacts.BaseInstallCommand.run(BaseInstallCommand.kt:36)
        at com.haulmont.cli.core/com.haulmont.cli.core.commands.AbstractCommand.execute(AbstractCommand.kt:37)
        at com.haulmont.cli.core/com.haulmont.cli.core.ShellCli.evalCommand(ShellCli.kt:138)
        at com.haulmont.cli.core/com.haulmont.cli.core.ShellCli.run(ShellCli.kt:124)
        at com.haulmont.cli.core/com.haulmont.cli.core.EntryPointKt.main(EntryPoint.kt:116)