BHSPitMonkey / hipchat-electron

A desktop HipChat client based on the official web client using Electron
6 stars 3 forks source link

Error When Opening Links #3

Closed ryan-clancy closed 8 years ago

ryan-clancy commented 8 years ago

Thanks for creating this, it's a nice alternative to the (crappy) official Linux client.

When using "npm run pack" or "npm run dist", the following error occurs when trying to open links:

Uncaught Exception:
Error: ENOENT, node_modules/open/vendor/xdg-open "https:/www.google.ca/" not found in /home/r.clancy/store/github/hipchat-electron/dist/HipChat Electron-linux-x64/resources/app.asar
    at notFoundError (ELECTRON_ASAR.js:109:13)
    at Object.module.(anonymous function) [as execFile] (ELECTRON_ASAR.js:166:9)
    at exports.exec (child_process.js:111:18)
    at open (/home/r.clancy/store/github/hipchat-electron/dist/HipChat Electron-linux-x64/resources/app.asar/node_modules/open/lib/open.js:58:10)
    at EventEmitter.<anonymous> (/home/r.clancy/store/github/hipchat-electron/dist/HipChat Electron-linux-x64/resources/app.asar/main.js:305:7)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at EventEmitter.<anonymous> (/home/r.clancy/store/github/hipchat-electron/dist/HipChat Electron-linux-x64/resources/electron.asar/browser/guest-window-manager.js:91:16)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)

I see the note about no proper packages yet, just making note of this issue - all the other basic functionality I've tried when doing the packaging seems to work.

BHSPitMonkey commented 8 years ago

Hi,

Few things:

ryan-clancy commented 8 years ago

xdg-open works fine in the terminal, and trailing slashes on URLs are valid as well (test using xdg-open or any web browser).

I haven't tested the deb package that you've provided, for now I'm just running it in a screen with "npm start".

BHSPitMonkey commented 8 years ago

I meant the slash after the protocol: "https:/" vs. "https://". Not sure if that's a formatting bug or if that's actually the URL passed to xdg-open. For what it's worth, I haven't had any problems with links in hipchat conversations (using either launch method), so I might not have a solution for you until I can reproduce.

On Sat, May 21, 2016, 11:37 Ryan Clancy notifications@github.com wrote:

xdg-open works fine in the terminal, and trailing slashes on URLs are valid as well (test using xdg-open or any web browser).

I haven't tested the deb package that you've provided, for now I'm just running it in a screen with "npm start".

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/BHSPitMonkey/hipchat-electron/issues/3#issuecomment-220793645

ryan-clancy commented 8 years ago

Ahh, I see - that must just be a formatting bug, it shows up fine in HipChat (although xdg-open still seems to handle the single slash).

I'll close this issue as it can't seem to be reproduced and appears to be local to my environment.

BHSPitMonkey commented 8 years ago

I'm seeing this myself now; It seems to be an issue with the packaged version. I was testing before using the source / npm start. Will investigate.

ryan-clancy commented 8 years ago

The error appears to be gone, but now when I click a link nothing happens. Are you seeing this behavior as well?

BHSPitMonkey commented 8 years ago

@r-clancy - I finally got it figured out. In addition to necessitating the previous change, the open module also has a bug that causes it not to work when there are spaces in the install path (and this package currently installs to /opt/HipChat Electron/). I've just published a 1.0.1 release with updated packages. Thanks for the report and info!