EzDev.org

nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies. - nwjs/nw.js NW.js nwjs


Drag and drop not working in nw.js app on windows 10

I have nw.js (webkit) desktop app with following js code

var holder = document.getElementById('holder');

holder.ondragover = function (e) {
    e.preventDefault();
    return false;
};

holder.ondragend = function (e) {
    e.preventDefault();
    return false;
};

holder.ondrop = function (event) {
    event.preventDefault();
    var files = event.dataTransfer.files;
    handleFileSelect(event);
};

On windows 8 and linux, this code works, but on windows 10, it won't accept file drop. When i drag file over "holder" area, i get black circle icon.

I have tried to run app as administrator, and it don't work. I made quick web page to try it in browser, and it works in both FF and Edge browsers.

Can someone help with this?


Source: (StackOverflow)

Passing variables to a newly opened window - nwj (node-webkit)

I am searching for hours now, on how to pass a variable to a newly opened window using node-webkit.

The task is pretty simple (like HTTP POST), but there is no word about this, in the nwj (node-webkit) documentation.

code I use to open new windows:

var win = gui.Window.open ('print.html', {
  position: 'center',
  width: 901,
  height: 127
});
win.on ('loaded', function(){
  // the native onload event has just occurred
  var document = win.window.document;
});

Thanks!


Source: (StackOverflow)

How reach window from NWJS background script?

I am loading a background script in NWJS with the following manifest file:

{
    "name": "Testing background process",
    "main": "index.js",
    "bg-script" : "bg.js"
}

From the background script, I want to access the window, so I'm trying:

let win = nw.Window.get()
console.log(win)

But that gives the following error:

Uncaught cannot get current window; are you in background page/node context?

How can I find the window from a background script? My goal is to listen to events in the current window.


Source: (StackOverflow)

React Native bundle loading slowly or not at all

The problem seems to be network-specific, the console log points to two possible errors causing the slowdown:

nw_resolver_create_dns_service_locked [C150094] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)

or

nw_socket_handle_socket_event Socket SO_ERROR [61: Connection refused]

I tried two network configurations:

  1. The development Mac and the iPhone on the same subnet (WiFi) of a larger corporate network - JS bundle loads slowly or not at all
  2. Direct connection between the development Mac (WiFi hotspot) and the iPhone - JS bundle loads very fast

AppDelegate.m

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

/node_modules/react-native/scripts/react-native-xcode.sh:

# Enables iOS devices to get the IP address of the machine running Metro Bundler
if [[ "$CONFIGURATION" = *Debug* && ! "$PLATFORM_NAME" == *simulator ]]; then
  IP=$(ipconfig getifaddr en0)
  if [ -z "$IP" ]; then
    IP=$(ifconfig | grep 'inet ' | grep -v ' 127.' | cut -d\   -f2  | awk 'NR==1{print $1}')
  fi

  echo "$IP" > "$DEST/ip.txt"
fi

Network interfaces:

$ ifconfig | grep 'inet '
inet 127.0.0.1 netmask 0xff000000 <- Localhost
inet xxx.xxx.xxx.xxx netmask 0xfffff800 broadcast 10.10.7.255 <- Cable (en0)
inet yyy.yyy.yyy.yyy netmask 0xfffff800 broadcast 10.10.55.255 <- Wireless (en1)
inet 169.254.174.6 netmask 0xffff0000 broadcast 169.254.255.255 <- RN Packager

Console log:

