Closed ezyone123 closed 7 years ago
iOS? Hmm.. Version 1.0?
"react-native-signalr": "^1.0.0"
That is from my package.json.
react-native version ?
0.40.0
Is there any way the jquery library in the server example would be included with the native package ?
hmm.. testing a fresh project here right now... I'll report back soon.
THANKS SO MUCH!
@ezyone123 hmm.. no problems here on a fresh project, connected and worked fine. Same import as yours. RN 0.40 and rn-signalr 1.0. The package.json:
{
"name": "yyy",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "~15.4.0-rc.4",
"react-native": "0.40.0",
"react-native-signalr": "^1.0.0"
},
"devDependencies": {
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "18.1.0",
"react-test-renderer": "~15.4.0-rc.4"
},
"jest": {
"preset": "react-native"
}
}
It might be that signalr-library conflicts with some other dependency you have. Could you post your package.json, or only the dependencies you have?
that window.location thing is a global hack that needs to be there for signalr-client to function. Nothing that awful, but it might conflict. Another question as well, are you running with any custom debugger?
{
"name": "TeamDynamix",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"flow": "node_modules/.bin/flow"
},
"dependencies": {
"react": "15.4.2",
"react-native": "0.40.0",
"react-native-camera": "^1.0.0-alpha1",
"react-native-code-push": "^1.16.1-beta",
"react-native-cookies": "^2.0.0",
"react-native-drawer": "^2.3.0",
"react-native-fabric": "^0.4.0",
"react-native-keychain": "^1.0.0",
"react-native-maps": "^0.13.0",
"react-native-onesignal": "^2.0.0",
"react-native-orientation": "git+https://github.com/yamill/react-native-orientation.git",
"react-native-router-flux": "^3.37.0",
"react-native-signalr": "^1.0.0",
"react-native-simple-store": "^1.1.0",
"react-native-vector-icons": "^4.0.0",
"react-redux": "^5.0.2",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0"
},
"devDependencies": {
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "18.1.0",
"react-test-renderer": "15.4.2",
"flow-bin": "^0.37.4"
},
"jest": {
"preset": "react-native"
}
}
I am using a error reporting service, its the fabric dependency.
Yes. I know fabric. I'll try installning all your dep and importing them before signalr and see if I can reproduce. You can try removing the others on at a time maybe. and see if you can get it running. You should also try a fresh project like i did with react-native init
to see that it's not an issue with your env.
importing your library into the root of my app does not result in any errors.
and it only happens when I call connection.start
I went though all my dependencies and none (other than yours) have a jquery dependency
Weird. The only way I can help you further is by testing you acutul source-code. If it's not that private of a project you can zip it and mail it to me at olof.dahlbom@me.com and I'll take a look.
Turns out it was the URL I was passing in for the server. Is there a check to make sure the URL is a proper URL?
@ezyone123 Ah! Then there must be something here : https://github.com/olofd/react-native-signalr/blob/master/src/bridge.js#L28 Could you set a breakpoint there and see what goes wrong?
@ezyone123 Did you solve this? Please close the issue if you found a solution.
Closing
I am sorry for not updating. The issue was the url passed in was what was causing the issue. Hard linking the url worked and I will later be testing getting the url set in a var. Ill update with findings. Thanks for closing.
I am getting an error that I believe is coming from the example project leaking into the include. It is coming from jquery.signalR.js.
My import looks like this:
import signalr from 'react-native-signalr';
and I installed the library usingnpm install react-native-signalr --save
Any thoughts?