themekit icon indicating copy to clipboard operation
themekit copied to clipboard

Protocol ERROR

Open tanema opened this issue 6 years ago • 27 comments

Describe the bug reported in https://github.com/Shopify/themekit/issues/631

REPORT

I'm having this issue all of a sudden. I've been working for a week with my theme. All of a sudden tonight while using theme watch I refreshed and suddenly theme when nuts. Now my theme is borked, and totally using wrong theme settings. I can't upload.

  1. I've tried creating a new theme entirely with theme deploy. No dice.
  2. I've tried deleting all the theme files on the server, but no go.

I'm not going to lie I'm kind of freaking out. I even rolled back to a few version of my theme in git and no dice. Any ideas?

I adjusted the timeout to 10min. Still the same errors. I just tried it on different ISPs. I don't have any proxy installed. Additionally the files it complains about if I upload them with theme deploy on just the individual file it's fine. But I can't upload or fix my theme. Something about assets.json seems bad on shopify's servers.

Screen Shot 2019-08-07 at 12 37 41 AM

Here you can take a look. My theme is totally borked. It's using the wrong style, colors, and has a whole bunch of modules I normally don't have. https://0gu1633t8wuopedl-14175736.shopifypreview.com/

When I go into the shopify admin it claims some file I've never edited is broken. (I checked git history)

Screen Shot 2019-08-07 at 12 41 14 AM Screen Shot 2019-08-07 at 12 42 08 AM

Thanks for any help!

FOLLOW UP

I've restarted. Tried an entirely different computer with a new checked out version of my theme @tanema

The issues started around 12:30am at Shopify. They aren't fixed still. It's def on Shopify's servers as the same thing is happening on a new computer with a brand new checked out copy.

I consider myself a decent developer, and have no idea hoaw to proceed. I even tried looking for the assets.json file to delete.

Any of those protocol error files above if I manually deploy them it works fine deploy assets/cervical-leadin-page-6.jpg works. So it's not the file

cc @ckizer

tanema avatar Aug 07 '19 19:08 tanema

I have tracked this in shopify logs and see successful requests for these assets. I have had a look around and have seen this in relation to working within docker. @ckizer can you pleast tell me what version of themekit you are running, what OS you are running and what editor you are using?

tanema avatar Aug 07 '19 19:08 tanema

