urish / web-bluetooth-polyfill

Windows 10 Web Bluetooth Polyfill
76 stars 15 forks source link

BLE Devices do not appear in the connection dialog #22

Closed gguta closed 7 years ago

gguta commented 7 years ago

This is what I get in the console. I don't know whether a connection between the non displayed devices and the exceptions.


extensions::messaging:79 Uncaught (in promise) Error: Attempting to use a disconnected port object
    at PortImpl.postMessage (extensions::messaging:79:13)
    at Port.publicClassPrototype.(anonymous function) [as postMessage] (extensions::utils:149:26)
    at Promise (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:16:20)
    at Promise (<anonymous>)
    at nativeRequest (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:7:12)
    at startScanning (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:106:9)
    at requestDevice (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:161:5)
    at port.onMessage.addListener (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:333:13)
    at EventImpl.dispatchToListener (extensions::event_bindings:380:22)
    at Event.publicClassPrototype.(anonymous function) [as dispatchToListener] (extensions::utils:149:26)
PortImpl.postMessage @ extensions::messaging:79
publicClassPrototype.(anonymous function) @ extensions::utils:149
Promise @ background.js:16
nativeRequest @ background.js:7
startScanning @ background.js:106
requestDevice @ background.js:161
port.onMessage.addListener @ background.js:333
EventImpl.dispatchToListener @ extensions::event_bindings:380
publicClassPrototype.(anonymous function) @ extensions::utils:149
EventImpl.dispatch_ @ extensions::event_bindings:364
EventImpl.dispatch @ extensions::event_bindings:386
publicClassPrototype.(anonymous function) @ extensions::utils:149
dispatchOnMessage @ extensions::messaging:339
async function (async)
nativeRequest @ background.js:6
startScanning @ background.js:106
requestDevice @ background.js:161
port.onMessage.addListener @ background.js:333
EventImpl.dispatchToListener @ extensions::event_bindings:380
publicClassPrototype.(anonymous function) @ extensions::utils:149
EventImpl.dispatch_ @ extensions::event_bindings:364
EventImpl.dispatch @ extensions::event_bindings:386
publicClassPrototype.(anonymous function) @ extensions::utils:149
dispatchOnMessage @ extensions::messaging:339
background.js:14 Sent native message: {cmd: "stopScan", _id: 18}
extensions::messaging:79 Uncaught (in promise) Error: Attempting to use a disconnected port object
    at PortImpl.postMessage (extensions::messaging:79:13)
    at Port.publicClassPrototype.(anonymous function) [as postMessage] (extensions::utils:149:26)
    at Promise (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:16:20)
    at Promise (<anonymous>)
    at nativeRequest (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:7:12)
    at stopScanning (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:116:9)
    at requestDevice (chrome-extension://clipekllmdemfajhinlknhghkibidnll/background.js:187:9)
    at <anonymous>
PortImpl.postMessage @ extensions::messaging:79
publicClassPrototype.(anonymous function) @ extensions::utils:149
Promise @ background.js:16
nativeRequest @ background.js:7
stopScanning @ background.js:116
requestDevice @ background.js:187
async function (async)
nativeRequest @ background.js:6
stopScanning @ background.js:116
requestDevice @ background.js:187
async function (async)
requestDevice @ background.js:136
port.onMessage.addListener @ background.js:333
EventImpl.dispatchToListener @ extensions::event_bindings:380
publicClassPrototype.(anonymous function) @ extensions::utils:149
EventImpl.dispatch_ @ extensions::event_bindings:364
EventImpl.dispatch @ extensions::event_bindings:386
publicClassPrototype.(anonymous function) @ extensions::utils:149
dispatchOnMessage @ extensions::messaging:339```
urish commented 7 years ago

Seems like there is a communication problem with the BLEServer.exe, the native process that does the BLE bridging. Can you please confirm whether you have Windows 10 Creators Update installed, as outlined here?

gguta commented 7 years ago

Yes, I do have "Version 1703 (OS Build 15063.483)"

urish commented 7 years ago

Can you enable debug logging in the extension's background page and post the log here?

urish commented 7 years ago

Closing for now due to inactivity

emptor8 commented 7 years ago

Hey there,

We're having the same issue. After enabling debug logging inn the extension's background page, this is what we see:

extensions::messaging:79 Uncaught (in promise) Error: Attempting to use a disconnected port object at PortImpl.postMessage (extensions::messaging:79:13) at Port.publicClassPrototype.(anonymous function) [as postMessage] (extensions::utils:149:26) at Promise (chrome-extension://opmhiclkbmjhmbkahdgghodkgiaoekpf/background.js:16:20) at Promise () at nativeRequest (chrome-extension://opmhiclkbmjhmbkahdgghodkgiaoekpf/background.js:7:12) at startScanning (chrome-extension://opmhiclkbmjhmbkahdgghodkgiaoekpf/background.js:106:9) at requestDevice (chrome-extension://opmhiclkbmjhmbkahdgghodkgiaoekpf/background.js:161:5) at port.onMessage.addListener (chrome-extension://opmhiclkbmjhmbkahdgghodkgiaoekpf/background.js:333:13) at EventImpl.dispatchToListener (extensions::event_bindings:380:22) at Event.publicClassPrototype.(anonymous function) [as dispatchToListener] (extensions::utils:149:26)

emptor8 commented 7 years ago

Okay we figured out the problem. The BLEServer download has to be extracted to the location noted, "C:\Program Files (x86)\Web Bluetooth Polyfill". If the location doesn't exist then it should be created.

I had extracted the BLEServer download to another folder, which was why I was seeing this issue.

urish commented 7 years ago

Thanks for posting your findings!

boogerlad commented 7 years ago

I work with jteng7. I am getting the same error that he posted when I installed the polyfill identically on similar machines. Is there anything else I can show to help resolve the issue?

boogerlad commented 7 years ago

New finding: If this pops up when doubleclicking on BLEServer.exe

then chrome will fail silently. Uncheck to fix.

Also https://www.microsoft.com/en-us/download/details.aspx?id=48145 is needed

urish commented 7 years ago

Awesome @boogerlad ! Can you send a pull request to the README file with this solution? I'm sure it can help others!