Unable to connect to Websocket from CloudRun - websocket

We have a backend developed with Golang using Fiber (gofiber) and used also Fiber's Websocket middleware.
When trying to connect from a Web client in local (ws://...) it works perfectly. When deploying our server to CloudRun, and trying to connect (ws://...) it returns a 400.
Any idea what I am missing?

WebSockets are currently not supported on Cloud Run fully managed. This is a highly requested feature, but it's not yet implemented.
However, running WebSockets currently works on Cloud Run for Anthos because of its GCE-based native networking layer.

Related

How to deploy socket.io project so that it is served by the same web server as my create-react-app client

I have an existing public-facing create-react-app -based client up and running, and I now want to incorporate socket.io for real-time communication between users.
From all examples and documentation, I see that the socket.io logic needs to be hosted in a separate node.js project. My question is, must this separate node.js project also be public-facing? in other words, must the individual browsers connecting to my React client be able to communicate with the socket.io node.js project?
EDIT: After a better understanding (thanks #jonrsharpe), my question becomes, given the typical example of a React Client (created with create-react-app), and a separate node.js server (in the same repo), like one would find here or here, I'm really failing to understand how this translates into a production deployment?
Especially with #jonrsharpe alluding to the fact that the socket.io endpoints can be incorporated into the web server that is serving up my react app - how do I do that?

How to deploy laravel websocket on GCP Standard App Engine?

I am using laravel 6 and I want to deploy laravel based websocket server using supervisor on google cloud standard app engine platform.
I am using this package:
beyondcode/laravel-websockets
I have setup everything and everything is working fine on local machine!
What is the exact procedure to follow to deploy it on GCP?
At this time, WebSockets are not supported by App Engine Standard. There is work being done with Cloud Run support for WebSockets, so this situation might be changing in the future for App Engine Standard.
Cloud Run WebSockets and gRPC bi-directional streaming support
To use WebSockets today, use App Engine Flexible or switch to another service such as Compute Engine.
Creating Persistent Connections with WebSockets
Google Compute Engine WebSocket Support

Setting up Server Side and Client Side for Google Cloud Messaging

I am trying to make 2 applications which uses Google Cloud Messaging.
My goal is to make a one application Android IBM Worklight which can receive Push notifications (CLIENT-SIDE) and another application a Tomcat Server Java Servlet (SERVER-SIDE).
However, I have absolutely no experience in using Google Cloud Messaging and it is my first time using Android IBM Worklight as client-side.
So I was hoping someone could point me in the right direction that I so could have 1st application using tomcat server sending the Push notifications (SERVER-SIDE) and another application using IBM Worklight as (CLIENT-SIDE) to receive the push notification.
I have been finding tutorials regarding this but I am stuck at implementation.
This tutorial link gave me an idea on how to do server side since i am using tomcat server. However the client-side is code is not what I am looking for since I am using IBM Worklight inside.
Another tutorial link show me how the push notification works at IBM Worklight for both client and server side. However, as mention earlier my server side is Tomcat server at Eclipse thus I think that I can't using this tutorial for server side.
As for client side, I think can use this tutorial since it is IBM Worklight however it is not using Google Cloud Messaging.
I would appreciate someone help me..Thanks :)
The second tutorial has the information you need. If you have your Worklight server set up on Tomcat, just follow the tutorial and deploy the push adapter to that server.

worklight 6.0.0 facebook app fails to call a worklight adapter

we are doing worklight app on a android and a desktopenvironment(for facebook) that works fine on the liberty profile server (developer worklight environment).
Know we need to post this app on Facebook but to do this we need to use the https protocol on our WAS server, to do this we set the ip, port, protocol: to our external server, and deploy our app with build for remote server, but when the app tried to call an adapter on the server, the Firefox console returns us this:
[09:58:50.675] "response [https://[publicIP]:[port]/WorklightPocProj/apps/services/../../invoke] success: /*-secure-
{"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"ih80d8pjg6la8ubccb7503b936"}}}*/"
and
[09:58:50.675] "defaultOptions:onFailure Procedure invocation error."
The application security on our WAS server is disabled and the ip/port are reachable too.
if i add to the XML adapter on the procedures securityTest="wl_unprotected" the app runs correctly, but i don't to do this workaround
Is there any configuration that we are missing on the app or in our WAS server?
A lot of time since this question but just for trying to help people that hit this question because of the search "defaultOptions:onFailure Procedure invocation error".
Also facing this issue in Worklight 6.1
In my case I faced this issue because I had the following configuration in the adapter .xml:
<procedure name="anyMethod"></procedure>
This works in the development server, but in a stand alone server (at least in WAS) you have to change it for:
<procedure name="submitAuthentication" securityTest="wl_unprotected"></procedure>
In both cases it is unprotected.

Spring OAuth2 Provider Client Authentication 401 not authorized error using CloudFoundry as client

This question is primarily for the CloudFoundry developers. Has something changed that would make a client application using spring social unable to use basic client authentication to communicate with my core application hosting an oauth2 provider? When I run the client application on a tomcat server everything works. It also worked on a cloudfoundry microinstance about 2 weeks ago. Now I get a 401 unauthorized error making a call to the service at "../oath/token" on my core application. To see what I am referring to, my application is http://www.metroseattlegamers.com If you click the "Games" link at the top it brings you to a separate application. If you sign in using the application at http://gamerepository.metroseattlegamers.com, the "sign in with metroseattlegamers account" button uses custom spring social code to communicate to my spring oauth2 provider code at http://www.metroseattlegamers.com. That all works fine because it is running on two separate tomcat servers on different machines. However, I tested and wrote everything using cloudfoundry micro instances to run client apps. As I said, it was working about a week or two weeks ago. Now I get a 401 error when I run the client on a cloudfoundry instance. Everything still works great when I run two separate tomcat servers on separate machines. Rather than include a bunch of code, I am just curious if anything has changed with how cloudfoundry microinstances work in the last week or two that may have caused this problem.
No as far as I know. Would it be possible for you to file a ticket at the official support page: http://support.cloudfoundry.com. There you can get a private agent to assist and maybe share the implementation of your app to further debug. You will need to sign in by the account you registered on www.cloudfoundry.com.

Resources