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

Cryptic error when XUL path is wrong #154

Open
1j01 opened this issue Apr 25, 2018 · 2 comments
Open

Cryptic error when XUL path is wrong #154

1j01 opened this issue Apr 25, 2018 · 2 comments

Comments

@1j01
Copy link

1j01 commented Apr 25, 2018

Instead of something like file not found: C:/Users/Isaiah/Projects/98.js-vr/shell.xul, I got:

JavaScript error: jar:file:///C:/Users/Isaiah/Projects/98.js-vr/node_modules/qbrt/dist/win32/runtime/omni.ja!/components/nsPrompter.js, line 340: NS_ERROR_NOT_AVAILABLE: Cannot call openModalWindow on a hidden window

(after copying the shell example code over but with a different name for the xul file)

I fixed it pretty quickly, but not from any information in that error message!

@1j01
Copy link
Author

1j01 commented Apr 25, 2018

Oh, looks like there's already a lil todo for it in the example code:

qbrt/shell/main.js

Lines 40 to 41 in 76a2960

// TODO: report error if URL isn't found.
Services.ww.openWindow(null, SHELL_URL, '_blank', WINDOW_FEATURES, argument);

@mykmelez
Copy link
Contributor

mykmelez commented May 1, 2018

Indeed, this is a terrible error message, very unclear. Unfortunately, Services.ww.openWindow() doesn't throw when the URL isn't found, which makes this complicated to fix. We might try parsing the URL first to confirm that it corresponds to a known location on the local filesystem (or is a remote URL) before calling Services.ww.openWindow().

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