Giter VIP home page Giter VIP logo

chrome-proxy's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chrome-proxy's Issues

[Node] Transport issue

https://github.com/keepkey/chrome-proxy/blob/master/src/modules/keepkeyjs/node/nodeTransportHid.js#L51

This won't work, the easiest patch without making major changes is to just:
hidDevice.write(Array.prototype.slice.call(frame.buffer, 0));

Once, I made that change I was able to sent all messages successfully.

BTW - a rust implementation of the client. No error handling. Just getting adjusted to how I am going to add it to Parity:
https://github.com/CraigglesO/keepkey-rust/blob/master/src/main.rs

Extension does not work out-of-the-box under Ubuntu (udev issue)

Chromium Version 49.0.2623.108 Built on Ubuntu 14.04, running on LinuxMint 17.3 (64-bit)

In the extension console, I see the following errors:

extensions::uncaught_exception_handler:8 Error in response to hid.connect: [object Object]
    at connect (chrome-extension://idgiipeogajjpkgheijapngmlbohdhjg/background.js:31552:20)
    at Object.module.exports.onConnect (chrome-extension://idgiipeogajjpkgheijapngmlbohdhjg/background.js:31669:5)
    at chrome-extension://idgiipeogajjpkgheijapngmlbohdhjg/background.js:30783:22handler @ extensions::uncaught_exception_handler:8(anonymous function) @ extensions::uncaught_exception_handler:100safeCallbackApply @ extensions::sendRequest:23handleResponse @ extensions::sendRequest:72
extensions::lastError:133 Unchecked runtime.lastError while running hid.connect: Failed to open HID device.
    at connect (chrome-extension://idgiipeogajjpkgheijapngmlbohdhjg/background.js:31552:20)
    at Object.module.exports.onConnect (chrome-extension://idgiipeogajjpkgheijapngmlbohdhjg/background.js:31669:5)
    at chrome-extension://idgiipeogajjpkgheijapngmlbohdhjg/background.js:30783:22reportIfUnchecked @ extensions::lastError:133handleResponse @ extensions::sendRequest:78

Under chrome://device-log/, I see various permission-related errors:

[15:11:09] Failed to open '/dev/hidraw0': FILE_ERROR_ACCESS_DENIED
HIDEvent[15:11:09] Access denied opening device read-write, trying read-only.
HIDUser[15:11:09] HID device added: vendorId=11044, productId=1, name='KeepKey, LLC. KeepKey', serial='[redacted]', deviceId='/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:2B24:0001.000C/hidraw/hidraw0'
HIDUser[15:11:04] HID device removed: deviceId='/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:2B24:0001.000B/hidraw/hidraw0'
HIDEvent[15:08:05] Failed to open '/dev/hidraw0': FILE_ERROR_ACCESS_DENIED
HIDEvent[15:08:05] Access denied opening device read-write, trying read-only.
HIDEvent[14:41:30] Failed to open '/dev/hidraw0': FILE_ERROR_ACCESS_DENIED
HIDEvent[14:41:30] Access denied opening device read-write, trying read-only.
HIDUser[14:41:30] HID device added: vendorId=11044, productId=1, name='KeepKey, LLC. KeepKey', serial='[redacted]', deviceId='/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:2B24:0001.000B/hidraw/hidraw0'
HIDUser[14:41:25] HID device removed: deviceId='/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:2B24:0001.000A/hidraw/hidraw0'

The issue is that the device /dev/hidraw0 was restricted by default to root only by udev. Presumably because although the device is registered as a HID, it does not actually report as a keyboard or mouse, and so the default udev configuration restricts access to it. I was able to resolve this problem with the following udev rule:

echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="2b24", ATTRS{idProduct}=="0001"' | sudo tee /etc/udev/rules.d/70-keepkey.rules

Presumably you guys will want to include some documentation to this effect in your startup guide or FAQ so as not to frustrate people needlessly.

Does not build on case-sensitive file-systems (i.e. Linux)

I am attempting to build the repository to debug why this extension does not detect my KeepKey. However, this repository does not build as-is on Linux. It looks like incorrect casing of various requirejs statements:

[15:01:34] Starting 'browserify'...
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: Cannot find module '../nodePathHelper.js' from '/home/jeff/source/keepkey-chrome-proxy/src/modules/keepkeyjs/clientActions'
    at /home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:55:21
    at load (/home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:69:43)
    at onex (/home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:92:31)
    at /home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)

...

[14:57:57] Starting 'browserify'...
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: Cannot find module 'ByteBuffer' from '/home/jeff/source/keepkey-chrome-proxy/src'
    at /home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:46:17
    at process (/home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:173:43)
    at ondir (/home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:188:17)
    at load (/home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:69:43)
    at onex (/home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:92:31)
    at /home/jeff/source/keepkey-chrome-proxy/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)

I assume the module was authored on filesystem that is not case-sensitive. If I get the time, I will propose a fix and open a PR on this issue myself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.