Questions tagged

Explore the latest questions and answers asked by our top developers.

Node.js Websocket don’t work on hosting server

I’m trying to make Angular application with API in Node.JS. On my local machine everything works well but when I’m push API to remote server I’m getting error from WebSocket: WebSocket connection to <URL> failed: WebSocket is closed before the connection is established. There is no place when I use ws.close() so I think that […]

By Ravn
Categorized as angular, hosting, node.js,, websocket Tagged , , , ,

Old token values is getting retained in connection call

I have a client application in Angular and Backend service in nodejs. Im using I pass the authorization token to jwt.verify on below code io.on(‘connection’, socket => { jwt.verify(authorization, SECRET, (tokenError, decode) => { if(tokenError){ socket.emit(‘myError’,{errorMessage:’Authorization failed’}) } else { //My custom logic } }}); From the client Im making call to this service […]

Categorized as angular, node.js, Tagged , ,

Ngx-socket-io not connecting in angular

I am using ngx-socket-io in angular app and it’s not connecting to the socket despite having no error. I don’t know what am I doing wrong. Here’s the code: socket.service.ts sendMessage(eventName: string, data: any) { console.log(eventName, data); //here the socket connected is showing as false and disconnected as true console.log(this.socket.emit(eventName, data)); } login.service.ts login(payload) { […]

By node modules
Categorized as angular,, sockets Tagged , ,

Notify Client, Angular, from Server, .net, that the thread is complete

I have created a thread to search the data from table, I takes a lot of time and cause request time, to solve that problem I run the method in thread but now how can I notify the client that the server is ready to send the results. I know I’ve to use socket but […]

By COVID -19
Categorized as .net, angular, c#,, websocket Tagged , , , ,

Use in Angular + NativeScript shared coding project

I want to build an app for Android with tns build android I migrated my Angular (v12) WebApp so all .tns.ts files are in place. I used: I am using a Code sharing project (not an independent app), because it is a large project with lots of services. All these services include socket.service.ts, where […]

socket io not working with angular minimal code. "connected" is alawys false

I’m trying to get a minimal client running but my code is not working. Nothing is printed to console. The "connected" property in socket always shows false. I’ve also tried to use ngx-socket-io but it’s having the same problem. My server is running fine and I can get messages with other testing clients. import […]

By user2817869
Categorized as angular, Tagged ,

How to send empty data from Angular to server

How can I open a connection from a component to an arbitrary URL without sending any data? I mean sending a request without any content (no headers) like when opening a new connection from a socket and writing some empty bytes. I tried looking at but I can’t figure out how to remove any […]

By Antonio Santoro
Categorized as angular, client, server,, sockets Tagged , , , ,

ngx-socket-io fromEvent not working in angular

I’m trying to get event message from in Angular. I can see the messages in Chrome dev tools but my Angular code for getting the messages is not working. Posted the code for using fromEvent. I subscribed to OnFetchOrders() in my component and I want to print the data to console. But Nothing within […]

By user2817869
Categorized as angular, Tagged ,

How to deploy Angular and Application?

I have created an Angular application which uses Sockets. I tried to deploy it on Firebase but its not working there. How should I deploy my application? Source: Angular Questions

Real Time Notification on every processes in Node Js & Angular

I want to show real time push notification to every user if someone started any kind off process. My project is in Angular and Node JS. If any user start some process then every user in the site should be notified by push notification Source: Angular Questions

By DineshJ
Categorized as angular, node.js,, websocket Tagged , , ,
1 2 3 15

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us