Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 365 forks source link

Slate v0 is not reloading browser after trying Slate V1 #906

Open radmedov opened 5 years ago

radmedov commented 5 years ago

### Problem I was trying to use Slate V1 on an existing project then I was back to Slate v0. But the browsersync doesn't reload the browser anymore.

Any idea why? P.S. I've removed mkcert, yarn and killed HSTS in chrome already.

Thank you.

t-kelly commented 5 years ago

@radmedov can you try viewing you Slate v0 project in a Chrome incognito window? Pretty sure this is because Slate v1 uses https://localhost and not http, which can cause Chrome to default to using https in the future.

radmedov commented 5 years ago

@t-kelly It doesn't work in an incognito mode as well. It's also not working in any browser. Forgot to mention earlier there's no message "BrowserSynce connected" anymore.

I'm getting in the Chrome console:

This site does not have a valid SSL certificate! Without SSL, your site's and visitors' data is vulnerable to theft and tampering. Get a valid SSL certificate before releasing your website to the public.

Firefox's console:

This site makes use of a SHA-1 Certificate; it’s recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.

Strict-Transport-Security: The connection to the site is untrustworthy, so the specified header was ignored.

Mkcert certificate was removed. The browser uses the certificate from the node-modules folder of the project. I've tried to build a new slate v0 project with just slate default theme and it also doesn't reload browser. It seems like the browser wasn't using any certificate from node-modules before I've tried Slate v1. I just have no idea how to force browser not to use any certificate.

Thank you.

t-kelly commented 5 years ago

@radmedov if you're in MacOS, try opening the Keychain Access app and deleting any cert referencing localhost?

image

radmedov commented 5 years ago

@t-kelly, I did removed it immediately I got back to Slate v0. Sorry if I wasn’t clear at the beginning. I did remove all related to the Slate v1, re-install node.

heyjonmanning commented 5 years ago

I feel like I may have something similar to @radmedov happening.

When I run slate theme to create a new theme it creates it based on Slate v1.

Then after it creates the theme, I update the package.json file to use slate-tools 0.13.0, delete the node_modules folder for my project and then run npm install again.

This had worked fine for about a dozen projects until some time around when this issue was opened.

My package.json is as follows:

{
   "name": "project-name",
   "version": "0.0.1",
   "devDependencies": {
      "@shopify/slate-tools": "0.13.0"
   }
}

I should mention that I am able to see the BrowserSync GUI and it shows that my Mac Chrome browser is connected but if I click to reload all or sync, nothing happens though the GUI says that it's complete.

Same results for incognito window and also I've deleted the Keychain Access certificate for localhost.

lizsterine commented 5 years ago

@radmedov Have you been able to fix your issue? I just tried Slate 1 and now my Slate 0 isn't reloading either :( .

radmedov commented 5 years ago

@lizsterine Nope, I gave up forcing it to work. I'm using Slate v1 now for developing from scratch. And Parcel.js and LivePage Chrome extension for fixing existing themes. It's just working fine for that purpose. You can still use Slate v0 + LivePage Extension. Just make sure to set up the poll for updates more than 1500ms.

dmatora commented 4 years ago

You can still use Slate v0 + LivePage Extension. Just make sure to set up the poll for updates more than 1500ms.

OMG! Just tried LivePage Extension and it works with any setup and configuration! Thank you! Tried it without updating poll settings and got temporary ban after about an hour of updates :) image

GuillermoCasanova commented 4 years ago

Ran into this issue a well. I've ended up "solving" it by copy pasting node_modules from a .13 project into a .14 project. And I say "solving" it because I still need to hit CMD + Save a few time before it reloads with the changes.

And this all started happening after trying 1.0.0 beta and slate 0.14.0