NodeRT icon indicating copy to clipboard operation
NodeRT copied to clipboard

Namespace - Class not registered issue

Open deadlyfingers opened this issue 10 years ago • 3 comments

I'm getting issue promisizing the 'Windows.Devices.Bluetooth.GenericAttributeProfile' namespace. The node_module was generated and built ok with NodeJS v0.10.36. Below is javascript code snippet:

var promisize = require('nodert-promisize').promisize; var bt = promisize('Windows.Devices.Bluetooth'); var gatt = promisize('Windows.Devices.Bluetooth.GenericAttributeProfile'); // error on this namespace

Error log:

C:\n\rt\node_modules\nodert-promisize\promisize.js:60 var prop = Object.getOwnPropertyDescriptor(obj, key); ^ Error: Class not registered

Class not registered

at Function.getOwnPropertyDescriptor (native)
at promisize (C:\n\rt\node_modules\nodert-promisize\promisize.js:60:25)
at promisize (C:\n\rt\node_modules\nodert-promisize\promisize.js:67:11)
at Object.<anonymous> (C:\n\rt\bluetooth.js:11:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)

deadlyfingers avatar Feb 13 '15 14:02 deadlyfingers

What windows version are you using?

nadavbar avatar Feb 13 '15 14:02 nadavbar

Windows 10 preview. But the NodeRTUI tool was set to use Windows 8.1 WinMD file: "C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd"

deadlyfingers avatar Feb 13 '15 15:02 deadlyfingers

The error message and the fact it's under windows 10 implies that one of the APIs under the Windows.Devices.Bluetooth.GenericAttributeProfile have changed/moved/removed. Since promize actually iterates over all of the classes in that namespaces when it called in order to wrap the async operations with promises.

What API are you trying to use from that namespaces? Is it possible to use it directly without promisize, or do you still get that error message?

nadavbar avatar Feb 13 '15 16:02 nadavbar