Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected] is broken #33

Open
qpre opened this issue Jan 8, 2022 · 14 comments
Open

[email protected] is broken #33

qpre opened this issue Jan 8, 2022 · 14 comments

Comments

@qpre
Copy link

qpre commented Jan 8, 2022

Hello,

Over the last few days we experienced an issue causing bleno to only show advertisement data
with no access to services when deployed on a RPI3.
It would even make remote apps like Lightblue randomly crash on connection.

in this capture there are supposed to be two services with many characteristics available
screenshot

After a few (okay, a lot) investigations, we found out that bluetooth-hci-socket's version in the dependencies is not pinned to a specific revision causing it to be updated when the dependency is updated.

It appears that @abandonware/[email protected] is broken (see: abandonware/node-bluetooth-hci-socket#31 ) and forcing @abandonware/[email protected] solved the issue.

Would it be possible put a warning in the README and to either lock the optional dependency's version in the package.json or move it to a peerDependency so that people can choose the revision they install ? (I can take care of the PR if needed).

Thanks !

@taxilian
Copy link

Please please fix this and put in a release; I just spent an hour figuring out the same thing.

@shawnnolanjr
Copy link

Yes, I am also witnessing the LightBlue crash issue.

Not sure if this is from the same issue, or situation, but I am getting an error from hcidump that was NOT there when I was first building my app...

> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 64 reason 0x16
    Reason: Connection Terminated by Local Host

@goofiw
Copy link

goofiw commented Apr 10, 2022

It looks like @abandonware/noble has [email protected] as an optional dependency, which we also use in our project.

Using yarn, I tried to resolve hci socket to 0.5.3-7, but it fails to install (incompatible engine darwin) on my mac, so I wasn't able to feel confident opening a PR for pinning the version.

@rivertam
Copy link

rivertam commented Jun 23, 2022

Hmm... I'm still seeing this issue even when I force @abandonware/[email protected]. Not to complicate things further, as this might be something unrelated (I have yet to find a sanity check that works, but I am basically just trying the test.js on 3 different devices)

I'm trying on node v14.18.1, both ARM and x86

@qpre
Copy link
Author

qpre commented Jun 28, 2022

@rivertam you might have done it already but verify that your yarn.lock contains a single instance of @abandonware/bluetooth-hci-socket and that it's revision is 0.5.3-7 and use yarn install --frozen-lockfile on your device.
I also noted that I needed to restart the device if I inadvertently installed the 0.5.3-8 before since it was started.

@JP-tech-sh
Copy link

This is currently still an issue, @abandonware/bluetooth-hci-socket on its version 0.5.3-7 should be pinned on the package.json and a new relese should ne publish to npm as the current lastest is completly broken

@ryanthompson0123
Copy link

For anyone struggling with this, you can easily pin the older version in your project using yarn's "resolutions" block.

I got it working by doing this in package.json:

{ 
    "dependencies": {
        "@abandonware/bleno": "^0.5.1-4"
    },
    "resolutions": {
        "@abandonware/bluetooth-hci-socket": "0.5.3-7"
    }
}

@rzr
Copy link

rzr commented Sep 16, 2022

is current master working fine ?

@qpre
Copy link
Author

qpre commented Sep 19, 2022

@rzr it should for people using npm (package-lock.json is locked on 0.5.3-7) but anyone using another package manager (yarn, pnpm...) will get a broken package because package.json states "@abandonware/bluetooth-hci-socket": "^0.5.3-7" and thus will be resolved to the broken 0.5.3-8

Pinning 0.5.3-7 directly in package.json would solve it for everyone.

@rzr
Copy link

rzr commented Sep 20, 2022

but is the problem also in master branch pin git repo instead of npm version

@qpre
Copy link
Author

qpre commented Sep 20, 2022

@rzr
Copy link

rzr commented Sep 21, 2022

so please try to identify the failing patch and revert it

@compeek
Copy link

compeek commented Oct 15, 2022

I was having the same issue with my Raspberry Pi 3B and spent quite a while trying to figure out the problem before I found this thread. Fortunately the same fix worked for me, pinning the version of bluetooth-hci-socket to 0.5.3-7. Definitely seems to be something broken in the latest version, although I don't have a clue what it is.

By the way, thank you so much for your work on this project! I was disappointed to see the original project abandoned, and then I stumbled across this fork. I'm very happy to see it's alive. I've never done anything with Bluetooth before, but I have a reason currently, and it's pretty cool what's possible here.

@ajtadeo
Copy link

ajtadeo commented Nov 30, 2023

It looks like @abandonware/noble has [email protected] as an optional dependency, which we also use in our project.

Using yarn, I tried to resolve hci socket to 0.5.3-7, but it fails to install (incompatible engine darwin) on my mac, so I wasn't able to feel confident opening a PR for pinning the version.

@goofiw were you able to find a solution to this issue? im running into the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants