As in rails 5, action cable can be used as a layer above the application to provide persistent connection (WebSocket). So I created an application and tested locally then deployed it to Google AppEngine flexible environment Ruby runtime. the application runs fine except the WebSocket part.
I checked the console in the browser and found that it keeps giving this error:
WebSocket connection to 'ws://mydomain.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 400
Related
I have an instance of Azure Hybrid Connections running on a server where SQL Server is installed.
I hosted an WebApp on azure, set up the hybrid connection and I'm consistently getting the same SSPI Handshake error
SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The operating system error code indicates the cause of failure. The logon attempt failed [CLIENT: 1x.xx.xx.xxx]
As described here I added the clients ip in the local security policy.
I also tried adding the DisableLoopbackCheck=1 in HKLM\System\CurrentControlSet\Control\LSA, but it didn't help either.
Do I have to fix it on a database level perhaps?
As per https://github.com/Huachao/azure-content/blob/master/articles/app-service-web/web-sites-hybrid-connection-connect-on-premises-sql-server.md
[AZURE.NOTE] To ensure that your application uses the database that you created in SQL Server Express, and not the one in Visual Studio's default LocalDB, it is important that you complete this step before running your project.
Edit the connectionStrings section to point to the SQL Server database on your local machine, following the syntax in the following example:
I added user credentials to my connection string in appsettings.json and it now works.
I have a react-native application that was working fine until last week when I started getting this error. Now when I make an https request, I get this error 'Network request failed' on both IOS and android. Whereas when I request using http it works fine.
TypeError: Network request failed
at fetch.umd.js:535:18
at JSTimers.js:250:18
at _callTimer (JSTimers.js:146:7)
at Object.callTimers (JSTimers.js:399:7)
at MessageQueue.__callFunction (MessageQueue.js:436:42)
at MessageQueue.js:111:12
at MessageQueue.__guard (MessageQueue.js:384:9)
at MessageQueue.callFunctionReturnFlushedQueue (MessageQueue.js:110:10)
at debuggerWorker.js:69:58
For testing purpose I have tried to make an https request from same react-native application to the dummy apis available on internet it works fine. Moreover, I have also installed the previous stable version of the application that was working fine before but getting the same error on this as well. So, from that I'm assuming that issue might be from the server end but I've not made any noticeable changes to the server that could make it behave like that.
The strange thing is that the server is not showing any request in the logs coming from the react native application but it works fine when I request it using the postman application.
I've tried every solution that was available on internet but nothing worked. Moreover, I've tried using fetch and axios both to send request but the issue persists.
I have also checked the ssl certificates are installed, valid and trusted. For server I'm using the rails puma along with Nginx server.
Below are the details of the version of my application.
React Native
react-native-cli: 2.0.1
react-native: 0.61.5
Nginx
nginx version: nginx/1.14.0 (Ubuntu)
Rails
Rails 5.2.2.1
ruby 2.6.8p205
puma 3.7
I am new to angular and developed an angular application using angular CLI 7.
When I am running the application from my local system, I am getting the response from the service and it is working fine.
But when I deployed the application in the production server, I am unable to get the response from the service. Service is taking too long to respond and getting the HTTPErrorResponse of status Unknown Error.
We are using the Spring microservices for api calls to get the response data.
I am using the proxy.conf.json for the services because the URL running angular app is different from the service.
proxy.conf.json:
{
"/api/*":{
"target":"http://wsd185erd986.test.com/api",
"secure":false,
"loglevel":debug,
"changeOrigin":true
}
}
Changed the package.json to include the proxy.conf.json in proxyConfig.
Include the response headers in the service.
Could any one know on how to configure these proxy settings in production build for angular. Do we need to include any headers in the service calls.
HTTPErrorResponse - A response that represents an error or failure,
either from a non-successful HTTP status, an error while executing the
request, or some other failure which occurred during the parsing of
the response.
So as per the docs this error is thrown in multiple cases either there is an error at server end and server send the error response or there was some issue in parsing.
Please check the Spring Boot API request logs to see what response code is sent back.
You can check the API by a standalone client too (like Postman) and see if there is some issue.
As an aside - you should not be using angular development server in production as it is meant for angular development. Typically you can use any web server ( like Apache, NGinx etc) to host your angular production files ( they are merely static resources) and then either use them as a proxy ( by having their proxy configuration) or have CORS enabled services.
Im working with Rails 5 and integrate Action cable for chat system, its working fine on local, also working fine in production mode but not working on AWS elastic Beanstalk, please help me to resolve this problem, many thanks.
Following errors has coming:
WebSocket connection to 'ws://dreamermade-staging.qdmpcqqmnw.us-west-2.elasticbeanstalk.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 404
I'm deploying a simple Rails 5 app (https://morseaa.herokuapp.com/) to Heroku and cannot seem to get websockets to function correctly. The app works perfectly fine on local host, but whenever websockets functionality is invoked on the heroku deployment, I get the following error:
WebSocket connection to 'wss://morseaa.herokuapp.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 404