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

TypeError: Cannot read property 'includes' of undefined #110

Closed
pioneer opened this issue Sep 24, 2019 · 1 comment
Closed

TypeError: Cannot read property 'includes' of undefined #110

pioneer opened this issue Sep 24, 2019 · 1 comment

Comments

@pioneer
Copy link

pioneer commented Sep 24, 2019

πŸ€·πŸ½β€β™‚οΈ Current Behaviour

The error below happens when I try to run PB for Desktop.

[pioneer@hydrargyrum-vm-manjaro PB for Desktop]$ ./pb-for-desktop
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: Cannot read property 'includes' of undefined
    at Object.<anonymous> (/opt/PB for Desktop/resources/app.asar/app/scripts/main/components/application.js:84:35)
    at Module._compile (internal/modules/cjs/loader.js:786:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Object.<anonymous> (/opt/PB for Desktop/resources/electron.asar/browser/init.js:181:12)
    at Module._compile (internal/modules/cjs/loader.js:786:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)

🎯 Expected Behaviour

The app should run without an error.

πŸ‘Ÿ Steps to Reproduce (S2R)

  1. Install the app
  2. Run it in the console

🏑 Environmental Context

App Version
v9.5.0
Installation Type
An install from a fixed PKGBUILD, as the one in AUR is outdated.
Operating System
Manjaro Cinnamon

Suggested solution

As a quick workaround, setting the XDG_DATA_DIRS=/usr/local/share/:/usr/share/ to the default value suggested here works for me. I'd suggest adding a check for undefined for the XDG_DATA_DIRSvariable (and maybe some other variables too), in the application.js file, line 85 which raises the exception.

@sidneys
Copy link
Owner

sidneys commented Nov 14, 2019

@pioneer Thanks for the report. Please re-test whether this issue still occurs in the new version (10.0.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants