Skip to main content

All Questions

0 votes
0 answers
551 views

I am unable to connect my expo react native application with django websocket

useEffect(() => { const ws = new WebSocket('ws://127.0.0.1:8000/ws/awsc/'); ws.onopen = (event) => { console.log(event.data) console.log('ws opened') }; ws.onmessage =...
Wasif Nadeem's user avatar
0 votes
2 answers
632 views

Unable to connect to django channels on react native app using web sockets

I am trying to use web sockets to connect to Django Server/Channels. The HTTP views are working but the "ws" ( WebSocket ) connection is being rejected but ONLY on The REACT NATIVE APP. It's ...
usamayaseen's user avatar
  • 2,079
0 votes
0 answers
405 views

how to send/receive mobile notifications with Django and React Native?

I am implementing notifications for mobile device. I successfully setup Firebase with my project and can send push notifications to users. But my problem is on iOS when a user denies notification ...
jdez's user avatar
  • 189
0 votes
1 answer
429 views

How to create WebSocket in React-Native correctly, It gets created multiple time

I'm trying to make a chat application with django-channels and react-native but I don't know how to create the WebSocket I tried this: const ChatScreen=({navigation, route})=> { room = route....
Hazem gamal's user avatar
0 votes
0 answers
344 views

React Native App not connecting via WebSocket after publishing it on the Play Store

In my application I have implemented real time application with socket and django channels that I deployed with daphne (ws://api.xxxxx.com). It works perfectly with my react native app in the ...
Iure Vieira Brandão's user avatar
0 votes
1 answer
879 views

React State giving undefined, new to react

I'm new to react-native, I have been working on a simple app but for some reason I keep getting (undefined) for some of my states, also when fetching data the server is getting called multiple times ...
Zeyad Shaban's user avatar
5 votes
1 answer
2k views

React native Websocket connection with Django Channels is open but no messages get through

I have a react native app (android) communicating with Django channels. When connecting to my development server over ws, everything works fine. However, when I try to connect to my remote wss server ...
Ryan Pergent's user avatar
  • 4,958
0 votes
1 answer
2k views

How to add cookie to header through Django Channels?

In my frontend, I have the following configuration. Authentication is manual because react native fails at having persistent sessions: ... const authLink = setContext(request => storage....
Ren's user avatar
  • 4,629
2 votes
0 answers
2k views

Failed to connect to Websocket on iPhone

I am working on my project and it runs perfectly fine on my IOS simulator (from emulator, I can access to my server hosted on Google Instance VM, websocket worked just fine). However, when I run it on ...
Thai Tran's user avatar
  • 9,885