Comments (9)
Great! Glad I could help.
from meteor-hmr.
Thanks @santiagopuentep for helping out!!
@purplecones, the warning can be safely ignored, there's more about it in https://github.com/gadicc/meteor-hmr/blob/master/docs/Troubleshooting.md#react-issues.
I'm going to re-open this so I can add the workaround to the docs too.
from meteor-hmr.
Add localhost:3002 to your content security policy allowed domains.
BrowserPolicy.content.allowConnectOrigin("ws://localhost:3002/");
if you are using the browser-policy package.
from meteor-hmr.
Thanks @santiagopuentep for pointing that out! I didn't realize this package was added.
I'm using this https://themeteorchef.com/base/ boilerplate as a starting template.
However adding this doesn't seem to do anything:
import { BrowserPolicy } from 'meteor/browser-policy-common';
BrowserPolicy.content.allowConnectOrigin('ws://localhost:3002/');
I also tried BrowserPolicy.content.allowConnectOrigin('http://localhost');
but no change. Error still gets thrown.
from meteor-hmr.
Looking at the heads, this is what the browser sees. Not sure how to read this. Is the browser policy being applied?
content-security-policy:default-src 'self'; script-src 'self' 'unsafe-inline'; connect-src * 'self' http://localhost; img-src data: 'self'; style-src 'self' 'unsafe-inline';
from meteor-hmr.
Maybe with:
BrowserPolicy.content.allowConnectOrigin('http://localhost:3002');
Since you need to add the port too.
from meteor-hmr.
@santiagopuentep still no go even after adding port
import { BrowserPolicy } from 'meteor/browser-policy-common';
BrowserPolicy.content.allowConnectOrigin('http://localhost:3002');
:-(
from meteor-hmr.
This did it
BrowserPolicy.content.allowScriptOrigin('http://localhost:3002');
from meteor-hmr.
I do get this warning but it still works
modules.js?hash=2b7c6c6…:32749 Warning: [react-router] You cannot change <Router routes>; it will be ignoredwarning @ modules.js?hash=2b7c6c6…:32749routerWarning @ modules.js?hash=2b7c6c6…:29386Router_componentWillReceiveProps @ modules.js?hash=2b7c6c6…:30043updateComponent @ modules.js?hash=2b7c6c6…:15353receiveComponent @ modules.js?hash=2b7c6c6…:15285receiveComponent @ modules.js?hash=2b7c6c6…:8466_updateRenderedComponent @ modules.js?hash=2b7c6c6…:15489_performComponentUpdate @ modules.js?hash=2b7c6c6…:15467updateComponent @ modules.js?hash=2b7c6c6…:15386receiveComponent @ modules.js?hash=2b7c6c6…:15285receiveComponent @ modules.js?hash=2b7c6c6…:8466_updateRenderedComponent @ modules.js?hash=2b7c6c6…:15489_performComponentUpdate @ modules.js?hash=2b7c6c6…:15467updateComponent @ modules.js?hash=2b7c6c6…:15386receiveComponent @ modules.js?hash=2b7c6c6…:15285receiveComponent @ modules.js?hash=2b7c6c6…:8466_updateRenderedComponent @ modules.js?hash=2b7c6c6…:15489_performComponentUpdate @ modules.js?hash=2b7c6c6…:15467updateComponent @ modules.js?hash=2b7c6c6…:15386receiveComponent @ modules.js?hash=2b7c6c6…:15285receiveComponent @ modules.js?hash=2b7c6c6…:8466performUpdateIfNecessary @ modules.js?hash=2b7c6c6…:15297performUpdateIfNecessary @ modules.js?hash=2b7c6c6…:8499runBatchedUpdates @ modules.js?hash=2b7c6c6…:8075perform @ modules.js?hash=2b7c6c6…:8846perform @ modules.js?hash=2b7c6c6…:8846perform @ modules.js?hash=2b7c6c6…:8014flushBatchedUpdates @ modules.js?hash=2b7c6c6…:8101closeAll @ modules.js?hash=2b7c6c6…:8912perform @ modules.js?hash=2b7c6c6…:8859batchedUpdates @ modules.js?hash=2b7c6c6…:17152enqueueUpdate @ modules.js?hash=2b7c6c6…:8133enqueueUpdate @ modules.js?hash=2b7c6c6…:15774enqueueElementInternal @ modules.js?hash=2b7c6c6…:15958(anonymous function) @ modules.js?hash=2b7c6c6…:20012scrollMonitor @ modules.js?hash=2b7c6c6…:20000_updateRootComponent @ modules.js?hash=2b7c6c6…:20011_renderSubtreeIntoContainer @ modules.js?hash=2b7c6c6…:20106render @ modules.js?hash=2b7c6c6…:20154renderApp @ index.js:22(anonymous function) @ index.js:35canAccept @ hot.js:207requirersUntil @ hot.js:105requirersUntil @ hot.js:110requirersUntil @ hot.js:110hotWalker @ hot.js:162walkFileTree @ modules-runtime.js?hash=7fef6eb…&hot=1:497walkFileTree @ modules-runtime.js?hash=7fef6eb…&hot=1:501walkFileTree @ modules-runtime.js?hash=7fef6eb…&hot=1:501walkFileTree @ modules-runtime.js?hash=7fef6eb…&hot=1:501meteorInstallHot @ hot.js:159(anonymous function) @ hot.js?hash=015c726…:1
from meteor-hmr.
Related Issues (20)
- Check for NODE_ENV !== 'development' and not NODE_ENV === 'production' HOT 7
- When in package but not app: "Arguments to path.join must be strings"
- Redbox problem HOT 2
- [Windows] [beta.6] .babelrc path error HOT 6
- [Windows] [beta.4] Random websockets error HOT 1
- Not working with Meteor 1.3.3.1 HOT 4
- [2.0.0-beta.6] Wrong file getting hot-reloaded HOT 1
- [2.0.0-beta.6] Getting into an infinite loop
- Uncaught RangeError: Maximum call stack size exceeded
- "No (relevant) hot.accept() in..." (with an incomplete import chain) HOT 10
- Track dynamic require() calls to augment import chain
- Failed to parse SourceMap: http://localhost:3000/packages/f6ecec4bc04452452b12b571877bd3802b84f242.map
- Seems to rely on settings.json when run in Cordova HOT 10
- "Uncaught TypeError: Cannot read property '_collection' of undefined" when run in Cordova
- Path must be a string
- reloading-related WebSock problem stops meteor from booting HOT 1
- Doesn't work with Meteor 1.4.1.2 HOT 27
- Conflict: Constraint [email protected] is not satisfied by babel-runtime 1.0.1. HOT 3
- Info for potential maintainers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-hmr.