unable to make a request() call in OSX

3 views
Skip to first unread message

kti...@gmail.com

unread,
Aug 10, 2012, 11:46:26 PM8/10/12
to node-...@googlegroups.com
I am trying to make a web request from a node-webkit app... request loads fine... but the request() callback never fires... with an error or otherwise....

Is there a whitelist thats not documented that I need to add to the package.json file?


The URL works from the address bar in nw.app but... not via the index.html file it wont....

Thanks!

Zhao Cheng

unread,
Aug 11, 2012, 11:57:59 AM8/11/12
to node-...@googlegroups.com
I'll look into this issue next monday, it could be a Mac only bug.
--
Cheng
Intel Open Source Technology Center

Karl Tiedt

unread,
Aug 11, 2012, 2:33:48 PM8/11/12
to node-...@googlegroups.com
Seems this isnt only OSX -- tried on Windows -- but I actually get an
error log on windows...

despite instaling request in the app directory, or globally ... the
app fails to load it....is there a way to get this log out in OSX to
confirm the problem is one and the same?

Likewise... what is the proper way of including 3rd party modules in a
node-webkit app if inside a local node_modules dir is not correct?

-Karl Tiedt

Zhao Cheng

unread,
Aug 11, 2012, 9:14:25 PM8/11/12
to node-...@googlegroups.com
I do not understand your question, can you attach the code (or the .nw
file) that describes your question?

Thanks.

Karl Tiedt

unread,
Aug 11, 2012, 9:46:31 PM8/11/12
to node-...@googlegroups.com
well here is the zip file...

on windows it produces a debug.log file... on OS X it does not..

so it is entirely possible that request() call failing is only because
it cant be loaded (require claims its not available)

My questions were:
1) why does windows produce a log file and OSX does not.
2) is there something obvious I am doing wrong with trying to
require a node modules.... both npm install request -d (in the app
directory) and -g result in the same error on windows (unknown on OS
X).

(node repl wil load request just fine in both cases).


Thanks,
-Karl Tiedt
abcpool.zip

Zhao Cheng

unread,
Aug 12, 2012, 10:26:19 PM8/12/12
to node-...@googlegroups.com
On Sun, Aug 12, 2012 at 9:46 AM, Karl Tiedt <kti...@gmail.com> wrote:
> 1) why does windows produce a log file and OSX does not.

On Mac you can execute nw in the terminal, then debug information will
be printed, On Windows processes usually don't have a console, so all
debug information will be printed to a separate debug.log (this
behavior will have a switch option in future).

> 2) is there something obvious I am doing wrong with trying to
> require a node modules.... both npm install request -d (in the app
> directory) and -g result in the same error on windows (unknown on OS
> X).

It actually consist of two bugs, one is on Mac the callback never
fires, the other is on Windows node modules cannot be correctly
required, thanks for reporting it.

The way you use node modules is totally right, it works under Linux now.

Karl Tiedt

unread,
Aug 12, 2012, 10:33:33 PM8/12/12
to node-...@googlegroups.com
Gotcha, thank you for that feedback. Hopefully they are both quick
bugs to resolve!

-Karl Tiedt

Karl Tiedt

unread,
Aug 28, 2012, 10:22:04 AM8/28/12
to node-...@googlegroups.com
This is finally working for me after the latest release. Thank you!
Reply all
Reply to author
Forward
0 new messages