Coder Social home page Coder Social logo

chrome-native-messaging's People

Contributors

acdibble avatar jdiamond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chrome-native-messaging's Issues

How can I debug my_host.js

When I run connectNative, And then run sendNativeMessage.
Nothing happen!

Can you tell me how to debug my_host.js?

Only works on Mac - Not Windows

Currently this only works on Mac as far as I can tell.

  • Mac: Works with Node 8.11.4 || 10.9.0
  • Windows: Doesn't work with Node 8.11.4 || 10.9.0
  • Linux: Doesn't work with Node 8.11.4 || 10.9.0

This is one of the coolest projects I've seen in a while. If you have any thoughts on how to make this work on Windows and Linux I'd love to hear!

Tests (and application) fails with Node 10.x

node test.js results in:

TAP version 13
# Input
(node:9368) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
ok 1 should be equal
C:\Projects\NativeMessaging\New\node_modules\tape\index.js:75
        throw err
        ^

TypeError: Cannot read property 'foo' of null
    at Input.<anonymous> (C:\Projects\NativeMessaging\New\test.js:18:21)
    at Input.emit (events.js:182:13)
    at emitReadable_ (_stream_readable.js:534:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Tests work with Node 8.11. I haven't tried running the application though.

using windows Service as a host

In the example host directory, the windows manifest file points to a my_host.bat script that fires my_host.js. I'm attempting to replace my_host.bat with a myservice.exe Windows Service created with node-windows. i.e., rather than using a one-off script as the wrapper around my native messaging my_host.js script, I'm trying to use a long-running windows service.

I'm able to create the service and register it as a host after modifying and running host\register.bat (and also main.js in the app/ folder). But when I try to "connect" to the host from the example app, a Windows permissions warning pops up:

"do you want to allow this app from an uknown publisher to make changes to your device?" 

<my_service_executable.exe>  

Program location: "C:\Users\me\code\chrome-native-messaging\daemon\my_service_executable.exe --parent-window=3998946 chrome-extension://<id>/`

Once I approve, the chrome extension disconnects from the host and subsequent attempts return the same result.

This isn't exactly an issue with this library, so apologies for the tangent and feel free to close the issue if it's totally irrelevant. Just thought I'd solicit some feedback here in case anybody has attempted something similar. I'd be happy to submit a PR if that would be helpful in solving my issue. Thanks!

Usage questions (multiple streams and keeping streams open)

Hi!

Glad to be able to get this working on general webextensions.

Sorry, I'm a little green with streams...

I'd be grateful for any clarification on whether and how one can send messages from a Node native messaging app back to the browser when not in response to a message from the browser.

I see that this works:

const output = new nativeMessage.Output();
output.end('some msg');
output.pipe(process.stdout);

...but I'm wondering whether there are:

  1. any problems with keeping the above stream open without calling end and just calling write as long as the extension is open? (I intend to have a server or socket which can listen for the user opening a desktop file with a Node executable, and when it receives such a command, pass on the file data into the browser add-on which will pass it onto a designated webapp, allowing one to have desktop files opened directly into web apps without a need for drag-and-drop)
  2. any problems to watch for when piping stdout/stdin multiple times (e.g., having one Output stream and one Transform stream)

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.