3

I am new to meteorJs how to solve the below warning while web page is loading.while i am running meteor js app below warning came into browser console.How to solve this warning please suggest me.

Warning:
The connection to wss://ddp--5346-hcaresample.meteor.com/sockjs/611/6mo4f_7i/websocket was interrupted while the page was loading. @ http://hcaresample.meteor.com/b41c48c8636277a85e3a081bf7c1c8e4c50816d2.js:4
Nareshy
  • 133
  • 1
  • 9
  • 1
    What browser/version are you using? I do not get the warning when I go the page. – sbking Mar 17 '14 at 05:21
  • I am also seeing this error with a recent release, the error is showing in Firefox 33, Meteor version 0.9.4 – Dsyko Oct 20 '14 at 09:34
  • I'm also seeing this - on my live prod/dev/test domains - eg https://www.crowdcourier.cc/ will show I am also running an nginx reverse proxy in front that maps the port 3000 to 443 adding ssl. When I visit http://localhost:3000/ the error disappears. It actually seems a bit intermitant, and in testing just now I started to wonder if service work was involved, as it was only appear just after clicking refresh, but not for initial page load etc. – Tomachi Sep 30 '18 at 08:03

1 Answers1

0

Maybe try setting your policy? Like this:

import { BrowserPolicy } from 'meteor/browser-policy-common';

    let origin = "ddp--5346-hcaresample.meteor.com";
    BrowserPolicy.content.allowConnectOrigin("wss://" + origin);

    origin = "https://" + origin;
    console.log(origin);
    BrowserPolicy.content.allowOriginForAll(origin);
    BrowserPolicy.content.allowEval(origin);
    BrowserPolicy.content.allowInlineScripts(origin);
    BrowserPolicy.content.allowScriptOrigin(origin);
    BrowserPolicy.content.allowImageOrigin(origin);
    BrowserPolicy.content.allowConnectOrigin(origin);
Tomachi
  • 1,665
  • 1
  • 13
  • 15