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

Failed to activate the spell-check package - Cannot read property 'toLowerCase' of undefined #1222

Open
5 tasks done
scusi opened this issue Feb 17, 2025 · 1 comment
Open
5 tasks done
Labels
bug Something isn't working

Comments

@scusi
Copy link

scusi commented Feb 17, 2025

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

Description

When i have a file open and switch on spellcheck pulsar fails to activate the spell-check package.

Steps to Reproduce

  1. Open an existing markdown file
  2. Packages -> Spellcheck -> Toggle

Expected behavior:

Turn on spell-check and underline wrong words.

Actual behavior:

An Error tells me that the spell-check package could not be activated.

Versions

Pulsar: 1.125.0 x64
Electron: 12.2.3
OS: Ubuntu 24.04.2
Thrown From: spell-check package 0.77.1

Stack Trace

Failed to activate the spell-check package

At Cannot read property 'toLowerCase' of undefined

TypeError: Cannot read property 'toLowerCase' of undefined
    at Object.exports.getPath (/app.asar/node_modules/atom-pathspec/index.js:30:33)
    at LocaleChecker.deferredInit (/app.asar/node_modules/spell-check/lib/locale-checker.js:108:39)
    at LocaleChecker.check (/app.asar/node_modules/spell-check/lib/locale-checker.js:70:14)
    at SpellCheckerManager.check (/app.asar/node_modules/spell-check/lib/spell-check-manager.js:148:51)
    at Function.startNextJob (/app.asar/node_modules/spell-check/lib/spell-check-task.js:107:18)
    at SpellCheckTask.start (/app.asar/node_modules/spell-check/lib/spell-check-task.js:62:41)
    at SpellCheckView.updateMisspellings (/app.asar/node_modules/spell-check/lib/spell-check-view.js:252:33)
    at SpellCheckView.subscribeToBuffer (/app.asar/node_modules/spell-check/lib/spell-check-view.js:150:25)
    at /app.asar/node_modules/spell-check/lib/spell-check-view.js:97:14)
    at /app.asar/node_modules/spell-check/lib/main.js:139:40
    at Workspace.observeTextEditors (/app.asar/src/workspace.js:778:7)
    at Object.activate (/app.asar/node_modules/spell-check/lib/main.js:114:28)
    at Package.activateNow (/app.asar/src/package.js:242:27)
    at /app.asar/src/package.js:211:27
    at Package.measure (/app.asar/src/package.js:82:19)
    at /app.asar/src/package.js:205:14
    at new Promise (<anonymous>)
    at Package.activate (/app.asar/src/package.js:203:32)
    at PackageManager.activatePackage (/app.asar/src/package-manager.js:780:36)
    at /app.asar/src/package-manager.js:755:30
    at Config.transactAsync (/app.asar/src/config.js:925:22)
    at PackageManager.activatePackages (/app.asar/src/package-manager.js:753:17)
    at PackageManager.activate (/app.asar/src/package-manager.js:730:44)
    at /app.asar/src/atom-environment.js:1045:21
    at async Promise.all (index 0)
    at AtomEnvironment.startEditorWindow (/app.asar/src/atom-environment.js:1073:20)

Pulsar version

1.125.0 x64

Which OS does this happen on?

🐧 Debian based (Linux Mint, Ubuntu, etc.)

OS details

Ubuntu 24.04.2

Which CPU architecture are you running this on?

x86_64/AMD64

What steps are needed to reproduce this?

  1. Open an existing markdown file
  2. Packages -> Spellcheck -> Toggle

Additional Information:

No additional informatio. It can be reproduced in safe mode in a fresh install

@scusi scusi added the bug Something isn't working label Feb 17, 2025
@savetheclocktower
Copy link
Contributor

It seems as though an empty value has made its way into your config value for spell-check.localePaths. Can you open your config.cson and see?

If the value of spell-check.localePaths looks strange at all, delete it. It defaults to an empty array (which should not trigger this bug) but should only ever be an array of zero or more strings. I can't imagine how something invalid could've gotten in there (like null or undefined), but as far as I can tell, it's the only way to produce these symptoms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants