Hi,
I created a polymer UI in cuba studio. I didn’t change any code of it. I got a problem which says can’t find the web page http://localhost:8080/app-front/ when I tried to open polyerclient from chrome in windows. The web client works well but polymer client doesn’t work.
I want to add that I also present the same inconvenience, I’m using CUBA Studio 6.10 Standalone Edition for Linux. I thought it would be something badly generated but erase everything and create a project from scratch and give the same error.
Regards,
Nelson F.
Hi @nelsonflorez @thomaslei, can you please answer the following questions:
- what template did you use (polymer/polymer-typescript)?
- did you notice any errors in build log?
If possible please attach an archive of the project or just polymer-client
module (without node_modules
and bower_components
directories)
Hi,
Thank you. I found the URL in studio isn’t same as deploy folder. In studio, it’s app-front but it’s MasterT-front in tomcat\webapps folder. I tried to login by http://localhost:8080/MasterT-front. It doesn’t show “can’t find the web page” error but the login page doesn’t show. The page is blank.
As a quick fix please make the following changes in modules/polymer-client
:
-
in
index.html
setapi-url
attribute of-shell
tag to/MasterT/rest/
, e.g.:
<yourapp-shell api-url="/MasterT/rest/"></yourapp-shell>
-
Check
basePath
propery inpolymer.json
. It should be/MasterT-front/
.
The bug is fixed and if you regenerate polymer module it should work out of the box.
It’s strange, did you change build.gradle
manually? Or you changed module prefix
via Studio ?
Hi,
Thank you very much.I tried as suggested.
- api-url is “mastert-shell api-url=”/MasterT/rest/". I don’t think it needs to be changed.
2.I changed polymer.json to “basePath”: “/MasterT-front/”.
It works well now. The login form showed.
I didn’t change anything from my side when polymer GUI was generated. I run npm init and bower init in polymer folder by myself instead of CUBA Studio due to some configuration issue I didn’t know. I think that’s the root cause.
I have done a complete clean of the whole project, generating the front again and it has worked. I’m using polymer2-typescript