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

ubunto18.04 快捷方式,有错误但不影响使用 #290

Open
kunl opened this issue Apr 28, 2018 · 3 comments
Open

ubunto18.04 快捷方式,有错误但不影响使用 #290

kunl opened this issue Apr 28, 2018 · 3 comments

Comments

@kunl
Copy link

kunl commented Apr 28, 2018

System (Mac, Windows 7/8/10, Linux) / 操作系统

ubunto18.04

SwitchHosts! Version / SwitchHosts! 版本

SwitchHosts-linux-x64_v3.3.11.5347

Description / 描述

SwitchHosts! HTTP server listening on port 50761!
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at io.pReadFile.then.cnt (/home/user/work/SwitchHosts-linux-x64/resources/app.asar/server/actions/getPref.js:18:21)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:607:11)
at startup (bootstrap_node.js:167:16)
at bootstrap_node.js:589:3
getSysHosts: /etc/hosts
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at io.pReadFile.then.cnt (/home/user/work/SwitchHosts-linux-x64/resources/app.asar/server/actions/getPref.js:18:21)
at
stat: launch

How to reproduce / 重现步骤

1 添加快捷方式

[Desktop Entry]
Version=1.0
Type=Application
Name=SwitchHost
Icon=/home/user/work/SwitchHosts-linux-x64/logo.png
Exec="/home/user/work/SwitchHosts-linux-x64/SwitchHosts!"
Comment=switch host
Categories=Development;
Terminal=true
Name[zh_CN]=switch-host
StartupWMClass=SwitchHost;

2 启动,弹出应用窗口和 terminal 提示 上面的错误

@asuran18
Copy link

asuran18 commented May 14, 2018

我这边启动直接报错,应用窗口闪退,不知道你是否遇到过这个问题

SwitchHosts! HTTP server listening on port 50761!
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at io.pReadFile.then.cnt (/opt/SwitchHosts/resources/app.asar/server/actions/getPref.js:18:21)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Object.<anonymous> (/opt/SwitchHosts/resources/app.asar/main.js:104:7)
    at Object.<anonymous> (/opt/SwitchHosts/resources/app.asar/main.js:162:3)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)

@kunl
Copy link
Author

kunl commented May 14, 2018

@asuran18 闪退倒是没有,Terminal=true 我这个参数忘记改了,改成 false 就没有弹出了。但是加上的 icon 没有显示出来

@asuran18
Copy link

我没有使用快捷方式,直接双击包内启动程序启动,根本出不来窗口,之前出来过

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