Snap4Arduino
Snap4Arduino copied to clipboard
Creating a Custom Chromium Extension for use in my website
Continuing our conversation from https://github.com/bromagosa/Snap4Arduino/pull/295:
@jguille2
I'm having some trouble getting my custom extension working on my website. Here are the steps I took:
- I added my custom websites to manifest.json
- I ran ./prepare --all
- I ran ./build --platform=web/chromium
- I used the, "pack extension," option in chrome://extensions/ to pack the crx folder from the releases folder.
- I dragged the produced .crx file into chrome://extensions/ (and gave it permission to access my device)
- I copied the ID into plugin/plugin.js
- I ran ./build --platform=web/chromium again
- I copied the resulting www folder into my website
- I put the local index.html file in this folder into an iFrame
When I tested the website on localhost, everything worked as expected. However, after deploying the website to my domain, clicking, "Connect Arduino," on that domain caused nothing to happen. I also received this error message in the console: "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist."
Any advice would be greatly appreciated. Thanks!