Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail in translate stage at generation in 8.7.0 #27174

Closed
tanrikut opened this issue Sep 4, 2024 · 4 comments · Fixed by #27199
Closed

Fail in translate stage at generation in 8.7.0 #27174

tanrikut opened this issue Sep 4, 2024 · 4 comments · Fixed by #27199
Labels
area: bug 🐛 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@tanrikut
Copy link

tanrikut commented Sep 4, 2024

Overview of the issue

When I try to generate a website using JHipster it fails with this output:

I downgraded one by one and see that it works at 8.2.1. Newer versions fails with this.

Welcome to JHipster v8.2.1

Welcome to the JHipster Information Sub-Generator

ggapp@0.0.1-SNAPSHOT C:\Proven\Kodlar\ggapp2
`-- generator-jhipster@8.2.1
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "ggapp",
    "buildTool": "maven",
    "cacheProvider": "no",
    "clientFramework": "angular",
    "clientTestFrameworks": [
      "cypress"
    ],
    "clientTheme": "flatly",
    "clientThemeVariant": "primary",
    "creationTimestamp": 1725471550696,
    "cypressAudit": true,
    "cypressCoverage": true,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "devServerPort": 4200,
    "enableGradleEnterprise": null,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [],
    "feignClient": null,
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.2.1",
    "languages": [
      "tr",
      "en"
    ],
    "messageBroker": false,
    "microfrontend": null,
    "microfrontends": [],
    "nativeLanguage": "tr",
    "packageName": "com.mycompany.myapp",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": null,
    "serverSideOptions": [
      "websocket:spring-websocket"
    ],
    "serviceDiscoveryType": false,
    "syncUserWithIdp": null,
    "testFrameworks": [
      "cypress"
    ],
    "websocket": "spring-websocket",
    "withAdminUi": true
  }
}
Environment and Tools

openjdk version "17.0.4.1" 2022-08-12
OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1)
OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)

git version 2.43.0.windows.1

node: v18.20.4
npm: 10.7.0

Docker version 27.2.0, build 3ab4256

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/

Thanks for using JHipster!

Environment

Windows 11
Node 18.20.4 (nvm)

`
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
https://www.jhipster.tech
Welcome to JHipster v8.7.0


Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/

Application files will be generated in folder: C:\Proven\Kodlar\ggapp2


