full URLs don't work #4

Closed
opened 2025-05-09 12:13:19 +00:00 by zramsay · 2 comments
Member

https://explorer.laconic.com is deployed as a webapp. when clicking around, the user arrives at correct pages with correct URLs, but on refresh, or if going to a unique URL other than the root URL, the page is blank

https://explorer.laconic.com is deployed as a webapp. when clicking around, the user arrives at correct pages with correct URLs, but on refresh, or if going to a unique URL other than the root URL, the page is blank
ashwin was assigned by zramsay 2025-05-12 14:13:41 +00:00
Member

Hi @zramsay

It appears that as per the app serving script, the explorer app is not being served as a "single page app", resulting in the --proxy flag not getting passed.
I have confirmed the same from the container logs:

$ kubectl exec -it laconic-c24e2c41ef8873fe-deployment-bb9d47fbc-zcst5 -- bash
root@laconic-c24e2c41ef8873fe-deployment-bb9d47fbc-zcst5:/# ls /data/
assets    favicon.ico  index.html  loader.css  logo.svg  test.html

$ kubectl logs -f laconic-c24e2c41ef8873fe-deployment-bb9d47fbc-zcst5 | head -n 100
Serving content normally.  If this is a single-page app, set 'CERC_SINGLE_PAGE_APP=true'
Starting up http-server, serving /data

http-server version: 14.1.1

http-server settings: 
...

To fix this, the explorer can be redeployed with the flag CERC_SINGLE_PAGE_APP=true; I have tested this with a test deployment at https://deploy-frontend-554df9d2ba.apps.vaasl.io
I used the same application record that https://explorer.laconic.com was deployed with, here's the deployment request for reference:

record:
  type: ApplicationDeploymentRequest
  version: '1.0.0'
  name: explorer-test@0.0.1
  application: lrn://vaasl/applications/deploy-frontend@0.0.2
  deployer: lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io
  config:
    env:
      LACONIC_HOSTED_CONFIG_laconicd_chain_id: laconic-testnet-2
      CERC_SINGLE_PAGE_APP: true
  meta:
    note: Added @ Thursday 29 May 2025 01:35:30 PM UTC
    repository: "https://github.com/zramsay/cosmos-explorer"
    repository_ref: "6dc9116ee6378788f0fb01178dd953e47c359ba0"
  payment: EC338DDCBA12851823A44DCD148388FC4B4D246881E0CBBCD14D3D355BCD291D

Record id: bafyreihpktbpkei5o5iexgfvldt3lppl6gtxxbbmvrhgbjpmxfl7g3lbtm

I will remove the test deployment once explorer deployment is fixed.

Hi @zramsay It appears that as per the [app serving script](https://git.vdb.to/cerc-io/stack-orchestrator/src/branch/main/stack_orchestrator/data/container-build/cerc-webapp-base/scripts/start-serving-app.sh), the explorer app is not being served as a "single page app", resulting in the `--proxy` [flag](https://git.vdb.to/cerc-io/stack-orchestrator/src/branch/main/stack_orchestrator/data/container-build/cerc-webapp-base/scripts/start-serving-app.sh#L29) not getting passed. I have confirmed the same from the container logs: ```bash $ kubectl exec -it laconic-c24e2c41ef8873fe-deployment-bb9d47fbc-zcst5 -- bash root@laconic-c24e2c41ef8873fe-deployment-bb9d47fbc-zcst5:/# ls /data/ assets favicon.ico index.html loader.css logo.svg test.html $ kubectl logs -f laconic-c24e2c41ef8873fe-deployment-bb9d47fbc-zcst5 | head -n 100 Serving content normally. If this is a single-page app, set 'CERC_SINGLE_PAGE_APP=true' Starting up http-server, serving /data http-server version: 14.1.1 http-server settings: ... ``` To fix this, the explorer can be redeployed with the flag `CERC_SINGLE_PAGE_APP=true`; I have tested this with a test deployment at https://deploy-frontend-554df9d2ba.apps.vaasl.io I used the same application record that https://explorer.laconic.com was deployed with, here's the deployment request for reference: ```yaml record: type: ApplicationDeploymentRequest version: '1.0.0' name: explorer-test@0.0.1 application: lrn://vaasl/applications/deploy-frontend@0.0.2 deployer: lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io config: env: LACONIC_HOSTED_CONFIG_laconicd_chain_id: laconic-testnet-2 CERC_SINGLE_PAGE_APP: true meta: note: Added @ Thursday 29 May 2025 01:35:30 PM UTC repository: "https://github.com/zramsay/cosmos-explorer" repository_ref: "6dc9116ee6378788f0fb01178dd953e47c359ba0" payment: EC338DDCBA12851823A44DCD148388FC4B4D246881E0CBBCD14D3D355BCD291D ``` Record id: `bafyreihpktbpkei5o5iexgfvldt3lppl6gtxxbbmvrhgbjpmxfl7g3lbtm` I will remove the test deployment once explorer deployment is fixed.
Author
Member

redeployed with the fix, it works, thank you!

redeployed with the fix, it works, thank you!
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/cosmos-explorer#4
No description provided.