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 menu font color unreadable and folder not loading due to different Node.js version (pathwatcher) #1912

Closed
codiflow opened this issue Oct 29, 2018 · 11 comments

Comments

@codiflow
Copy link

codiflow commented Oct 29, 2018

Architecture: x64
OS: Manjaro Linux 18.0.0 (Illyria) XFCE
Typora: 0.9.60(beta)
Electron: 2.0.12-1

I updated typora to the newest version unfortunately after this process the typora GUI stopped working flawlessly. The GUI looks like this afterwards.

image

The menu is still there, but the colors are very dark. Deleting the config-files folder doesn't help with this issue. Probably this comes from theming engine - i don't know. But before the update of typora everything was fine.

The dev-tools show this error:

/usr/lib/electron/resources/electron.asar/renderer/security-warnings.js:188
Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security Policy set or a policy with "unsafe-eval" enabled. This exposes users of this app to unnecessary security risks.

For more information and help, consult https://electronjs.org/docs/tutorial/security.
This warning will not show up once the app is packaged.

After clicking on "File" => "Open Folder" and selecting a folder, the dev tools show the following error message which I think is the main problem:

Uncaught Error: The module '/usr/share/typora/node_modules/pathwatcher/build/Release/pathwatcher.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20)
    at Object.Module._extensions..node (module.js:671:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:166:20)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (module.js:586:17)
    at Module.require (file:///usr/share/typora//window.html:234:25)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/share/typora/node_modules.asar/pathwatcher/lib/main.js:4:13)
    at Object.<anonymous> (/usr/share/typora/node_modules.asar/pathwatcher/lib/main.js:266:4)
    at Object.<anonymous> (/usr/share/typora/node_modules.asar/pathwatcher/lib/main.js:268:3)
    at Module._compile (module.js:642:30)
    at Object.Module._extensions..js (module.js:653:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (module.js:586:17)
    at Module.require (file:///usr/share/typora//window.html:234:25)
    at require (internal/module.js:11:18)
    at n.end (file:///usr/share/typora//app/window/frame.js:1:349308)
    at n.onRootChanged (file:///usr/share/typora//app/window/frame.js:1:349905)
    at n.setMountFolder (file:///usr/share/typora//app/window/frame.js:1:350287)
    at <anonymous>:2:60
    at EventEmitter.electron.ipcRenderer.on (/usr/lib/electron/resources/electron.asar/renderer/web-frame-init.js:36:30)
    at emitMany (events.js:147:13)
    at EventEmitter.emit (events.js:224:7)

I already tried to fix the problem with npm rebuild, tried to reinstall electron and riot-desktop (which uses the electron package as well) but nothing helped. It also makes no difference if I install the version from the AUR (aur/typora 0.9.60-1 (47, 3.498238)) or use the package from typora.io (https://typora.io/linux/Typora-linux-x64.tar.gz). Both show the same issue - also after deleting the config files folder with my settings.

Maybe you have an idea what could be the reason for this?

EDIT: After installing the old version 0.9.53(beta) from my local package cache everything works fine again.

@abnerlee
Copy link
Contributor

How you updated typora to the newest version? The version 0.9.60 is bundled with Electron 3.0.x not 2.x

@codiflow
Copy link
Author

pacman -Syu was the command I used.

But the manual upgrade process like removing the folder with the files and extracting the tar.gz file from typora.io also doesn't help (which has nothing to do with my installation from the AUR). And with this method nothing gets installed or "reconfigured" on my system because everything should already be included in the tar.gz. Am I right?

@codiflow
Copy link
Author

How you updated typora to the newest version? The version 0.9.60 is bundled with Electron 3.0.x not 2.x

Maybe the error happens because I have installed riot-desktop which relies on Electron as well? The newest version of Electron I can install with my package manager is the already installed version 2.0.12-1.

abnerlee added a commit to typora/support.typora.io that referenced this issue Oct 29, 2018
@abnerlee
Copy link
Contributor

abnerlee commented Oct 29, 2018

I tried download double click Typora from https://typora.io/linux/Typora-linux-x64.tar.gz, its electron version is 3.0.5.

You could also use this binary directly. And please kill all Typora process first, or else still the old now will be launched.

Also, from your log, the system electron "/usr/lib/electron/" is used, instead of the bundled one, I can find the script to do so from https://aur.archlinux.org/packages/typora/, the AUR is unofficial, so this issue is also caused by #1457

@ntsim
Copy link

ntsim commented Oct 29, 2018

I am also seeing this unreadable GUI menu in the latest Typora (0.9.60 with Electron 3.0.5) on Ubuntu 18.04. This was a fresh install as well.

@codiflow
Copy link
Author

I tried download double click Typora from https://typora.io/linux/Typora-linux-x64.tar.gz, its electron version is 3.0.5.

You could also use this binary directly. And please kill all Typora process first, or else still the old now will be launched.

Also, from your log, the system electron "/usr/lib/electron/" is used, instead of the bundled one, I can find the script to do so from https://aur.archlinux.org/packages/typora/, the AUR is unofficial, so this issue is also caused by #1457

As I already stated above I did this as well and it didn't work either.

@abnerlee
Copy link
Contributor

@codiflow what's the error log when launch Typora from the *.tar,gz?

@ntsim could you open DevTools from View -> Toggle DevTools and provide the error log, or get error log following https://support.typora.io/Report-Bugs/#logs

@ntsim
Copy link

ntsim commented Oct 30, 2018

@abnerlee here are the logs for today (the issue still persists):

DEBUG 30/10/2018, 23:36:37  initSentry
INFO 30/10/2018, 23:36:37  luanchFromDiffVersion, pre version is 0.9.58
INFO 30/10/2018, 23:36:37  overwriteThemeFolder
(electron) The 'lstatSyncNoException' function has been deprecated and marked for removal.
DEBUG 30/10/2018, 23:36:37  initCountly
INFO 30/10/2018, 23:36:37  ------------------start------------------
INFO 30/10/2018, 23:36:37  typora version: 0.9.60
DEBUG 30/10/2018, 23:36:37  [ '/usr/share/typora/Typora' ]
DEBUG 30/10/2018, 23:36:37  /usr/share/typora/resources/app/locales/Base.lproj/Menu.json
ERROR 30/10/2018, 23:36:37  (node:24556) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
DEBUG 30/10/2018, 23:36:37  app.openFile
DEBUG 30/10/2018, 23:36:37  [ 'github.css',
  'newsprint.css',
  'night.css',
  'pixyll.css',
  'whitey.css' ]
INFO 30/10/2018, 23:36:58  ------------------quit------------------
(electron) The 'lstatSyncNoException' function has been deprecated and marked for removal.
(electron) The 'lstatSyncNoException' function has been deprecated and marked for removal.
(electron) 'app.makeSingleInstance(cb)' is deprecated. Use 'app.requestSingleInstanceLock() and app.on('second-instance', cb)' instead.
DEBUG 30/10/2018, 23:37:00  initSentry
(electron) The 'lstatSyncNoException' function has been deprecated and marked for removal.
DEBUG 30/10/2018, 23:37:00  initCountly
INFO 30/10/2018, 23:37:00  ------------------start------------------
INFO 30/10/2018, 23:37:00  typora version: 0.9.60
DEBUG 30/10/2018, 23:37:00  [ '/usr/share/typora/Typora' ]
DEBUG 30/10/2018, 23:37:00  /usr/share/typora/resources/app/locales/Base.lproj/Menu.json
ERROR 30/10/2018, 23:37:00  (node:24671) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
DEBUG 30/10/2018, 23:37:00  [ 'github.css',
  'newsprint.css',
  'night.css',
  'pixyll.css',
  'whitey.css' ]
DEBUG 30/10/2018, 23:37:00  app.openFile

Doesn't look like anything particularly unusual?

@abnerlee
Copy link
Contributor

abnerlee commented Nov 2, 2018

I see, menu bug is #1923

@irgendwr
Copy link

irgendwr commented Nov 3, 2018

@codiflow The AUR package was updated and now uses the bundled electron which solves the folder-bug.

@codiflow
Copy link
Author

codiflow commented Nov 5, 2018

@irgendwr Thanks, I will give it a try these days.

@joshcangit joshcangit mentioned this issue Dec 31, 2018
2 tasks
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

4 participants