2

JHipster throws the following error message at me when tried to open the application in internet explorer. But works fine in the Chrome browser.

My jhipster has spring boot with react and is connected to IBM db2 database.

Tried opening the application after running the command 'mvnw' and also tried with 'npm start'. Both the commands give the same result.


An error has occurred :-(

Usual error causes 1.You started the application from an IDE and you didn't run npm start or npm run webpack:build. 2.You had a network error while running npm install. If you are behind a corporate proxy, it is likely that this error was caused by your proxy. Have a look at the JHipster error logs, you will probably have the cause of the error. 3.You installed a Node.js version that doesn't work with JHipster: please use an LTS (long-term support) version, as it's the only version we support.

Building the client side code again

If you want to go fast, run ./mvnw to build and run everything.

If you want to have more control, so you can debug your issue more easily, you should follow the following steps: 1.Install npm dependencies with the command npm install 2.Build the client with the command npm run webpack:build or npm start 3.Start the server with ./mvnw or using your IDE

Getting more help

If you have a question on how to use JHipster

Go to Stack Overflow with the "jhipster" tag.

If you have a bug or a feature request

First read our contributing guidelines.

Then, fill a ticket on our bug tracker, we'll be happy to resolve your issue!

If you want to chat with contributors and other users

Join our chat room on Gitter.im. Please note that this is a public chat room, and that we expect you to respect other people and write in a correct English language!

Anuj kumar R
  • 41
  • 1
  • 4

6 Answers6

2

Finally, after some research and help from others, I figured out we need to add the polyfills to the jhipster project, Usually in the head tag of index.html file. I tried downloading the polyfills.js and loading into my application via a script tag, but nothing seems to work, What I did instead was used the cdn from cloudflare and inserted in index.html, Which started to work like a charm.

<script src="https://cdnjs.cloudflare.com/ajax/libs/js-polyfills/0.1.42/polyfill.js"></script>

Note: An important thing which I learned over my experience is, It makes necessary to include these polyfills to the react project if it has to work in Internet Explorer.

Anuj kumar R
  • 41
  • 1
  • 4
1

Check out this issue - https://github.com/jhipster/generator-jhipster/issues/8250 Looks like IE is not supported at all

vteraz
  • 181
  • 1
  • 4
0

Suggestion from https://github.com/jhipster/generator-jhipster/issues/11566

A quick dirty workaround, set all compile option to es5 :

tsjconfig.json "target": "es5" "lib": ["es5", "dom"],

webpack.common.js mainFields: [ 'es5', 'browser', 'module', 'main'],

0

Fixed! Google is doing a great job in discovering new websites and content, but sometimes we need to force Google to crawl(reindex) our website, either all of it or individual pages. So the reason we see "An error has occurred" - it's because at the first time Google saw our site (index.html file) it indexed without additional tags.

Step 1: Add additional meta tag in head part your index.html page:

<meta name="Description" content="your-description-here">

Step 2: Use Google Search Console for reindex your site. https://search.google.com/search-console/welcome

P.S. Ask question to google: "How do I get Google to recrawl my website?". It will help you to better understand Google Search Console and why you need to use it for fixing your error.

Oleh Tatsiun
  • 749
  • 6
  • 7
0

After a little research, I found we have to run the UI app also in another window using npm start, which solved the problem for me.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
Guest
  • 61
  • 1
  • 1
0

I had the similar challenge recently and the application was not working on Google Chrome only. It was solved by adding the lines highlighted in blue below to the application yaml in spring-boot: In My case i added following lines highlighted in blue

Also not that the content-security-policy needs to be understood properly before altering these changes because of injection. Reference materials: https://www.baeldung.com/spring-security-csp and https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/worker-src

joseph
  • 101
  • 2
  • 13
  • 1
    You should report it on github with more context. – Gaël Marziou Jan 03 '23 at 10:51
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 03 '23 at 13:33