error   17:09:36.741707+0100    MyApp   nw_resolver_create_dns_service_locked [C29701] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.743554+0100    MyApp   nw_resolver_create_dns_service_locked [C29702] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.745285+0100    MyApp   nw_resolver_create_dns_service_locked [C29703] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.745877+0100    MyApp   nw_resolver_create_dns_service_locked [C29704] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.747514+0100    MyApp   nw_resolver_create_dns_service_locked [C29705] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.748616+0100    MyApp   nw_resolver_create_dns_service_locked [C29714] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.749197+0100    MyApp   nw_resolver_create_dns_service_locked [C29715] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.750118+0100    MyApp   nw_resolver_create_dns_service_locked [C29716] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.751705+0100    MyApp   nw_resolver_create_dns_service_locked [C29717] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.752599+0100    MyApp   nw_resolver_create_dns_service_locked [C29718] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:36.753707+0100    MyApp   nw_resolver_create_dns_service_locked [C29719] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.257411+0100    MyApp   nw_resolver_create_dns_service_locked [C29725] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.258018+0100    MyApp   nw_resolver_create_dns_service_locked [C29731] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.258969+0100    MyApp   nw_resolver_create_dns_service_locked [C29732] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.259757+0100    MyApp   nw_resolver_create_dns_service_locked [C29733] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.261023+0100    MyApp   nw_resolver_create_dns_service_locked [C29734] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.261598+0100    MyApp   nw_resolver_create_dns_service_locked [C29735] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.263278+0100    MyApp   nw_resolver_create_dns_service_locked [C29736] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.264353+0100    MyApp   nw_resolver_create_dns_service_locked [C29737] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.265340+0100    MyApp   nw_resolver_create_dns_service_locked [C29745] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.265913+0100    MyApp   nw_resolver_create_dns_service_locked [C29746] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.266989+0100    MyApp   nw_resolver_create_dns_service_locked [C29747] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.267868+0100    MyApp   nw_resolver_create_dns_service_locked [C29748] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.269294+0100    MyApp   nw_resolver_create_dns_service_locked [C29749] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.270294+0100    MyApp   nw_resolver_create_dns_service_locked [C29750] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.271071+0100    MyApp   nw_resolver_create_dns_service_locked [C29751] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.271384+0100    MyApp   nw_resolver_create_dns_service_locked [C29758] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.271955+0100    MyApp   nw_resolver_create_dns_service_locked [C29759] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.273083+0100    MyApp   nw_resolver_create_dns_service_locked [C29760] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.273659+0100    MyApp   nw_resolver_create_dns_service_locked [C29761] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.274663+0100    MyApp   nw_resolver_create_dns_service_locked [C29762] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.275233+0100    MyApp   nw_resolver_create_dns_service_locked [C29763] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.275813+0100    MyApp   nw_resolver_create_dns_service_locked [C29764] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.276921+0100    MyApp   nw_resolver_create_dns_service_locked [C29765] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.278096+0100    MyApp   nw_resolver_create_dns_service_locked [C29766] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.278948+0100    MyApp   nw_resolver_create_dns_service_locked [C29775] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.280069+0100    MyApp   nw_resolver_create_dns_service_locked [C29776] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.281327+0100    MyApp   nw_resolver_create_dns_service_locked [C29777] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.282205+0100    MyApp   nw_resolver_create_dns_service_locked [C29778] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.282999+0100    MyApp   nw_resolver_create_dns_service_locked [C29779] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.283580+0100    MyApp   nw_resolver_create_dns_service_locked [C29780] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.284501+0100    MyApp   nw_resolver_create_dns_service_locked [C29781] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.286073+0100    MyApp   nw_resolver_create_dns_service_locked [C29788] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.286667+0100    MyApp   nw_resolver_create_dns_service_locked [C29789] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.287760+0100    MyApp   nw_resolver_create_dns_service_locked [C29790] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.288697+0100    MyApp   nw_resolver_create_dns_service_locked [C29791] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.289472+0100    MyApp   nw_resolver_create_dns_service_locked [C29792] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.290365+0100    MyApp   nw_resolver_create_dns_service_locked [C29793] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.291999+0100    MyApp   nw_resolver_create_dns_service_locked [C29801] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.293474+0100    MyApp   nw_resolver_create_dns_service_locked [C29802] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.294349+0100    MyApp   nw_resolver_create_dns_service_locked [C29803] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.295423+0100    MyApp   nw_resolver_create_dns_service_locked [C29804] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.297020+0100    MyApp   nw_resolver_create_dns_service_locked [C29805] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.297929+0100    MyApp   nw_resolver_create_dns_service_locked [C29806] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.299973+0100    MyApp   nw_resolver_create_dns_service_locked [C29814] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.300942+0100    MyApp   nw_resolver_create_dns_service_locked [C29815] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.301518+0100    MyApp   nw_resolver_create_dns_service_locked [C29816] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.303319+0100    MyApp   nw_resolver_create_dns_service_locked [C29817] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.304447+0100    MyApp   nw_resolver_create_dns_service_locked [C29818] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.374444+0100    MyApp   nw_connection_get_connected_socket [C29819] Client called nw_connection_get_connected_socket on unconnected nw_connection
error   17:09:37.374644+0100    MyApp   TCP Conn 0x2817b6a00 Failed : error 0:-65539 [-65539]
error   17:09:37.375264+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.375571+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.375977+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.376354+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.376669+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.376986+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.377598+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.378521+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.379112+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.379523+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.379827+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]

