north / generator-style-prototype

Yeoman Generator for Style Prototypes
362 stars 49 forks source link

Development IP address fails in Google Chrome (somewhat intermittent performance in other browsers) #62

Open joetower opened 9 years ago

joetower commented 9 years ago

After heavy, daily, use of Style Prototypes for the past month I've noticed one use-prohibitive quirk that I'm trying to troubleshoot. This issue has to do with the rendering of the dev environment (generated components/layouts) and its IP address upon running the gulp task.

I've found that Style Prototypes runs consistently, without error, in Firefox and Safari. Chrome, for whatever reason seems to hit a wall and stop rendering all Style Prototype components within the main ng-view markup. I don't know a lot about Node or Yeoman (Style Prototypes is first exposure), nor do I have any clue how all this magical stuff works -- so please view this issue with that picture framed in mind.

Console error:

SyntaxError: Unexpected end of input
    at Object.parse (native)
    at Object.B [as fromJson] (http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:1:4752)
    at Object.f [as get] (http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:4:18842)
    at Object.<anonymous> (http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:5:1177)
    at Object.r [as invoke] (http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:1:16420)
    at http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:1:16948
    at n (http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:1:16100)
    at r (http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:1:16385)
    at Object.i [as instantiate] (http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:1:16532)
    at http://192.168.2.10:3002/bower_components/style-prototype/dist/style-prototype.js:2:908 <main ng-view="" class="ng-scope"> 

Screenshots - chrome vs firefox

chrome-vs-ff

Output after running

yo --version && echo $PATH $NODE_PATH && node -e 'console.log(process.platform, process.versions)' && cat Gulpfile.js

darwin { http_parser: '1.0',
node: '0.10.26',
v8: '3.14.5.9',
ares: '1.9.0-DEV',
uv: '0.10.25',
zlib: '1.2.3',
modules: '11',
openssl: '1.0.1e' }
'use strict';

var gulp = require('gulp');
require('gulp-style-prototype')(gulp);%

My system:

I do not receive any JSHint errors in my terminal window, or any other visible build-related errors outside of the above Chrome-specific console error. Firefox and Safari do not throw the same console errors - or any error at all. My uneducated guess wonders if it's Angular-related? Or maybe BrowserSync versus Chrome?

I have successfully ran Style Prototypes outside of my home ethernet connection and typical BrowserSync IP server address -- as I received a new/different BrowserSync IP address and Style Prototypes has run smoothly in Chrome for a period of time (maybe 10 minutes - at worst-case) and then will no longer render component content in Chrome.