Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gui error report] TypeError: Use delete() to clear values #2336

Closed
Eninspace opened this issue Nov 15, 2022 · 3 comments · Fixed by #2547
Closed

[gui error report] TypeError: Use delete() to clear values #2336

Eninspace opened this issue Nov 15, 2022 · 3 comments · Fixed by #2547
Assignees
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP status/ready Ready to be worked

Comments

@Eninspace
Copy link

Steps to reproduce:

  • Change app language

Specifications

  • OS: win32 10.0.22000
  • IPFS Desktop Version: 0.24.1
  • Electron Version: 19.0.9
  • Chrome Version: 102.0.5005.167

Error

TypeError: Use `delete()` to clear values
    at ElectronStore.set (C:\Users\****\AppData\Local\Programs\IPFS Desktop\resources\app.asar\node_modules\conf\dist\source\index.js:165:19)
    at IpcMainImpl.<anonymous> (C:\Users\****\AppData\Local\Programs\IPFS Desktop\resources\app.asar\src\i18n.js:31:11)
    at IpcMainImpl.emit (node:events:538:35)
    at IpcMainImpl.<anonymous> (C:\Users\****\AppData\Local\Programs\IPFS Desktop\resources\app.asar\src\i18n.js:34:13)
@Eninspace Eninspace added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Nov 15, 2022
@whizzzkid whizzzkid added exp/intermediate Prior experience is likely helpful P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked and removed need/triage Needs initial labeling and prioritization labels Nov 20, 2022
@whizzzkid
Copy link
Contributor

Thanks for submitting this issue @Eninspace, confirmed this is a bug.

CC: @SgtPooki

@ipfs ipfs deleted a comment from welcome bot Dec 7, 2022
@SgtPooki SgtPooki added P0 Critical: Tackled by core team ASAP and removed P1 High: Likely tackled by core team if no one steps up labels Dec 7, 2022
@SgtPooki SgtPooki self-assigned this Feb 21, 2023
@SgtPooki SgtPooki added the effort/hours Estimated to take one or several hours label Feb 21, 2023
@SgtPooki SgtPooki removed their assignment Feb 21, 2023
@SgtPooki SgtPooki self-assigned this Mar 13, 2023
@Amit-Dagar
Copy link

Anyone resolved this yet ??

@SgtPooki
Copy link
Member

SgtPooki commented Jul 6, 2023

Error is coming from https://github.com/sindresorhus/conf/blob/217f062b5e54ce7060ec2335d717f4ae6bf8086d/source/index.ts#L189, which is only used by electron-store in our app.

╰─ ✔ ❯ npm why conf
conf@10.2.0
node_modules/conf
  conf@"^10.2.0" from electron-store@8.1.0
  node_modules/electron-store
    electron-store@"^8.1.0" from the root project

electron-store is only used in the file

const Store = require('electron-store')


store.set(unknownKey, unknownValue) is being called where unknownValue===undefined

I'm looking into this now

╰─ ✔ ❯ rg -F 'store.set' -g '!*.spec.*'
src/move-repository-location.js
80:    store.set('ipfsConfig', config)

src/automatic-gc.js
28:  store.set('ipfsConfig.flags', newFlags)

src/i18n.js
31:    store.set('language', lang)

src/webui/index.js
95:    store.set('window.width', dim[0])
96:    store.set('window.height', dim[1])
122:    store.set(CONFIG_KEY, true)
126:    store.set(CONFIG_KEY, newValue)

src/daemon/index.js
66:      store.set('ipfsConfig', config)

src/common/store.js
29:      store.set('ipfsConfig.flags', defaults.ipfsConfig.flags)
38:      store.set('automaticGC', true)
52:      store.set('ipfsConfig.flags', flags)
58:      store.set('ipfsConfig.flags', flags)
69:      store.set('ipfsConfig.flags', flags)

src/daemon/config.js
237:      store.set(REVISION_KEY, REVISION)
243:  store.set(REVISION_KEY, REVISION)

src/tray.js
375:    store.set(CONFIG_KEYS.MONOCHROME_TRAY_ICON, newValue)

src/custom-ipfs-binary.js
40:    store.set(SETTINGS_KEY, filePaths[0])

src/enable-namesys-pubsub.js
28:  store.set('ipfsConfig.flags', newFlags)

src/utils/create-toggler.js
12:      store.set(settingsOption, newValue)

src/enable-pubsub.js
28:  store.set('ipfsConfig.flags', newFlags)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful kind/bug A bug in existing code (including security flaws) P0 Critical: Tackled by core team ASAP status/ready Ready to be worked
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants