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

Initializing Native Messaging fails with Chrome unpacked extension #7

Open
ganskef opened this issue May 16, 2023 · 1 comment
Open

Comments

@ganskef
Copy link
Owner

ganskef commented May 16, 2023

The browser extension isn't capable to start and stop the Java application on macOS and Windows like it does on Linux.

@ganskef
Copy link
Owner Author

ganskef commented May 17, 2023

Simple reason: Native messaging host requires allowed_origins which is generated while installing an unpacked extension in the Chrome browser. So you have to modify this line depending on your installation:

private static final String CHROMIUM_EXTENSION = "chrome-extension://ajccdogbepemoknjbdigfdnjlinpbedj/";

Maybe I'll find a better solution or simply publish the extension to Chrome Web Store if I'll figure it out :-) .

@ganskef ganskef changed the title Initializing Native Host Messaging fails on Windows and macOS Initializing Native Host Messaging fails with Chrome unpacked extension May 17, 2023
@ganskef ganskef changed the title Initializing Native Host Messaging fails with Chrome unpacked extension Initializing Native Messaging fails with Chrome unpacked extension May 17, 2023
ganskef added a commit that referenced this issue May 19, 2023
Before  publishing the extensions to the web stores (#7), it should be
clear and complete, no hidden feature.
ganskef added a commit that referenced this issue May 21, 2023
 - Migrated background script to service worker
 - Save state in session storage, since service worker might be stopped
 - Registered listeners for start and stop behavior
 - Removed timeouts, alarm isn't needed
 - Described error messages to console
 - Added an 128px image to publish in Chrome Web Store (#7)
 - Added an options page (empty and unused for now)
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

1 participant