Later...

error   17:09:37.560003+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.580106+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.580409+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.580713+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.581020+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.581325+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.581624+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.581927+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.662981+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.663283+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.663631+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.664028+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.664376+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.664755+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.665090+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.665432+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.665777+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.666107+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.666439+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.743908+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.799060+0100    MyApp   nw_resolver_create_dns_service_locked [C29857] DNSServiceGetAddrInfo failed: Unknown(-65537)
error   17:09:37.799824+0100    MyApp   nw_resolver_create_dns_service_locked [C29858] DNSServiceGetAddrInfo failed: Unknown(-65537)
error   17:09:37.800467+0100    MyApp   nw_resolver_create_dns_service_locked [C29859] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.801033+0100    MyApp   nw_resolver_create_dns_service_locked [C29860] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.801603+0100    MyApp   nw_resolver_create_dns_service_locked [C29861] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.802180+0100    MyApp   nw_resolver_create_dns_service_locked [C29862] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.802745+0100    MyApp   nw_resolver_create_dns_service_locked [C29863] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.803313+0100    MyApp   nw_resolver_create_dns_service_locked [C29864] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.804091+0100    MyApp   nw_resolver_create_dns_service_locked [C29874] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.804668+0100    MyApp   nw_resolver_create_dns_service_locked [C29875] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.805233+0100    MyApp   nw_resolver_create_dns_service_locked [C29876] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.805802+0100    MyApp   nw_resolver_create_dns_service_locked [C29877] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.806370+0100    MyApp   nw_resolver_create_dns_service_locked [C29878] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.806932+0100    MyApp   nw_resolver_create_dns_service_locked [C29879] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.807502+0100    MyApp   nw_resolver_create_dns_service_locked [C29880] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.808068+0100    MyApp   nw_resolver_create_dns_service_locked [C29881] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.808645+0100    MyApp   nw_resolver_create_dns_service_locked [C29882] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.809211+0100    MyApp   nw_resolver_create_dns_service_locked [C29883] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.809777+0100    MyApp   nw_resolver_create_dns_service_locked [C29884] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.810345+0100    MyApp   nw_resolver_create_dns_service_locked [C29885] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.901485+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.901839+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.902196+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.902527+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.902852+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.903191+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.903529+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.903848+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.904181+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.904510+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.904864+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.905194+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.905538+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.905893+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.906202+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.906529+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.906866+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.912981+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.918026+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:37.929966+0100    MyApp   nw_resolver_create_dns_service_locked [C29902] DNSServiceGetAddrInfo failed: Unknown(-65537)
error   17:09:37.930722+0100    MyApp   nw_resolver_create_dns_service_locked [C29903] DNSServiceGetAddrInfo failed: Unknown(-65537)
error   17:09:37.931337+0100    MyApp   nw_resolver_create_dns_service_locked [C29904] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.931911+0100    MyApp   nw_resolver_create_dns_service_locked [C29905] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.932475+0100    MyApp   nw_resolver_create_dns_service_locked [C29906] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.933039+0100    MyApp   nw_resolver_create_dns_service_locked [C29907] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.933240+0100    MyApp   nw_resolver_create_dns_service_locked [C29914] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.933819+0100    MyApp   nw_resolver_create_dns_service_locked [C29915] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.934386+0100    MyApp   nw_resolver_create_dns_service_locked [C29916] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.934966+0100    MyApp   nw_resolver_create_dns_service_locked [C29917] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.935533+0100    MyApp   nw_resolver_create_dns_service_locked [C29918] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.936104+0100    MyApp   nw_resolver_create_dns_service_locked [C29919] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.936665+0100    MyApp   nw_resolver_create_dns_service_locked [C29920] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.937233+0100    MyApp   nw_resolver_create_dns_service_locked [C29921] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.937805+0100    MyApp   nw_resolver_create_dns_service_locked [C29922] DNSServiceCreateDelegateConnection failed: NoMemory(-65539)
error   17:09:37.945795+0100    MyApp   nw_connection_get_connected_socket [C29922] Client called nw_connection_get_connected_socket on unconnected nw_connection
error   17:09:38.999588+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:38.999922+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:09:38.000298+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]

