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 zramsay2025-05-12 14:13:41 +00:00
It appears that as per the app serving script, the explorer app is not being served as a "single page app", resulting in the --proxyflag 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:ApplicationDeploymentRequestversion:'1.0.0'name:explorer-test@0.0.1application:lrn://vaasl/applications/deploy-frontend@0.0.2deployer:lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.ioconfig:env:LACONIC_HOSTED_CONFIG_laconicd_chain_id:laconic-testnet-2CERC_SINGLE_PAGE_APP:truemeta:note:Added @ Thursday 29 May 2025 01:35:30 PM UTCrepository:"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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
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
--proxyflag not getting passed.I have confirmed the same from the container logs:
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.ioI used the same application record that https://explorer.laconic.com was deployed with, here's the deployment request for reference:
Record id:
bafyreihpktbpkei5o5iexgfvldt3lppl6gtxxbbmvrhgbjpmxfl7g3lbtmI will remove the test deployment once explorer deployment is fixed.
redeployed with the fix, it works, thank you!