Zwavejs2mqtt: [bug] crash when refreshing /settings and /mesh

Created on 1 Dec 2020  路  2Comments  路  Source: zwave-js/zwavejs2mqtt

Version

Build/Run method

  • [x] Docker
  • [ ] PKG
  • [x] Manually built (git clone - npm install - npm run build )

zwavejs2mqtt version: c762a85 (master)

Describe the bug
When I click on the settings icon, I am sent to /settings. This works. If I then click refresh page, it crashes. The same happens with /mesh.

To Reproduce
Steps to reproduce the behavior:

  1. Click on the settings symbol.
  2. Click refresh page on your browser
  3. See crash error:
Error: Not Found
    at /usr/src/app/app.js:255:15
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)
    at /usr/src/app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
    at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10)
    at /usr/src/app/node_modules/connect-history-api-fallback/lib/index.js:85:5
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)
    at /usr/src/app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
    at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10)
    at cors (/usr/src/app/node_modules/cors/lib/index.js:188:7)
    at /usr/src/app/node_modules/cors/lib/index.js:224:17
    at originCallback (/usr/src/app/node_modules/cors/lib/index.js:214:15)
    at /usr/src/app/node_modules/cors/lib/index.js:219:13

Expected behavior
The same page should load correctly.

bug

Most helpful comment

@larstobi FIxed! This has been broken some months ago in z2m by a user PR, strange no one has never reported it before now

All 2 comments

@larstobi That should be handled by connect-history-api-fallback, let me investigate what's happening

@larstobi FIxed! This has been broken some months ago in z2m by a user PR, strange no one has never reported it before now

Was this page helpful?
0 / 5 - 0 ratings