Later...

error   17:10:30.563154+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.563445+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.563740+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.564030+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.564331+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.564630+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:30.564924+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:31.898529+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.144762+0100    MyApp   nw_socket_connect [C35257.1:1] connectx(16, [srcif=0, srcaddr=<private>, dstaddr=<private>], SAE_ASSOCID_ANY, 0, NULL, 0, NULL, SAE_CONNID_ANY) failed: [61: Connection refused]
error   17:10:32.144828+0100    MyApp   nw_socket_connect <private> connectx failed (fd 16) [61: Connection refused]
error   17:10:32.144884+0100    MyApp   nw_socket_connect connectx failed [61: Connection refused]
error   17:10:32.153072+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.153362+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.153783+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.155424+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:32.156145+0100    MyApp   nw_connection_get_connected_socket [C35259] Client called nw_connection_get_connected_socket on unconnected nw_connection
error   17:10:32.156346+0100    MyApp   TCP Conn 0x2817bd440 Failed : error 0:61 [61]
error   17:10:33.271516+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:33.272726+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:33.278913+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:33.285942+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]

Later...

error   17:10:34.096239+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.096532+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.096827+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.097116+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.097414+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.097708+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:34.098004+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:35.816966+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:35.817272+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.050535+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.051439+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.051804+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.052109+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.052398+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.052694+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.052989+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.053281+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.053576+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.053900+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.054222+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.054553+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.054884+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.055226+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.055583+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.055923+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.056241+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.056566+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.056895+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.057221+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.057526+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.057820+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.058268+0100    MyApp   nw_socket_handle_socket_event <private> Socket SO_ERROR [61: Connection refused]
error   17:10:36.058896+0100    MyApp   nw_connection_get_connected_socket [C35675] Client called nw_connection_get_connected_socket on unconnected nw_connection
error   17:10:36.059063+0100    MyApp   TCP Conn 0x2818da4c0 Failed : error 0:61 [61]
error   17:10:36.167032+0100    MyApp   nw_socket_connect [C35676.1:1] connectx(16, [srcif=0, srcaddr=<private>, dstaddr=<private>], SAE_ASSOCID_ANY, 0, NULL, 0, NULL, SAE_CONNID_ANY) failed: [61: Connection refused]
error   17:10:36.167088+0100    MyApp   nw_socket_connect <private> connectx failed (fd 16) [61: Connection refused]
error   17:10:36.167164+0100    MyApp   nw_socket_connect connectx failed [61: Connection refused]

Source: (StackOverflow)

NW.JS Open New Window Errors Id does not work

Any ideas why when opening a new window, Ii cannot use the id to repost a new url in the same window?

var windowRef = nw.Window.open("photoview.html", {
        "title": from,
        "id": "photowin",
        "width": 1024,
        "height": 768
});

Source: (StackOverflow)

How to access a RowDataPacket object

I'm currently developing a desktop application with Node-webkit. During that process I need to get some data from a local MySQL-database.

The querying works fine, but I can't figure out how to access the results. I store all of them in an array that is then passed to a function. In the console they look like this:

RowDataPacket {user_id: 101, ActionsPerformed: 20}
RowDataPacket {user_id: 102, ActionsPerformed: 110}
RowDataPacket {user_id: 104, ActionsPerformed: 3}

And here is the query structure:

