BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.17k stars 756 forks source link

Browser-sync trying to access https from a http server over proxy #566

Open sevenfoxes opened 9 years ago

sevenfoxes commented 9 years ago

I saw a very similar issue to this but the answer didn't work for me. Mainly because my server is http, not https.

Sorry for the million and a half edits, but I forgot to mention this is Chrome only!

Screenshot

screen shot 2015-04-09 at 2 02 30 pm

Stats

here's the gulpfile

var gulp        = require('gulp');
var browserSync = require('browser-sync');
var jest        = require('jest-cli');
var p           = require('./package.json');

gulp.task('test', function(done) {
  jest.runCLI({ config: p.jest}, '.', function(){
    done();
  });
});

var bsConfig = {
   files: [
    "app/assets/javascripts/**/*",
    "app/views/**/*",
    ".local_gems/theme/app/assets/javascripts/**/*",
    ".local_gems/theme/app/views/**/*"
  ],
   proxy: "http://app.lvh.me:3000",
   startPath: "/login",
   ghostMode: true,
   notify: true,
   port: 8000,
   open: false,
   ui: {
    port: 8011,
    weinre: {
        port: 8012
    }
  }
};
var reload      = browserSync.reload;

gulp.task('browser-sync', function() {
    browserSync(bsConfig);
    gulp.watch("app/assets/stylesheets/**/*", ['sass']);
    gulp.watch(".local_gems/theme/app/assets/stylesheets/**/*", ['sass']);
    // gulp.watch(p.jest.rootDir + '/**/*.jsx', ['test']);
});

gulp.task('sass', function () {
  browserSync.reload(
    'applicationV2.css',
    'application.css'
  );
});

gulp.task('bs-reload', function () {
    browserSync.reload();
});

gulp.task('default', ['browser-sync']);
claus commented 9 years ago

I'm seeing exactly the same issue. I also see it in Safari (8.0.7) and Firefox (39) though.

sevenfoxes commented 9 years ago

you know, I haven't seen this for a long time. Just stopped happening.

claus commented 9 years ago

It started happening after i updated from browser-sync 2.7.2 to 2.7.13, and it seems to be intermittent.