-
Notifications
You must be signed in to change notification settings - Fork 117
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
(Electron - Vue) - dgram.createSocket is not a function #179
Comments
Hey @TesseraSkye, sorry to hear you're having difficult getting osc.js to work. Can you create a simple test application and I'll try to take a look? In the meantime, is your code that is using an I hope this helps! -Colin |
Hmm, looks like electron-vue uses a browser window by default. Added |
Electron keeps tightening up its security so that people don't unintentionally expose Node APIs to third-party web content. So I believe those two flags are required in the latest version of Electron in order to be able to successfully use |
Hmm, noted. fwiw, should I be using https://github.com/TesseraSkye/oscjs_test |
How do I run the app to test it? I tried with I did notice that the |
Just run |
Directly calling |
Sorry to be slow to respond but it's been a busy couple days. To be honest, though, I haven't been able to get your test application to run for a bunch of different reasons. First, your npm install script that runs electron-rebuild fails, and given that you've already set up a .npmrc file with the appropriate electron runtime configuration probably isn't necessary in the first place (npm will build native module dependencies from source against the Electron runtime when it installs them). Running I don't know how much of all of this is related to generated boilerplate from Vue, but it's all pretty complex. If you can get me an app that can be run simply with a standard Node/npm/Electron environment, I can try to take a closer look. But as you say, it does seem like your problem lies elsewhere in your configuration, rather than with osc.js. |
Any further updates on this? Were you able to get it to work, @TesseraSkye? |
I wish I could say I've figured it out. If I had to take a guess, it's something to do with browser windows, but I haven't gotten it to work yet. I kinda sidelined it for a bit, but I can poke at it when I get home. |
@TesseraSkye any updates on this? I am running into the exact same issue... any help would be greatly appreciated. |
@colinbdclark @jellohouse no progress unfortunately, I've since dropped the project. |
For now I did a workaround where I send an OSC message by web socket from my Electron app to a node server, then on the server I receive the web socket message and I forward it by UDP. A bit messy, but it works for now... |
Trying to create a fresh Electron / Vue app, having breaking issues implementing OSC.
Through out the entire process, booting electron yeilds a breaking error; "TypeError: dgram.createSocket is not a function"
vue create
, (vue2)vue add electron-builder
. version doesn't seem to matter, tested 7, 9, 11.npm i osc
,npm i
to force rebuild, also manually rebuilt as per node serial, also added an .npmrc target.The error exists within node / dgram - the problem exists in other OSC / udp libraries.
The particularly upsetting part of this is that I have another project that's built from an old vue-electron boilerplate that does work. I've compared the
package.json
entries to see if there are any deps that might be doing it, but there's nothing telling so far.fwiw, I'd use the old boilerplate, but it's kinda buggy, and feels pretty bloated with stuff that has deep dependency within the backend code, so I'd have to rewrite the whole thing to remove said bloat. If I have to, I will, but I figured I'd ask someone more knowledgeable than I.
Thanks!
~ Tess
The text was updated successfully, but these errors were encountered: