Comments (6)
Thanks a lot for the help. Using the info you provided, I managed to get the script loading without the error messages, while maintaining node integration.
<script>
window.nodeRequire = require;
delete window.require;
</script>
<script src="./node_modules/libsignal-protocol/dist/libsignal-protocol.js"></script>
<script>
window.require = window.nodeRequire;
delete window.nodeRequire;
</script>
I can confirm that it works end to end in electron now.
Again thanks a lot for the tip, it helped immensely.
Electron actually highlights such an issue in their FAQ http://electron.atom.io/docs/faq/.
from libsignal-protocol-javascript.
The droids you are looking for are likely being attached to module.exports
instead of window
. Someday I hope we'll support a node-compatible build. Until then, you'll have to disable node integration in the renderer if you want to use this libaray as-is.
from libsignal-protocol-javascript.
I have created the minimal project required to reproduce the issue.
git clone https://github.com/McPo/electron-quick-start.git
cd electron-quick-start
git checkout libsignal
npm install
npm start
It should take less than a minute to get it up and going.
You should notice the error messages in the console.
However if you open the index.html file in chrome, there should be no error messages.
from libsignal-protocol-javascript.
dcodeIO appears to return ByteBuffer in Electron and a Protobuf in Chrome. Hence the undefined Protobuf in Electron. (This may be more relevant for the Electron repo, however I imagine other users would wish to use libsignal within an Electron app).
from libsignal-protocol-javascript.
Thanks @McPo, you just saved me from a night of head-banging ^^'!
from libsignal-protocol-javascript.
Thanks @McPo !
from libsignal-protocol-javascript.
Related Issues (20)
- Ionic/Angular Support HOT 1
- Why is there no nodejs implementation? HOT 3
- Converse.js v4.2.0 unable send OMEMO message HOT 10
- Is this lib still maintained? HOT 1
- Error -1 previous counter HOT 1
- Documentation
- IS THIS REPO STILL MANAGED HOT 3
- Install time Error "KeyId" not defined HOT 3
- Babel import/require .etc HOT 1
- How should keys be exchanged? What should be exchanged? HOT 1
- SessionCipher::encrypt setting wrong registrationId? HOT 2
- Is there a more detailed document or a demo actually used? HOT 2
- Use ES6 arrow functions for cleaner code HOT 1
- expand readme HOT 3
- Encryption of Media Files HOT 4
- T
- Does not seem work in Node
- Keepalive? HOT 2
- Only checking against the SignalProtocolAddress name when calling isTrustedIdentity in SessionBuilder HOT 1
- Test fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsignal-protocol-javascript.