Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Https and open ui > panel empty (no url) #1152

Closed
2 of 10 tasks
MWDavidH opened this issue Jul 25, 2016 · 11 comments
Closed
2 of 10 tasks

Https and open ui > panel empty (no url) #1152

MWDavidH opened this issue Jul 25, 2016 · 11 comments

Comments

@MWDavidH
Copy link

Issue details

how can I have panel and https together ?

I have a problem with '--https' and ' --open ui' option

I can't have them together

Steps to reproduce/test case

run gulp bs

  • '--https' declared before '--open ui'
  • result => I have only https://localhost:3000/app_dev.php/
//== shell :: gulp bs (browsersync)
gulp.task('bs', shell.task([
    'browser-sync start --proxy \
    "https://myvhost" \
    --startPath "app_dev.php/" \
    --https \
    --open ui \
    --files "./web/css/*.css, ./web/js/*.js, app/Resources/views/**/**/**/*.html.twig"'
]));
  • '--https' declared after '--open ui'
  • result => I have only ui panel `http://localhost:3001/ and ui panel is empty
//== shell :: gulp bs (browsersync)
gulp.task('bs', shell.task([
    'browser-sync start --proxy \
    "https://myvhost" \
    --startPath "app_dev.php/" \  
    --open ui \
    --https \
    --files "./web/css/*.css, ./web/js/*.js, app/Resources/views/**/**/**/*.html.twig"'
]));

screenshot_2

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 2.11.1 ]
  • Node [ 5.8.0 ]
  • Npm [ 3.7.3 ]

Affected platforms

  • linux
  • windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

var gulp = require('gulp'), //== https://github.com/gulpjs/gulp    
    shell = require('gulp-shell'), //== https://github.com/sun-zheng-an/gulp-shell

//== shell :: gulp bs (browsersync)
gulp.task('bs', shell.task([
    'browser-sync start --proxy \
    "https://myvhost" \
    --startPath "app_dev.php/" \
    -- https \
    --open ui \
    --files "./web/css/*.css, ./web/js/*.js, app/Resources/views/**/**/**/*.html.twig"'
]));
@mehdivk
Copy link

mehdivk commented Dec 9, 2016

Same problem here. UI doesn't honour https flag and tries to get data from http. This is the error I get in console of my UI:

socket.js:2 GET http://localhost:2017/browser-sync/socket.io/?EIO=3&transport=polling&t=LZXWhlF

Obviously it misses the protocol there.

@MWDavidH
Copy link
Author

MWDavidH commented Dec 9, 2016

@mehdivk Hi, do you use Browsersync CLI too ?

@mehdivk
Copy link

mehdivk commented Dec 10, 2016

@MWDavidH No. I'm using it via Webpack.

@shakyShane
Copy link
Contributor

Thanks all.

This was actually caused by a run-time generated file (that includes socket URLS etc) being cached by the browser.

I've fixed it in browser-sync@2.18.3 - but you'll need to do a 'hard' reload on the UI to get the new resources, from then onwards it will not happen again. 👍

@MWDavidH
Copy link
Author

MWDavidH commented Dec 12, 2016

Hi @shakyShane and thanks for this fix.
I updated to browser-sync 2.18.5, this is OK I need to make a CTRL + R to see the panel UI and to open it manually with http://localhost:3001/, so in CLI the -- open ui doesn't seem to work.
Could you re open the issue ?

@shakyShane
Copy link
Contributor

Did you completely clear your browser cache? Easiest way is to open dev tools, click disable cache & then reload

@MWDavidH
Copy link
Author

Yes i clear my brwoser cache, but I use Gulp shell to open my website and the UI panel, with task gup bs (I describe it in the first issue post).

@MWDavidH
Copy link
Author

@shakyShane I remember there was a Weinre console debug. I can't see it in ui panel, and can't access it with weinre default port 8080 or with url (https://192.168.1.206:8080, or http://192.168.1.206:8080). Do you know where I can find it ?.

screenshot_1

@t-kelly
Copy link

t-kelly commented Aug 24, 2018

👋 I'm experiencing the same problem with v2.24.6.

The Browsersync config is proxying an https site and I'm providing self-signed SSL cert/key. Error I'm getting in the console is:

Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID
polling-xhr.js:264 GET https://10.11.135.255:3000/browser-sync/socket.io/?EIO=3&transport=polling&t=MLie7FQ 0 ()

Could this be something with Chrome blocking self-signed certs?

@enashnash
Copy link

@t-kelly Chrome was refusing my self-signed cert until I added Subject Alternative Name to the certificate so I could run somedomain.local locally.

I'm using 2.24.7 and I experience the same thing in the console with the following configuration:

browserSync({
  useHttps: true,
  https: {
    key: "./tools/cert/host.key",
    cert: "./tools/cert/cert.crt"
  },
  host: "somedomain.local",
  port: 3000,
  open: "external",
  ui: {
    port: 3001
  },
  server: {
    ...
  }
}

For me, the UI will only load over http but I can see from the console that it's requesting https. Here it is just running as localhost:

image

Is something up with my configuration?

@dennisbaum
Copy link

dennisbaum commented Jan 13, 2019

same here with bs 2.26.3, gulp, selfsigned certs and the proxy url is https: the proxied site is running, but all bs-ui-pages are empty. i have emptied the cache and hard reloaded. same behavior in a fresh installed firefox.

image
image
image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants