Socket.IO flashsocket security sandbox error - socket.io

I have been playing around with node.js and socket.io for the past few days. Everything works fine on my local machine (windows using iss for a webserver), but when uploading it to my remote server (ubuntu box), I get security errors.
[trace] Warning: Failed to load policy file from http://localhost:8000/crossdomain.xml
[trace] *** Security Sandbox Violation ***
[trace] Connection to http://localhost:8000/socket.io/1/ halted - not permitted from http://****/virtualcinema/VirtualCinema.swf
[trace] Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://****/virtualcinema/VirtualCinema.swf cannot load data from http://localhost:8000/socket.io/1/.
The AS3 code it's erroring on is:
Security.loadPolicyFile("xmlsocket://localhost:10843");
socket = new FlashSocket("localhost:8000");
The policy file is being served correctly on port 10843 and I can receive the policy file fine at http://**:10843/ in my browser. Why is it trying to load the policy file on port 8000. That warning does not appear on my local build.
The socket.io code:
socket = io.listen(8000);
socket.configure(function()
{
socket.set("transports", ["flashsocket"]);
socket.set("log level", 2);
});
I'm confused as to why it gets resolved fine when I test it on a localmachine but not on a remote one. Any help would be much appreciated :)
The crossdomain.xml I am using:
<cross-domain-policy>
<allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>

Fixed. I changed it from pointing to localhost to my servers externalIP.
I had tried this before, but unfortunately the server had cached my swf file and I did not realise it was fixed.
Security.loadPolicyFile("xmlsocket://****.com:10843");
socket = new FlashSocket("****.com:8000");

Related

Can't establish connection to Web Server using rosbridge

I have created a simple HTML page to control the movement of a simulated Gazebo Turtlebot using roslaunch rosbridge_server rosbridge_websocket.launch following this tutorial.
However, in the Web Console of the HTML page (F12) it shows the error "Firefox cant establish a connection to the server at ws://localhost:9090/." I am using the default rosbridge for the websocket(9090). In the Terminal I am also receiving the errors:
[-] failing WebSocket opening handshake ('WebSocket connection denied: origin 'null' not allowed')
[-] dropping connection to peer tcp4:127.0.0.1:41290 with abort=False: WebSocket connection denied: origin 'null' not allowed.
Does anyone have any suggestions on how I can fix this?
Given that you have followed the ROS tutorial and have created an HTML file as shown in Ros Bridge tutorial then you have to run:
runcore
rosrun rospy_tutorials add_two_ints_server
roslaunch rosbridge_server rosbridge_websocket.launch
Now that you have these up and running, you need to serve the html/javascript file (e.g. simple.html) and start the services etc. For example, you can serve the simple.html by using a SimpleHTTPServer, see below an example (e.g. simplehttpserver_test.py):
#!/usr/bin/env python
import SimpleHTTPServer
import SocketServer
class MyRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
if self.path == '/':
self.path = '/simple.html'
return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
Handler = MyRequestHandler
server = SocketServer.TCPServer(('127.0.0.1', 9089), Handler)
server.serve_forever()
Once you run the simplehttpserver_test.py you can open the browser on 127.0.0.1:9089 and you should be able to have it working.
Note that SimpleHTTPServer serves files from the current directory and below, directly mapping the directory structure to HTTP requests, which means that the simple.html should be in the same (or below) directory as the simplehttpserver_test.py. Last, the port for the simplehttpserver_test.py should differ from the one used for the Rosbridge WebSocket server (e.g. default is 9090).

flutter http post fails connection blocked from android emulator on windows 10

