Websocket handshake error with MeteorJS App on Modulus - meteor

The case is, I have a MeteorJS app deployed on modulus.
When using the Modulus URL e.g. "myapp-12312.onmodulus.net" everything is working fine.
BUT when using a Custom Domain and access the app via "myapp.mydomain.com" (configured in my DNS) I get the following error message:
"Error during WebSocket handshake: Unexpected response code: 400"
Anyone had the same problem with MeteorJS and domains?
kind regards

I had the same problem and got a SSL certificate for my domain, as suggested in this post.
Everything is working fine now.

Related

Error: Callback for provider type credentials not supported

So I have my Next.JS app hosting on Lightsail with Nginx proxy, I've just done setupping the domain for my app and it's already online. Somehow when I try to log in it's giving me an error saying "Error: Callback for provider type credentials not supported"
But it works when I try to open and log in with the public IP. I guess it's something wrong with the Nginx configuration but I'm not sure which one. Maybe someone can help me with this issue?
I tried to create a custom server from Next.JS and already tried to change some Nginx configuration but it still doesn't work

Rest api returns error 403 while calling from Wordpress but works in postman

I have one server on which Apache and Tomcat both are installed to run my Wordpress and Java application respectively. Both are on same ip address and using same domain https://www.example.com only port number is different.
Wordpress is running on default port while Tomcat is runing on 8443.
A rest api on Tomcat https://www.example.com:8443/myApi.html is working fine from postman, but when calling from wordpress using ajax, it returns error 403 forbidden response.
I am stuck on searching its solution but failed.
Please help me out to solve this issue.
Thanks
You cannot use a different port, even when using the same domain. This breaks the Same origin policy.You can however use JSONP if you have access to both the daemon and the requesting site. If data needs to be returned, then the daemon needs to support a callback query parameter and return it properly formatted.
please see 1) https://stackoverflow.com/a/2099771
https://stackoverflow.com/a/2099784

Validating link in post-inspector linkedin in gives server error

When i try to validate the following page in the post inspector: https://www.cicomcopier.nl/nieuws/cicom-copier-levert-bijdrage-aan-de-ontwikkeling-en-realisatie-van-bellenschermen-tegen-verzilting-a-dam-rijnkanaal-en-noordzeekanaal/
I get the error: We encountered a server error while trying to inspect the URL.
and on the URL redirect trail i get: 0 undefined
I have no idea where to start debug this, is this a error on our side or linkedin side?
when i debug the URL using the facebook graph debugger everything seems to be right.
The problem in the end was the server from where I did the request wasn't setup correctly. Because from my side the site had a ssl installed and needed to do a ssl handshake with the LinkedIn server.
LinkedIn is made in java, and java has a more strict policy in validating the handshake. Because from my server setting the hostname for the ssl was not communicated correctly to LinkedIn there server did not validate the ssl and therefore could not connect to our server and receive a response. This ending in a unknown error on LinkedIn end of the site.

SignalR not working with Windows-integrated authentication

I have an ASP.NET MVC 4 app (.NET 4.5) and SIgnalR works fine with forms-based authentication (hosted via IIS/IIS Express)
As soon as I change the app to windows-integrated authentication (<authentication mode="Windows"/> in "web.config") it stops working.
jquery.signalR-2.2.2.min.js:9 WebSocket connection to ws://localhost:51030/signalr/connect?transport=webSockets&blhablahblah failed: Error during WebSocket handshake: Unexpected response code: 403
After adding the [Authorize] attribute to my hub, the error changes to
WebSocket connection to ws://localhost:51030/signalr/connect?transport=webSocketsblahblah failed: HTTP Authentication failed; no valid credentials available
Other parts of the app are working just fine, windows-auth is enabled on the server and works, etc. etc.
How do I solve this?
And if it is unsolvable for some reason (it could be Chrome not supporting windows auth on websocket connections or something else) - why doesn't it fall back to non-websocket protocol? and how do I force the fallback?
UPDATE: I created a github issue https://github.com/SignalR/SignalR/issues/3953. The problem is not that I can't connect. The problem is that I cannot handle the error to fall back to another transport. Neither .fail() not .error() are being invoked. Try-catch doesn't help either.
Update from 2020: looks like Chrome now supports NTLM on WS-connections, not an issue any more
...10 hours later after asking the question...
Partially solved (answering my own question)
After playing with it I can confirm, that adding the [Authorize] attribute to my hub (or alternatively, adding GlobalHost.HubPipeline.RequireAuthentication(); to your "Startup.cs") actually does help. It does fall back now to an alternative transport, even though the error is still thrown into the browser's console.
You can also specify which transport it falls back to, by calling:
$.connection.hub.start( { transport: ['webSockets', 'longPolling'] });
in case you don't like the default priority (I guess, "hidden iframe" is the default second option).
The reason
The error is caused by Chrome, it does not support NTLM on websocket connections. Funny enough, IE, MS Edge and Firefox do support it ("Chrome is the new IE" huh).
There's an open issue in Chromium bugtracker for this here https://bugs.chromium.org/p/chromium/issues/detail?id=423609 if anyone wants to add any input to Chromium devs.
I too was experiencing this error, but only when developing locally using http; I think Chrome doesn't like unsecured ws:// connections. Once I deployed to server with secure https connection, the WebSocket connection was upgraded to wss://, and Chrome stopped complaining, worked fine with WebSockets--didn't have to fall back to other transport.
tl:dr; Make sure to use https for your site.

Content Encoding Error when connecting to LinkedIn oAuth

I have configured 2 providers and used the FOS-Oauth-Bridge. FB works just fine, but when I try connecting to LinkedIn, the browser shows the message
Content Encoding Error
The page you are trying to view cannot be shown because it uses an
invalid or unsupported form of compression.
Please contact the website owners to inform them of this problem.
I tried decoding the generated URL and that seems fine to:
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=077-dd7c-4815-aea0-8c31e0ce7&scope=r_fullprofile&state=eecd50f81e6ad3e7e23cc11ec50d4768&redirect_uri=http%3A%2F%2Fsf2test.dv%2Fapp_dev.php%2Fsec_area%2Flogin%2Fcheck-linkedin
I tried changing the redirect URL to 127.0.0.1, changing the port to 8X but nothing works
I do not have SSL installed on my Windows / Apache
When I manually change the LinkedIn URL to HTTP (instead of HTTPS), I get this message
Request denied
**Request denied**
Sorry, we are unable to serve your request at this time due to unusual traffic from your network connection.
Reason codes:
3,2,19
Can someone help me figure out the problem?

Resources