var ret = [];
conn.query(SQLquery, function(err, rows, fields) {
    if (err)
        alert("...");
    else {
        for (var i of rows) 
            ret.push(i);
    }
    doStuffwithTheResult(ret);
}

How do I retrieve this in the doStuffwithTheResult function? The values are more important, but if I could get the keys as well that would be great.


Source: (StackOverflow)

Node Webkit change DOM element from Node

My target is to show real time values in a graph, what I read from Serial port. For that, have to send values from Node side to DOM side. referring Node Webkit documentation I found to way access function in Node from DOM but I couldn't find a way to acess other way around.


Source: (StackOverflow)

How will my code get a callback after successful installation of a desktop application, which is developed by using NW.js (Node-Webkit) or Node.js?

Right now i am exploring NW.js and Electron.js for developing desktop application like Dropbox or OneDrive.

I would like to run .batch file (which will add right-click context menu on windows explorer and virtual folder at root level of navigation pane) onInstallationSuccessCallback.


Source: (StackOverflow)

Node Webkit open folder by path of shell windows

Good afternoon. Please tell me how you can open a simple folder on the path in the operating system itself (windows/Linux) programmatically?

All the solutions I've tried are very crutchy. For example:

<label><input type="file" accept=".ir" />Open</label>

but this doesn't quite fit, I just need to simulate the Win+E keys with path


Source: (StackOverflow)

Node webkit opening a new window and listening for on.loaded

OK so I couldn't find an answer for this one, I am trying to open a window, execute a command once it's loaded, and then modify it's DOM from the main window. Here's my sample code:

var window = window.open('empty.html',{
    "position": "center",
    "focus": true,
    "toolbar": false,
    "frame": true
  });
...
window.on("loaded",function() {
...

It doesn't fire. when I tried

var a_window = window.open('empty.html',{
  "position": "center",
  "focus": true,
  "toolbar": false,
  "frame": true
});
a_window = gui.Window.get(a_window);
...
a_window.on("loaded",function() {
...

but here it doesn't even open the window! (No I don't have a hide() function inside the callback) also, no error is thrown. Any help?


Source: (StackOverflow)

Node.js require can't find libdpfpdd.so.2 file, which is in the same directory as my .node file

I'm trying to include a node module that was compiled for nw.js using the nw-gyp command (full command: nw-gyp rebuild --production --runtime=node-webkit --target=0.29.1)

When I run the require, it throws an error that says "libdpfpdd.so.2: cannot open shared object file: No such file or directory", even though that file exists and is in the same directory as the .node file. Below I leave my code and the full error message Has anyone experienced somthing similar? Do you know where node is trying to find that file? Any help will be appreciated

path = require('path')
require(path.join(myPath, "FingerprintReader.node"))
Uncaught Error: libdpfpdd.so.2: cannot open shared object file: No such file or directory
    at Object.Module._extensions..node (module.js:721)
    at Module.load (module.js:586)
    at tryModuleLoad (module.js:526)
    at Function.Module._load (module.js:518)
    at Module.require (module.js:618)
    at require (internal/module.js:11)
    at self.require (<anonymous>:11:26)
    at <anonymous>:2:1

Source: (StackOverflow)

how can i solve this problem with Node package manager?

I try to run this install:

npm install nw@0.44.1-sdk nw-builder -D

But it gives me this problem. if I try to install another package, I don't get this message.

I also clear npm cache and delete node_modules

And I also setup company proxy

tunneling socket could not be established, statusCode=407
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nw@0.44.1-sdk postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nw@0.44.1-sdk postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\H90431283\AppData\Roaming\npm-cache\_logs\2020-02-18T14_48_15_391Z-debug.log

Source: (StackOverflow)

How to use npm package in nw.js without installing Node JS

I want to use this npm package(https://www.npmjs.com/package/node-ssh) in my nw.js application, In my dev system installed node js and installed this package and successfully its working , But while shipping this application I don't want to make a dependency to node js. Without installing the node js can nw.js use this package.

Any help ?


Source: (StackOverflow)

How to distinguish prod and dev environment in NW.JS?

Just like in the title, anyone knows how to distinguish prod and dev environment in NW.JS?

I tried something with

NODE_ENV=production

and

var env = process.env.NODE_ENV

But it doesnt work.


Source: (StackOverflow)

NW.js / Node.js throws "SSL routines:ssl_choose_client_version:unsupported protocol" error when using node-mssql / tedious

I found the answer to this problem already and just want to document my finding.

When using recent versions of NW.js (and Node.js), I was having problems with the node-mssql / tedious module. Even a task as simple as connecting to a SQL Server server would throw a SSL routines:ssl_choose_client_version:unsupported protocol error.


Source: (StackOverflow)