vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
924 stars 57 forks source link

Servlet in Production mode shows error dialog #343

Open denis-anisimov opened 4 years ago

denis-anisimov commented 4 years ago

See ClientSideExceptionHandlingIT::productionModeExceptions .

In CCDM branch there is no anymore compatibility mode. The test fails in NPM mode. The view is opened using URI mapping view-production (which is handled by the ProductionModeViewTestServlet working in production mode). In production mode the client side exception should not be shown (even though the client side is not built for production).

The test is disabled via @Ignore in CCDM branch. It should be enabled back once the ticket is fixed.

denis-anisimov commented 4 years ago

One more test: DependencyIT::loadingUnavailableResourcesProduction. Ignored in CCDM branch.

denis-anisimov commented 4 years ago

The problem is in DeploymentConfigurationFactory::readBuildInfo code which reads the token file (if it exists). The productionMode init parameter is correctly set to true based on the servlet configuration but then it's reset to false because its value read from the token file.

denis-anisimov commented 4 years ago

More tests that rely on production mode config: ExportedJSFunctionIT::profilingInfoNotAvailableInProduction ExportedJSFunctionIT::productionModeTrueInProductionMode ExportedJSFunctionIT::versionInfoNotAvailableInProductionMode InfoIT::productionModeServlet RouteNotFoundProdModeIT