grosdode / Electron-multible-BLE-devices

Search for BLE devices and choose one of a List
MIT License
6 stars 2 forks source link

Uncaught (in promise) DOMException: User cancelled the requestDevice() chooser. #1

Open Shaxadhere opened 2 weeks ago

Shaxadhere commented 2 weeks ago

Getting this error on clicking on test bluetooth button

renderer.js:27 Uncaught (in promise) DOMException: User cancelled the requestDevice() chooser.

nothing popped up no list nothing. straight up got this error.

Can you please help me if there's something I'm missing here.

i just cloned the repo and ran npm i then npm start

grosdode commented 1 week ago

Hi, I can not reproduce the error. I just cloned the repo to a PC (Windows 10) that never worked with BLE bevor and opened the index.html file with my default browser. Everything worked fine. I remember some common mistakes:

But your specific error message should only appear if you press cancel in the pop up window or if you click anywhere else, so the pop up window closes by it self.

Can you check if the examples from this site also produce this error? https://googlechrome.github.io/samples/web-bluetooth/

Shaxadhere commented 1 week ago

You may be able to reproduce it by not using a browser but using "npm start" command and opening it on window like app for which electron is for.

mreimann1 commented 5 days ago

Hello All,

I am also getting this error. It is most likely due to recent changes in either npm or electron, since I was able to run this project only a few months ago. See attached:

electronble_requestdeviceerror
mreimann1 commented 5 days ago

Hi, I can not reproduce the error. I just cloned the repo to a PC (Windows 10) that never worked with BLE bevor and opened the index.html file with my default browser. Everything worked fine. I remember some common mistakes:

  • Wrong browser (only chromium based browsers)
  • Bluetooth is turned off
  • using Bluetooth is prohibited by some global system settings

But your specific error message should only appear if you press cancel in the pop up window or if you click anywhere else, so the pop up window closes by it self.

Can you check if the examples from this site also produce this error? https://googlechrome.github.io/samples/web-bluetooth/

Note that opening this on chrome works for me too, and the error is seen when running the code through Electron