evidence: Filters are not working on deployed site
Steps To Reproduce
- Removed .evidence folder
- Removed .build folder
- Ran
npm run sources - Ran
npm run build - cd build
- Host folder using http: http
- Open http://localhost:8000/ in new private windows (Firefox Developer Edition)
Environment
"dependencies": {
"@evidence-dev/bigquery": "^2.0.3",
"@evidence-dev/core-components": "^3.2.0",
"@evidence-dev/csv": "^1.0.4",
"@evidence-dev/databricks": "^1.0.2",
"@evidence-dev/duckdb": "^1.0.4",
"@evidence-dev/evidence": "^26.0.0",
"@evidence-dev/mssql": "^1.0.4",
"@evidence-dev/mysql": "^1.0.2",
"@evidence-dev/postgres": "^1.0.2",
"@evidence-dev/snowflake": "^1.0.2",
"@evidence-dev/sqlite": "^2.0.2",
"@evidence-dev/trino": "^1.0.3",
"mermaid": "^10.7.0"
},
"overrides": {
"jsonwebtoken": "9.0.0",
"trim@<0.0.3": ">0.0.3",
"sqlite3": "5.1.5",
"mysql2": "3.8.0"
}
- Browser: Firefox
Expected Behavior
Actual Behaviour
most things looks and acts normal. But on one page we use dropdowns to filter data. That page stops working (either no change when changing filter or no data at all).
When running npm run dev, directly in same folder this works. I can use the dropdowns and the components referring the data is updated.
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 22 (11 by maintainers)
Appears to have been a
duckdb-based error, as upgrading to duckdb-wasm1.28.0fixes, so reopening pending that version bump.@ItsMeBrianD might have some better ideas here, as he was recently deploying evidence using nginx.
I believe there are certain file types that are not served correctly by nginx by default
Here is a sample that reproduces the behaviour (no update on filter change).
evidence-issue-1566.zip
Preparation
Working Scenario
Start dev server
Open browser http://localhost:3000/
Use the filter
Confirm bar chart updates
Not Working Scenario
Build static page
Start some web server hosting static pages, I am using https://github.com/cortesi/devd
Open browser http://localhost:8000/
Use the filter
Confirm bar chart does not update anymore
Observations
csvand the source name in connection.yaml is calledcsv_datacsv_datadid not helpYYYY-MM-DDformat)Sqlite Documentation is unclear/wrong
This does not seem to be true. I must place the sqlite file under
sources\<mydatasourcename>and also add aconnection.yamlfile similar toThis works to get the data, but generates a warning when I run
npm run sourcesas it tries to process all files in the source folder (including the sqlite file itself) and not only the.sqlfiles