my Flutter code looks like :
var url = "http://localhost:49912/api/Account/Register";
http
.post(url,
headers: {"Content-Type": "application/json"},
body: js)
.then((response) {
print("Response status: ${response.statusCode}");
print("Response body: ${response.body}");
});
the http response is:
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = localhost, port = 37316
now I know that my server code works outside of the emulator and do some digging and try using Chrome from the emulator and try navigating to 127.0.0.1 and get same error. after some digging I find I should be using 10.0.2.2 ( Special alias to your host loopback interface (i.e., 127.0.0.1 on your development machine)
so I type 10.0.2.2 into emulator chrome and see my IISexpress server. so feeling good but then I change my uri to 10.0.2.2:49912
as my app is listening on port 49912 and get 400 Bad Request - Invalid Hostname
painful
finally figured it out as tried calling my service using 127.0.0.1 from Postman and got the same bad request. turnsout IIS Express is listening on localhost so needs to be convinced to listen on 127.0.0.1 by editing the
applicationhost.config file in the .vs folder in your solution. add the following line <binding protocol="http" bindingInformation="*:49912:127.0.0.1" />
The most possible resolution for the error maybe
Try http://192.168.43.84:49912/api/Account/Register
Instead of http://localhost:49912/api/Account/Register
localhost must be replaced with your system ip address
for getting system ip simply go to cmd and type ipconfig

Issue Connecting to Mac Agent from Windows

I got the following issue while connecting to Mac Agent.
Previously when using Xcode 9.2 i got no such issues but later when updated to Xcode 9.3 the following log was showed.
Getting this error even when the Mac credentials are correct.
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin|Information|0|Xamarin - 4.8.0.760-d15-5+fc93f3f5b
Xamarin.VisualStudio.Activation.AccountManager|Information|0|VS2017 Community
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|No license found for iOS
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|Running license sync for iOS
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|Not logged in, using iOS Community
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|No license found for Android
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|Running license sync for Android
Xamarin.VisualStudio.Activation.ActivationManager|Information|0|Not logged in, using Android Community
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage|Warning|0|Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.Inspector|Information|0|Inspector extension loaded
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.IOS.XamarinIOSPackage|Warning|0|Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|Solution loaded: 'App1'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'F:\Bharath\Project Materials\App1\App1\App1.Android\App1.Android.csproj'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'F:\Bharath\Project Materials\App1\App1\App1.iOS\App1.iOS.csproj'
Xamarin.VisualStudio.Android.ContinuousPlayerDeviceProvider|Information|0|Start()
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from DisconnectedState to ConfiguringState on 192.168.XXX.XX (192.168.XXX.XX)
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking host configuration for connecting to '192.168.XXX.XX'...
Xamarin.Messaging.Ssh.SshCommandRunner|Warning|0|Failed to execute 'grep "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJ0uNVUuKpZY5t3ea5q5JjTFn7AGfrSHeyDGJ0S83Plh05t4neDyk8jtt7WSqFM8FeY31i5N55FaYOnxwRvzcYJxo01PWuudNKtB6L4pk0PxN1cYTG8RqCLw0DM9GVL4cULgENsofpkxCu648qpIbbXl+Bwj7ScP8JV8b9vMFART59iWYlF1iuzFoLt4NE3uX24m7R/W2G9ypxDRHRB5YAAeVXPm9j5BlHzLHaCmIQezJr7T/d0PEr/09IV1CrQ56Q11RPMH7YHXILzHKhmYO+gwEUrgwvYo68/9P7E3nbzCVEikOHIdxAYHjd59Ma7y/u2iicEjfzwXXoMbkhuyZB GD#GD-MacBook-Pro.local" /Users/GD/.ssh/authorized_keys': ExitStatus = 1
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking host configuration for connecting to '192.168.XXX.XX'...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from ConfiguringState to ConfiguredState on 192.168.XXX.XX (192.168.XXX.XX)
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Host '192.168.XXX.XX' is configured correctly
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from ConfiguredState to ConnectingState on 192.168.XXX.XX (192.168.XXX.XX)
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Starting connection to '192.168.XXX.XX'...
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting connection to 192.168.XXX.XX...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Starting connection to '192.168.XXX.XX'...
Xamarin.Messaging.Integration.State.ServerStateContext|Error|0|Unable to authenticate with SSH keys. Please try to log in with credentials first
Xamarin.Messaging.Ssh.Exceptions.MessagingAuthenticationException: Could not authenticate the user 'GD'R with SSH keys. Please check that both $HOME folder and ~/.ssh/authorized_keys have the appropiate permissions to use SSH. More details: Permission denied (publickey). ---> Renci.SshNet.Common.SshAuthenticationException: Permission denied (publickey).
at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
at Renci.SshNet.ConnectionInfo.Authenticate(ISession session, IServiceFactory serviceFactory)
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.Connect()
at Xamarin.Messaging.Ssh.SshMessagingConnection.ConnectSsh(Boolean forwardTcpPort) in C:\d\lanes\5409\fc93f3f5\source\xamarinvs\External\messaging\src\Xamarin.Messaging.Ssh\SshMessagingConnection.cs:line 138
at Xamarin.Messaging.Ssh.MessagingService.<ConnectAsync>d__66.MoveNext() in C:\d\lanes\5409\fc93f3f5\source\xamarinvs\External\messaging\src\Xamarin.Messaging.Ssh\MessagingService.cs:line 225
--- End of inner exception stack trace ---
Xamarin.Messaging.Ssh.SshMessagingConnection|Error|0|An unexpected error occurred with the current SSH Session
Renci.SshNet.Common.SshConnectionException: An established connection was aborted by the server.
at Renci.SshNet.Session.SocketRead(Int32 length, Byte[] buffer)
at Renci.SshNet.Session.ReceiveMessage()
at Renci.SshNet.Session.MessageListener()
You always have to open XCode after you have updated it. It the most case it will install additional components and sometimes you have to accept new terms.

Google Assistant Hotword Detection Not Working

I'm new to Google Assistant SDK. Recently I embedded Assistant to Raspberry Pi 3 B. I used the googlesamples-assistant-hotword sample. It worked fine. But next time I run the command I got some errors. I reinstall the sdk and tried, but got the same error. However googlesamples-assistant-pushtotalk still works. But googlesamples-assistant-hotword gives errors. How can I fix this. The errors I got are as follows;
(env) pi#raspberrypi:~$ googlesamples-assistant-hotword
ON_MUTED_CHANGED:
{u'is_muted': False}
ON_START_FINISHED
E0922 08:01:19.189206804 9868 handshake.c:128] Security handshake failed: {"created":"#1506047479.189164282","description":"Handshake read failed","file":"../../third_party/grpc/src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"#1506047479.189160249","description":"FD shutdown","file":"../../third_party/grpc/src/core/lib/iomgr/ev_epoll_linux.c","file_line":1045}]}
E0922 08:01:20.189959242 9868 handshake.c:128] Security handshake failed: {"created":"#1506047480.189916251","description":"Handshake read failed","file":"../../third_party/grpc/src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"#1506047480.189911706","description":"FD shutdown","file":"../../third_party/grpc/src/core/lib/iomgr/ev_epoll_linux.c","file_line":1045}]}
E0922 08:01:21.190931499 9868 handshake.c:128] Security handshake failed: {"created":"#1506047481.190904069","description":"Handshake read failed","file":"../../third_party/grpc/src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"#1506047481.190900454","description":"FD shutdown","file":"../../third_party/grpc/src/core/lib/iomgr/ev_epoll_linux.c","file_line":1045}]}
[9782:9800:ERROR:speech_recognition_activity.cc(550)] S3 connection has timed out: No data from S3

WebLogic 12.1.2 bad record MAC on HTTPS

I'm trying to use WebLogic with HTTPS default keystore for development and I get the following error when I try to connect to the server via web browser:
ExecuteThread: '0' for queue: 'weblogic.socket.Muxer', fatal: engine already closed. Rethrowing javax.net.ssl.SSLException: bad record MAC
<13-nov-2014 11H48' COT> <Debug> <SecuritySSL> <BEA-000000> <[Thread[ExecuteThread: '0' for queue: 'weblogic.socket.Muxer',5,Thread Group fo
r Queue: 'weblogic.socket.Muxer']]weblogic.security.SSL.jsseadapter: SSLENGINE: Exception occurred during SSLEngine.unwrap(ByteBuffer,ByteBu
ffer[]).
javax.net.ssl.SSLException: bad record MAC
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1605)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1573)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:971)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:876)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:750)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:664)
at weblogic.security.SSL.jsseadapter.JaSSLEngine$5.run(JaSSLEngine.java:134)
at weblogic.security.SSL.jsseadapter.JaSSLEngine.doAction(JaSSLEngine.java:732)
at weblogic.security.SSL.jsseadapter.JaSSLEngine.unwrap(JaSSLEngine.java:132)
at weblogic.socket.JSSEFilterImpl.unwrap(JSSEFilterImpl.java:603)
at weblogic.socket.JSSEFilterImpl.unwrapAndHandleResults(JSSEFilterImpl.java:507)
at weblogic.socket.JSSEFilterImpl.unwrapAndHandleResults(JSSEFilterImpl.java:474)
at weblogic.socket.JSSEFilterImpl.isMessageComplete(JSSEFilterImpl.java:313)
at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:991)
at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:928)
at weblogic.socket.NIOSocketMuxer.process(NIOSocketMuxer.java:507)
at weblogic.socket.NIOSocketMuxer.processSockets(NIOSocketMuxer.java:473)
at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:30)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:43)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:147)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:119)
>
I found some links about this, but nothing important.
Is there any solution for this?
Remove the WebLogic Domain data folder and setup it again. This time I restart the WebLogic server domain after the WebLogic Domain data folder setup and enable the SSL after. Next open the browser with the https address and it work.

Resources