[BUG] Relay TypeError: Cannot read properties of undefined (reading '56') in nanoid lib
Author: duylddevCreated Jan 18, 2026Updated Jan 18, 2026
Labelsbug
What happened?
in MAIN world:
sendToBackgroundViaRelay<undefined, { message: string }>({ name: "ping" })
.then((rs) => {
console.log( Ping sent to background successfully", rs)
})
.catch((err) => {
console.error(" Ping sent to background failed", err)
})in relay.ts
relayMessage({
name: "ping"
})error log
Ping sent to background failed TypeError: Cannot read properties of undefined (reading '56')
at nanoid (index.browser.js:28:10)
at index.js:1:967
at new Promise (<anonymous>)
at y (index.js:1:922)
at 1QIWJ.@parcel/transformer-js/src/esmodule-helpers.js (interceptor.ts:13:66)
at newRequire (interceptor.c6e920dd.js:72:24)
at interceptor.c6e920dd.js:123:5
at runtime-64301f64d4baff50.js:1:1
at index.browser.js:29:1packages.json `` "dependencies": { "@plasmohq/messaging": "^0.7.2", "axios": "^1.13.2", "plasmo": "0.90.5", "react": "18.2.0", "react-dom": "18.2.0" },
### Version
Latest
### What OS are you seeing the problem on?
Linux
### What browsers are you seeing the problem on?
Chrome
### Relevant log output
```Shell
Ping sent to background failed TypeError: Cannot read properties of undefined (reading '56')
at nanoid (index.browser.js:28:10)
at index.js:1:967
at new Promise (<anonymous>)
at y (index.js:1:922)
at 1QIWJ.@parcel/transformer-js/src/esmodule-helpers.js (interceptor.ts:13:66)
at newRequire (interceptor.c6e920dd.js:72:24)
at interceptor.c6e920dd.js:123:5
at runtime-64301f64d4baff50.js:1:1
at index.browser.js:29:1(OPTIONAL) Contribution
- I would like to fix this BUG via a PR
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate problems.
Source: PlasmoHQ/plasmo