ydb-embedded-ui icon indicating copy to clipboard operation
ydb-embedded-ui copied to clipboard

Failed to decode param '/%REACT_APP_META_BACKEND%/meta/clusters'

Open kungasc opened this issue 1 year ago • 1 comments

I followed README instruction and use

"dev": "DISABLE_ESLINT_PLUGIN=true TSC_COMPILE_ON_ERROR=true REACT_APP_BACKEND=http://<hostname>:8765 npm start"

But got an error

URIError: Failed to decode param '/%REACT_APP_META_BACKEND%/meta/clusters'
    at decodeURIComponent (<anonymous>)
    at decode_param (/home/kungasc/ydb-embedded-ui/node_modules/express/lib/router/layer.js:172:12)
    at Layer.match (/home/kungasc/ydb-embedded-ui/node_modules/express/lib/router/layer.js:123:27)
    at matchLayer (/home/kungasc/ydb-embedded-ui/node_modules/express/lib/router/index.js:585:18)
    at next (/home/kungasc/ydb-embedded-ui/node_modules/express/lib/router/index.js:226:15)
    at expressInit (/home/kungasc/ydb-embedded-ui/node_modules/express/lib/middleware/init.js:40:5)
    at Layer.handle [as handle_request] (/home/kungasc/ydb-embedded-ui/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/kungasc/ydb-embedded-ui/node_modules/express/lib/router/index.js:328:13)
    at /home/kungasc/ydb-embedded-ui/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/home/kungasc/ydb-embedded-ui/node_modules/express/lib/router/index.js:346:12)

Temporary fixed by commenting this line

kungasc avatar Mar 28 '24 14:03 kungasc

It seems REACT_APP_META_BACKEND should be explicitly set as undefined

"dev": "DISABLE_ESLINT_PLUGIN=true TSC_COMPILE_ON_ERROR=true REACT_APP_BACKEND=http://<hostname>:8765 REACT_APP_META_BACKEND=undefined npm start"

I'll fix the README.

BTW, easier way to manipulate env variables is to set .env file with content like below and run npm run start (it will automatically use variables from this file)

DISABLE_ESLINT_PLUGIN=true
TSC_COMPILE_ON_ERROR=true
REACT_APP_BACKEND=http://<hostname>:8765
REACT_APP_META_BACKEND=undefined

artemmufazalov avatar Mar 28 '24 15:03 artemmufazalov