Skip to content

Conversation

@BricePissard
Copy link

Update WAMP_FEATURES constant with its attribute to prevent RN to crash at first socket connection.

@webee
Copy link
Owner

webee commented Sep 21, 2017

@BricePissard I used wamp.js to connect to a modified wamp server, and it's ok. I think it's better to add a method to change the default WAMP_FEATURES rather than a constant.

@BricePissard
Copy link
Author

@webee each time we do a

yarn add ...

or a

react-native install

we have to manually edit the ./dist/lib/session.js file to comment and replace:

...
// ignore now.
var WAMP_FEATURES={};// replace when/function/call
//
...

by

...
//var WAMP_FEATURES={};// replace when/function/call
var WAMP_FEATURES = {caller: {},callee: {}, publisher: {},subscriber: {} };
//
...

otherwise, from start, in React Native it is not possible to use this library.

The version currently published in npm is not the same than the one in GitHub. (maybe need an sh command npm publish from your package root?).

Could you please set the var WAMP_FEATURES = {...} with the minimum elements that the code will try to access, otherwise it is simply crashing without editing the file.

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

Successfully merging this pull request may close these issues.

2 participants