Socket.IO couldn't connect on mobile - mobile

I implemented websocket transport with latest (1.3.5) Socket.IO, using node.js as a backend.
Handshake and data exchange works well in the latest desktop browsers. But Safari on 8.1.2 iOS and 38 Chrome on Android couldn't connect to server over WiFi. Do anybody faced the same problem or know what's wrong here?

These screenshots show that you're trying to connect to localhost. If you're on a mobile device, localhost is the mobile device itself, not your node.js server. You will need to use the IP address or DNS name of your server, connect to that instead and you will need to make sure your WiFi network has access to the node.js server.

Related

Calling nodejs over HTTP from Reactjs app which is running over HTTPS caused "Mixed Content" error

We are currently facing an issue with the Progressive Web Application (PWA) built using ReactJS. The PWA is deployed as a container within a Kubernetes cluster on the cloud and is intended to connect to a NodeJS server that is running as a container on a Raspberry Pi device. The desired approach is for the PWA to be accessed through a mobile device's browser, and for the mobile device to provide internet to the Raspberry Pi through its mobile hotspot, so that both the PWA and the server will be on the same local network and the PWA can communicate with the server using the Raspberry Pi's local IP address RASPBERRY_LOCAL_IP.
However, during the development process, where the Reactjs app was running on the localhost within the same local network to which the raspberry pi was connected, the Reactjs app could reach the nodejs server on the raspberry pi using its RASPBERRY_LOCAL_IP.
we encountered an issue when the Reactjs app was pushed to the cluster to run there as a container and it was then unable to connect to the server. In the last scenario, the Reactjs app runs over HTTPS with a trusted certificate, while the NodeJS server runs over HTTP. This has resulted in a "Mixed Content" error, specifically that "The page at 'http://RASPBERRY_LOCAL_IP/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://RASPBERRY_LOCAL_IP/'. This request has been blocked; the content must be served over HTTPS."
This error occurs because the Reactjs app, running in a container in the cluster, is attempting to make an XMLHttpRequest to an endpoint on the NodeJS server that is running over HTTP, which is considered an insecure connection. Since the Reactjs app is running over HTTPS, it can only make secure requests and therefore the request is blocked.
In conclusion, the technical challenge in our Reactjs app's ability to connect to a NodeJS server is due to the mismatch in the protocol used by the Reactjs app and the NodeJS server. Trying to find a solution to this issue to ensure smooth communication between the Reactjs app and the NodeJS server.

AWS DUPLICATE_CLIENT_ID

I have a Jetson, set up as core device. It has greengrass installed on it (inc. deployments, components etc)
I want to set up an AWS SSH tunnel, installed and configured the aws-iot-device-client, but it gets disconnected. In the AWS console at MQTT Test I get the error message DUPLICATE_CLIENT_ID.
Any thoughts or ideas are highly appreciated.
If you are using AWS IoT Greengrass V2, you can deploy the AWS-provided Secure Tunneling component to install and configure the AWS IoT Device Client for you, so you can create SSH tunnels. This component uses the Greengrass nucleus' MQTT connections, so it avoids the duplicate ID error.

How to resolve 404/403 issues when hosting react app on IIS with SSL enabled?

I need to deploy a react app to the IIS (version 8.5) with SSL certificate enabled. To make my issue more clear I am sharing a screenshot of the Windows Server where IIS is:
If I host the application on a different port (other than 80/443 where SSL is enabled) react app works, as you can see on left hand side image https://localhost:9999. If I host the same application on port 80, it throws all 404/403 errors for the requested files. React application will be hosted as web application under default website.
Please help, how can I resolve 404 issues thrown where app is hosted on SSL enabled port.
Thanks

How to connect to Google Cloud RabbitMQ from Google App Engine?

I have rabbitMQ running as a VM inside a Google Cloud Project. In that same project I have a NodeJS app running in which I am trying to connect to rabbitMQ.
I keep getting the error:
[AMQP] connect ETIMEDOUT ip:port
I think its because in the firewall settings there is specified an allowed IP Range of 0.0.0.0/0.
How would I specify that my NodeJS App is also allowed access?
I have also allowed tcp protocoll on the relevant ports.
So the reason I wasnt able to connect was because I hadn't even deployed the GAE App, rather I tested it with a simple npm start inside of the Google Cloud Shell. As soon as I deployed and connected to the rabbitMQ instance over its internal IP it worked like a charm.

Recording HTTPS mobile calls using Jmeter

I am working on a native mobile application. I am trying to record the mobile events using Jmeter and android device.The calls are HTTPS not HTTP. I read in article that android device doesn't support HTTPS. Is there any other way to record these HTTPS mobile calls using JMeter ?
PS: I imported and installed the ApacheJMeterTemporaryRootCA.crt on the android device
Regards,
Niroop
I faced similar issue for iOS devices. You should be able to record HTTP/HTTPS requests. I assume you have updated the proxy server details.
Detailed steps can be found here.
http://www.testautomationguru.com/jmeter-record-ios-application-http-requests/

Resources