tolgee / tolgee-cli

The Tolgee CLI
MIT License
15 stars 11 forks source link

`plan_translation_limit_exceeded` error when trying to push from Windows #101

Closed ZaLiTHkA closed 1 month ago

ZaLiTHkA commented 1 month ago

I'm about a week into my adventures with Tolgee, and just this morning I discovered an interesting discrepancy between how the CLI tool behaves on Windows vs Linux.

for context, this is what I'm currently working with:

my app project exists within a Nx monorepo workspace, so do take note of the following paths, relative to the workspace root:


the crux of the issue here is that tolgee push works perfectly from my Zorin OS (Debian based) environment, but fails with a Invalid request data [status: 400, code: plan_translation_limit_exceeded] error from my Windows 11 Pro environment.

the translation files that I'm trying to push are the very same files that I downloaded from my hosted Tolgee project, so this should simply update existing keys in place, no new keys are being added.


with the following command: tolgee -v -c ./apps/my-app/.tolgeerc.json push

I get the following output from Windows (personal details redacted):

🐭✅     Reading files...
⚪ [HTTP] Requesting: POST https://app.tolgee.io/v2/projects/XXX/single-step-import
    🐁   Importing...⚪ [HTTP] Response: https://app.tolgee.io/v2/projects/XXX/single-step-import [400]
🐭✅     Uploading files...
🐭✅     Importing...
🔴 Invalid request data [status: 400, code: plan_translation_limit_exceeded]
    at handleLoadableError (file:///C:/Users/XXX/scoop/persist/nvs/nodejs/node/20.13.1/x64/node_modules/@tolgee/cli/dist/client/TolgeeClient.js:16:9)
    at Command.<anonymous> (file:///C:/Users/XXX/scoop/persist/nvs/nodejs/node/20.13.1/x64/node_modules/@tolgee/cli/dist/commands/push.js:115:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Command.parseAsync (C:\Users\XXX\scoop\persist\nvs\nodejs\node\20.13.1\x64\node_modules\@tolgee\cli\node_modules\commander\lib\command.js:1092:5)
    at async run (file:///C:/Users/XXX/scoop/persist/nvs/nodejs/node/20.13.1/x64/node_modules/@tolgee/cli/dist/cli.js:128:9)

my .tolgeerc.json file is as follows (project ID redacted as with CLI output):

{
  "$schema": "https://tolgee.io/cli-schema.json",
  "projectId": XXX,
  "format": "JSON_TOLGEE",
  "patterns": [
    "./src/**/*.ts?(x)"
  ],
  "push": {
    "files": [
      {
        "path": "./src/assets/i18n/en.json",
        "language": "en"
      }
    ],
    "forceMode": "OVERRIDE",
    "removeUnusedKeys": true
  },
  "pull": {
    "path": "./src/assets/i18n",
    "delimiter": null
  }
}

please do let me know if you need any further details regarding this..

JanCizmar commented 1 month ago

Hey! Would you be open to also share the en.json?

ZaLiTHkA commented 1 month ago

Hey! Would you be open to also share the en.json?

would just a portion of it suffice? or do you need the full file?

stepan662 commented 1 month ago

I think, the file is not necessary as it was exported from tolgee. I'll need to check it on windows.

ZaLiTHkA commented 1 month ago

@JanCizmar just FYI, @stepan662 was helping answer a few of my questions earlier in this discussion thread, which is when I discovered this particular issue.

ZaLiTHkA commented 1 month ago

..and the path separator strikes again.

thanks @stepan662, just tested the oh-so-freshly released 2.1.6 and it is indeed fixed.