I don't have docker installed right now.

    1. Visual Studio Code
    1. ThemeKit 1.0.1 darwin/amd64
    1. No Docker installed
    1. MacOS Catalina Beta (it's been working with the themekit for several weeks without any issues). The issue started at about 11:33am last night when I went to refresh a preview page link. Not even when I was uploading files. I restarted thinking maybe the theme command line tool was broken.

ckizer avatar Aug 07 '19 19:08 ckizer

If it's useful, I invited you to the github repository of the theme. You can look back at around 11:30PM PST and see the commits I did before the error started happening.

https://github.com/ckizer/lofty-sleep-theme

ckizer avatar Aug 07 '19 19:08 ckizer

@tanema After a restart entirely new errors:

[development] 96|234 [===============================>----------------------------------------------]  41 %
[development] (assets/application.sass) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (templates/page.contact.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (templates/customers/addresses.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (sections/home-featured-video.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (snippets/article-list-item.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (sections/pxs-map.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (assets/icon-facebook.svg) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (assets/icon-quote.svg) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (templates/product.cervical.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (assets/Sailec-Bold.woff2) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (sections/home-image-with-text.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (assets/application.scss) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (assets/bg-sleep-happy.jpg) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (snippets/navlist.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (sections/page-collections-list.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (snippets/meganav.liquid) Exceeded 2 calls per second for api client. Reduce request rates to resume uninterrupted service.
[development] (assets/hero-homepage.jpg) Exceeded 2 calls

ckizer avatar Aug 07 '19 19:08 ckizer

Is this because I was using theme watch for a good 30 hours while coding?

ckizer avatar Aug 07 '19 20:08 ckizer

Thanks, no that is my fault, I was uploading a test theme using your private app so that I could test your scenario however I am not having problems. I am still investigating. You should be able to upload smoothly again in a few moments

tanema avatar Aug 07 '19 20:08 tanema

It always seems to get about 30% done, then hang. I set the timeout to 2000s thinking that might fix it. I've have pretty fast upstream so I don't think it's actually timing out. Files are max about 3.2MB

[development] 79|234 [=========================>----------------------------------------------------] 34 % [development] (assets/thin-leadin-page-8.jpg) Put https://cradle-me.myshopify.com/admin/themes/74945298535/assets.json: stream error: stream ID 129; PROTOCOL_ERROR

ckizer avatar Aug 07 '19 20:08 ckizer

Also as a note this should not have anything to do with the changes you have made to your theme but it does seem like something is happening with your connection.

Can you follow the debugging guide here: https://github.com/Shopify/themekit/blob/master/.github/CONTRIBUTING.md#debugging-requests and send me the dump file afterward [email protected] Hopefully I can gain some more insight into what is happening with your connection.

tanema avatar Aug 07 '19 20:08 tanema

Okay @ckizer I have a suspicion and have deployed an update with a patch in it. Please try it out by running theme update --version=v1.0.2-issue659

tanema avatar Aug 07 '19 20:08 tanema

@tanema I'm running a deploy with the new version right now. 🤞🏻. Writing up an email with the themekit_dump file right now. 22MB Uploading themekit_dump.zip…

It got about 40% done then these errors

➜  lofty-sleep-theme git:(master) ✗ theme deploy
[development] 97|234 [===============================>----------------------------------------------]  41 %
[development] (assets/thin-leadin-page-5.jpg) Put https://cradle-me.myshopify.com/admin/themes/74945298535/assets.json: stream error: stream ID 187; PROTOCOL_ERROR
[development] (assets/slider-boomerang-1.jpg) received a malformed response from shopify, this usually indicates a problem with your connection
[development] (assets/thin-leadin-page-2.jpg) Put https://cradle-me.myshopify.com/admin/themes/74945298535/assets.json: stream error: stream ID 193; PROTOCOL_ERROR
[development] (assets/thin-leadin-page-6.jpg) received a malformed response from shopify, this usually indicates a problem with your connection
[development] (assets/about-quality.jpg) Put https://cradle-me.myshopify.com/admin/themes/74945298535/assets.json: stream error: stream ID 191; PROTOCOL_ERROR

ckizer avatar Aug 07 '19 20:08 ckizer

Here's the dump file prior to upgrading to v1.0.2 https://www.dropbox.com/s/eq7a9w4f01dlsrn/themekit_dump.zip?dl=0

ckizer avatar Aug 07 '19 20:08 ckizer

After updating to v1.0.2 It still reports as ThemeKit 1.0.1 darwin/amd64 I assume it updated fine though. No issues were reported with the update.

ckizer avatar Aug 07 '19 20:08 ckizer

Interesting enough if I go to index.liquid and add some html test change and run theme watch it doesn't seem to notice that I made the change anymore.

ckizer avatar Aug 07 '19 20:08 ckizer

Yeah, that version is expected. I am not sure why it would not pick up changes since that part has not changed since 1.0.1

tanema avatar Aug 07 '19 21:08 tanema

New error when running deploy

New schema is incompatible with the current setting value. Invalid type value for block 'footer-1'. Type must be defined in schema.New schema is incompatible with the current setting value. Invalid type value for block 'footer-3'. Type must be defined in schema.New sch

ckizer avatar Aug 07 '19 21:08 ckizer

Those are validation errors coming from shopify and they are good things to see. That means that your themekit is working again but your configuration may have been corrupted or is out of date.

tanema avatar Aug 07 '19 21:08 tanema

Tim:

That's good. I can just delete these?: settings_data.json settings_schema.json

On Wed, Aug 7, 2019 at 2:11 PM Tim Anema [email protected] wrote:

Those are validation errors coming from shopify and they are good things to see. That means that your themekit is working again but your configuration may have been corrupted or is out of date.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Shopify/themekit/issues/659?email_source=notifications&email_token=AABOZ6X4QA4S7VAR7YO6ZZTQDM27RA5CNFSM4IKDVOY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZXCCI#issuecomment-519270665, or mute the thread https://github.com/notifications/unsubscribe-auth/AABOZ6UVNIMGPBTTCOKHG43QDM27RANCNFSM4IKDVOYQ .

ckizer avatar Aug 07 '19 21:08 ckizer

After deleting those it seems to get stuck again on random files: [development] 96|389 [==================>-----------------------------------------------------------] 25 % [development] (assets/pillow-8542 2.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 153; PROTOCOL_ERROR [development] (assets/cervical-leadin-page-7.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 155; PROTOCOL_ERROR [development] (assets/about-lofty.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 165; PROTOCOL_ERROR

[development] 76|389 [==============>---------------------------------------------------------------] 20 %

[development] (assets/pillow-8542 2.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 153; PROTOCOL_ERROR

[development] (assets/cervical-leadin-page-7.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 155; PROTOCOL_ERROR

[development] (assets/about-lofty.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 165; PROTOCOL_ERROR

On Wed, Aug 7, 2019 at 2:12 PM Court Kizer [email protected] wrote:

Tim:

That's good. I can just delete these?: settings_data.json settings_schema.json

On Wed, Aug 7, 2019 at 2:11 PM Tim Anema [email protected] wrote:

Those are validation errors coming from shopify and they are good things to see. That means that your themekit is working again but your configuration may have been corrupted or is out of date.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Shopify/themekit/issues/659?email_source=notifications&email_token=AABOZ6X4QA4S7VAR7YO6ZZTQDM27RA5CNFSM4IKDVOY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZXCCI#issuecomment-519270665, or mute the thread https://github.com/notifications/unsubscribe-auth/AABOZ6UVNIMGPBTTCOKHG43QDM27RANCNFSM4IKDVOYQ .

ckizer avatar Aug 07 '19 21:08 ckizer

Interesting enough now it's this: https://y0mt79xea725i4qt-14175736.shopifypreview.com

Which is an entirely different theme (My active theme in production)

On Wed, Aug 7, 2019 at 2:15 PM Court Kizer [email protected] wrote:

After deleting those it seems to get stuck again on random files: [development] 96|389 [==================>-----------------------------------------------------------] 25 % [development] (assets/pillow-8542 2.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 153; PROTOCOL_ERROR [development] (assets/cervical-leadin-page-7.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 155; PROTOCOL_ERROR [development] (assets/about-lofty.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 165; PROTOCOL_ERROR

[development] 76|389 [==============>---------------------------------------------------------------] 20 %

[development] (assets/pillow-8542 2.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 153; PROTOCOL_ERROR

[development] (assets/cervical-leadin-page-7.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 155; PROTOCOL_ERROR

[development] (assets/about-lofty.jpg) Put https://cradle-me.myshopify.com/admin/themes/74440605799/assets.json: stream error: stream ID 165; PROTOCOL_ERROR

On Wed, Aug 7, 2019 at 2:12 PM Court Kizer [email protected] wrote:

Tim:

That's good. I can just delete these?: settings_data.json settings_schema.json

On Wed, Aug 7, 2019 at 2:11 PM Tim Anema [email protected] wrote:

Those are validation errors coming from shopify and they are good things to see. That means that your themekit is working again but your configuration may have been corrupted or is out of date.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Shopify/themekit/issues/659?email_source=notifications&email_token=AABOZ6X4QA4S7VAR7YO6ZZTQDM27RA5CNFSM4IKDVOY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZXCCI#issuecomment-519270665, or mute the thread https://github.com/notifications/unsubscribe-auth/AABOZ6UVNIMGPBTTCOKHG43QDM27RANCNFSM4IKDVOYQ .

ckizer avatar Aug 07 '19 21:08 ckizer

Can you also try a new theme. settings_data.json and settings_schema.json are important files but you should rarely have to touch them. If you deploy and they are not there, themekit will try to delete them from your store which wont work. If you dont want those files around you should add them to your ignores list in your config.

tanema avatar Aug 07 '19 21:08 tanema

I tried deploying each part of the theme manually to see if I could determine what it hangs on. When I try to upload folders it seems to work. When I try to upload an individual file like config.yml it just stays at zero %

➜ ~ cd /Users/ckizer/Desktop/Pixel\ Union\ Pacific
Theme/lofty-sleep-theme ➜ lofty-sleep-theme git:(stash) theme deploy /templates [development] 28|28 [===================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy /snippets [development] 42|42 [===================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy /sections [development] 26|26 [===================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy README.md [development] 0|1565212991 [------------------------------------------------------------------------------] 0 % ^C ➜ lofty-sleep-theme git:(stash) theme deploy README.md [development] 0|1565213049 [------------------------------------------------------------------------------] 0 % ^C ➜ lofty-sleep-theme git:(stash) theme deploy /locales [development] 1|1 [==============================================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy /layout [development] 1|1 [==============================================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy /config [development] 2|2 [==============================================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy config.yml [development] 0|1565213140 [------------------------------------------------------------------------------] 0 %

On Wed, Aug 7, 2019 at 2:23 PM Tim Anema [email protected] wrote:

Can you also try a new theme. settings_data.json and settings_schema.json are important files but you should rarely have to touch them. If you deploy and they are not there, themekit will try to delete them from your store which wont work. If you dont want those files around you should add them to your ignores list in your config.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Shopify/themekit/issues/659?email_source=notifications&email_token=AABOZ6WRVDQCG7IKJKCSGGLQDM4MTA5CNFSM4IKDVOY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZX56A#issuecomment-519274232, or mute the thread https://github.com/notifications/unsubscribe-auth/AABOZ6RBSS23FED6VKTVW33QDM4MTANCNFSM4IKDVOYQ .

ckizer avatar Aug 07 '19 21:08 ckizer

If I try theme deploy /assets it almost finishes but not quite [development] 128|129 [============================================================================>-] 99 % [development] (assets/cervical-leadin-page-9.jpg) Put https://cradle-me.myshopify.com/admin/themes/74945298535/assets.json: stream error: stream ID 75; PROTOCOL_ERROR

[development] 128|129 [============================================================================>-] 99 %

[development] (assets/cervical-leadin-page-9.jpg) Put https://cradle-me.myshopify.com/admin/themes/74945298535/assets.json: stream error: stream ID 75; PROTOCOL_ERROR

On Wed, Aug 7, 2019 at 2:27 PM Court Kizer [email protected] wrote:

I tried deploying each part of the theme manually to see if I could determine what it hangs on. When I try to upload folders it seems to work. When I try to upload an individual file like config.yml it just stays at zero %

➜ ~ cd /Users/ckizer/Desktop/Pixel\ Union\ Pacific
Theme/lofty-sleep-theme ➜ lofty-sleep-theme git:(stash) theme deploy /templates [development] 28|28 [===================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy /snippets [development] 42|42 [===================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy /sections [development] 26|26 [===================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy README.md [development] 0|1565212991 [------------------------------------------------------------------------------] 0 % ^C ➜ lofty-sleep-theme git:(stash) theme deploy README.md [development] 0|1565213049 [------------------------------------------------------------------------------] 0 % ^C ➜ lofty-sleep-theme git:(stash) theme deploy /locales [development] 1|1 [==============================================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy /layout [development] 1|1 [==============================================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy /config [development] 2|2 [==============================================================================] 100 % ➜ lofty-sleep-theme git:(stash) theme deploy config.yml [development] 0|1565213140 [------------------------------------------------------------------------------] 0 %

On Wed, Aug 7, 2019 at 2:23 PM Tim Anema [email protected] wrote:

Can you also try a new theme. settings_data.json and settings_schema.json are important files but you should rarely have to touch them. If you deploy and they are not there, themekit will try to delete them from your store which wont work. If you dont want those files around you should add them to your ignores list in your config.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Shopify/themekit/issues/659?email_source=notifications&email_token=AABOZ6WRVDQCG7IKJKCSGGLQDM4MTA5CNFSM4IKDVOY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZX56A#issuecomment-519274232, or mute the thread https://github.com/notifications/unsubscribe-auth/AABOZ6RBSS23FED6VKTVW33QDM4MTANCNFSM4IKDVOYQ .

ckizer avatar Aug 07 '19 21:08 ckizer

In an entirely new folder, with a new theme from Pacific Union I did the following: theme new -p=*** -s=cradle-me.myshopify.com --name="Test Theme"

It completed successfully.

ckizer avatar Aug 07 '19 21:08 ckizer

If I do my deploy one folder at a time like this

theme deploy /snippets
theme deploy /templates
theme deploy /sections
theme deploy /locales
theme deploy /layout
theme deploy /assets

No issues. (it does take an exceptionally long time on /assets)

If I do theme deploy it seems to start having errors when it gets to the /assets folder.

After a manual deploy of each folder separately it seems like theme watch is able to keep up as long as I don't swap out the entire /assets folder at once.

ckizer avatar Aug 07 '19 23:08 ckizer

@tanema I think I know what's causing it. Animated gifs. Hmm. Even with high timeout it seems to have some trouble there. I did get one to upload. Scratching my head at this point.

Something about the gif file format?

➜ new-theme git:(master) ✗ theme deploy /assets/mosaic-animated-pillow.gif [development] 0|1 [------------------------------------------------------------------------------] 0 % ^C

ckizer avatar Aug 08 '19 07:08 ckizer

A small bit of information is that it seems like it only happens on large items that are 2mb or larger.

tanema avatar Aug 08 '19 19:08 tanema

Resurecting this issue, because I believe this might have been an issue on past Go versions on how they handle http2. Does this problem still arise?

tanema avatar Nov 19 '20 16:11 tanema