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 364 forks source link

SSL #955

Open SaroGFX opened 5 years ago

SaroGFX commented 5 years ago

Problem

Unable to successfully load CSS and JS due to ERR_CERT_AUTHORITY_INVALID. Despite following instructions in to continuously repeat step 2 and 3.

Replication steps

  1. Open new terminal
  2. Copy function ssl-check()
  3. Run ssl-check
  4. Open new terminal in folder
  5. Run yarn start
  6. Open https://localhost:3000/?preview_theme_id=XXXXXXXX
  7. Proceed to site
  8. Multiple ERR_CERT_AUTHORITY_INVALID in console and no CSS loaded
  9. Repeat 1-9
screenshot 2019-01-21 at 20 00 26 screenshot 2019-01-21 at 20 18 44

More Information

Please note that Slate has never worked for me, despite multiple attempts over different versions. Would be very happy to get suggestions on how to problemsolve this, as I am in desperate need for Slate to be working. I get no errors in the terminal.

Let me know if I can provide with more information or if a video is required.

justinmetros commented 5 years ago

I have the same thing going on sometimes and I saw an issue or a post about it a ways ago.

Once slate is watching it will give you some links where its being served at in the terminal feedback.

If you opt+click ( mac ) the External local it will work. I forget why exactly ( not strong on local servers regarding SSL ) but once it sees the external address it works on a refresh.

Also wish there was a little more info on this, but generally hasnt been a problem once I got the hand of just opt-clicking the link on yarn start.

SaroGFX commented 5 years ago

Hi @justinmetros,

Thank you for sharing this. However, when I opt+click on the external link, I get a bunch of weird [[^D code, see image below. It also makes the 'plump' sound a couple of times that indicates an unsuccessful operation. Would it be sensible to try and reinstalling all related software like npm, yarn, slate, mkcert and node.js? And if so, how do I properly delete all of those?

screenshot 2019-01-22 at 10 59 47

I also got this error after waiting a while:

screenshot 2019-01-22 at 11 09 48

^[[A^[[A^[[A^[[A(node:34360) UnhandledPromiseRejectionWarning: Error: read ECONNRESET at TLSWrap.onread (net.js:622:25) (node:34360) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:34360) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

allainna commented 5 years ago

Hi SaroGFX, I have the same issue. Slate has never worked for me either. I'd be happy to hear any updates on this.

ghost commented 5 years ago

FWIW I also had the same issue - I was able to bypass it using @justinmetros's method of clicking the "External" access URL after slate start is finished.

SaroGFX commented 5 years ago

The last update must have addressed this issue, since it is now working for me 👍

One issue that pops up however, is that it only loads the styles from theme.scss but not from theme.scss.liquid. I get the following error in the console:

Refused to apply style from 'https://192.168.1.36:3004/layout.theme.styleLiquid.scss.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

However when I import the .liquid file into the theme.scss file, it does apply those styles. When I add liquid to that file, I get this error in the DOM:

screenshot 2019-02-05 at 00 38 16 screenshot 2019-02-05 at 00 38 25

Is this a completely different issue that requires a new post? Thank you.