? What is the base name of your application? ggapp2
? Which type of application would you like to create? Monolithic application (recommended for simple projects)
? What is your default Java package name? com.proven.ggapp
? Would you like to use Maven or Gradle for building the backend? Maven
? Do you want to make it reactive with Spring WebFlux? No
? Which type of authentication would you like to use? JWT authentication (stateless, with a token)
? Besides JUnit, which testing frameworks would you like to use? Cucumber
? Which type of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL)
? Which production database would you like to use? PostgreSQL
? Which development database would you like to use? PostgreSQL
? Which cache do you want to use? (Spring cache abstraction) No cache - Warning, when using an SQL database, this will
disable the Hibernate 2nd level cache!
? Which other technologies would you like to use? WebSockets using Spring Websocket
INFO! Disabling hibernate cache for cache provider no
? Which framework would you like to use for the client? Angular
? Besides Jest/Vitest, which testing frameworks would you like to use? Cypress
? Do you want to generate the admin UI? Yes
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Flatly
? Choose a Bootswatch variant navbar theme (https://bootswatch.com/)? Primary
? Would you like to enable internationalization support? No
? Please choose the native language of the application Turkish
? Please choose additional languages to install English
? Would you like to generate code coverage for Cypress tests? [Experimental] No
? Would you like to audit Cypress tests? Yes
info Could not remove legacy file .huskyrc
info Could not remove legacy file .lintstagedrc.js
info Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 99,999 days
info for: CN=Java Hipster, OU=Development, O=com.proven.ggapp, L=, ST=, C=
info KeyStore 'C:\Proven\Kodlar\ggapp2\src\main\resources\config\tls\keystore.p12' generated successfully.
info Could not remove legacy file .eslintrc.json
info Could not remove legacy file .eslintignore
info Could not remove legacy file src\test\javascript\cypress.eslintrc.json
√ applying multi-step templates
√ Git repository initialized.
create .prettierrc
create .prettierignore
√ prettier configuration files committed to disk
√ loading translations
√ updating package.json dependencies versions
√ prettifying sonar-project.properties
√ adding package-info.java files
√ sorting pom.xml file
√ translating angular application
ERROR! An error occured while running jhipster:angular#transformStream
ERROR! ERROR! Cannot read properties of undefined (reading 'replace')
TypeError: Cannot read properties of undefined (reading 'replace')
at escapeHtmlTranslationValue (file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/dist/generators/languages/support/translate.js:20:72)
at tagTranslation (file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/dist/generators/angular/support/translate-angular.js:100:29)
at createJhiTranslateReplacer.prefixPattern (file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/dist/generators/angular/support/translate-angular.js:228:20)
at replaceTranslateContents (file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/dist/generators/languages/support/translate.js:99:48)
at file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/dist/generators/languages/support/translate.js:103:127
at replaceAngularTranslations (file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/dist/generators/angular/support/translate-angular.js:244:44)
at file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/dist/generators/angular/support/translate-angular.js:262:37
at Transform. (file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/node_modules/@yeoman/transform/dist/transform.js:40:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Transform.transform [as _transform] (file:///C:/Users/tkoray/AppData/Roaming/nvm/v18.20.4/node_modules/generator-jhipster/node_modules/@yeoman/transform/dist/transform.js:14:37)`

@mshima
Copy link
Member

mshima commented Sep 4, 2024

Please post the jhipster info from application generated with v8.2.1 in the but description.
See details in the new Issue template.

@tanrikut
Copy link
Author

tanrikut commented Sep 4, 2024

Welcome to JHipster v8.2.1

Welcome to the JHipster Information Sub-Generator

ggapp@0.0.1-SNAPSHOT C:\Proven\Kodlar\ggapp2
`-- generator-jhipster@8.2.1
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "ggapp",
    "buildTool": "maven",
    "cacheProvider": "no",
    "clientFramework": "angular",
    "clientTestFrameworks": [
      "cypress"
    ],
    "clientTheme": "flatly",
    "clientThemeVariant": "primary",
    "creationTimestamp": 1725471550696,
    "cypressAudit": true,
    "cypressCoverage": true,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "devServerPort": 4200,
    "enableGradleEnterprise": null,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [],
    "feignClient": null,
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.2.1",
    "languages": [
      "tr",
      "en"
    ],
    "messageBroker": false,
    "microfrontend": null,
    "microfrontends": [],
    "nativeLanguage": "tr",
    "packageName": "com.mycompany.myapp",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": null,
    "serverSideOptions": [
      "websocket:spring-websocket"
    ],
    "serviceDiscoveryType": false,
    "syncUserWithIdp": null,
    "testFrameworks": [
      "cypress"
    ],
    "websocket": "spring-websocket",
    "withAdminUi": true
  }
}
Environment and Tools

openjdk version "17.0.4.1" 2022-08-12
OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1)
OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)

git version 2.43.0.windows.1

node: v18.20.4
npm: 10.7.0

Docker version 27.2.0, build 3ab4256

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/

Thanks for using JHipster!

Copy link
Contributor

github-actions bot commented Sep 5, 2024

JHipster has completed the sample check
.yo-rc.json: valid
Entities JDL: blank
Application:
Frontend check: skipped
Backend check: skipped
E2E check: skipped

This check uses jhipster info output from the issue description to generate the sample.
Bug report that does not contain this information will be marked as invalid.

@qmonmert
Copy link
Contributor

qmonmert commented Sep 5, 2024

@DanielFran @mshima I confirm the bug, I do a PR

@qmonmert qmonmert mentioned this issue Sep 5, 2024
6 tasks
@DanielFran DanielFran added $100 https://www.jhipster.tech/bug-bounties/ $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ labels Sep 5, 2024
@mraible mraible added this to the 8.7.1 milestone Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: bug 🐛 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
5 participants