-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Font files 500 (Internal Server Error) #1199
Comments
(related to #1103) |
Thank you for reporting this, @anteksiler! I've tried to reproduce this issue by adding different fonts using the theme editor: However, it works in my tests. Are you adding fonts with a different approach? Thanks again for reporting this! |
Hi @karreiro, the fonts are added the same way. I am not sure why it is not working either; it used to work without any issues. I think I updated developer tools, but sure about that either. This is what I am seeing when I visit the font url: |
Updated ruby from 3.1.2 to 3.2.0 and that did not solve it either. |
Thank you for the extra details, @anteksiler! Could you please share the request ID that appears when the Here's how to get it: Also, I'm assuming that fonts are not loading on Thanks again, @anteksiler! |
Hey @karreiro, much appreciated. The request ID is: X-Request-Id: 88b8ac30-db4d-4701-9ce3-be66aaf4981d Yes, theme preview is working correctly. |
After installing Shopify CLI via Alas, Ruby 3.2 includes some breaking changes. I was able to fix this issue in Shopify/shopify-cli#2721, and I hope that it can be released soon. |
Very quick and dirty fix for those on Mac using Homebrew that need it working... Not recommended
I would highly recommend uninstalling this using Happy coding! |
Hi @Poitrin , I noticed that you created the PR in CLI version 2.0. Will it also fix the issue in CLI 3.0? |
Yeah, in the CLI 2.0’s PR, there's a post-release step to use the then latest 2.0 version in 3.0 :) |
### WHY are these changes introduced? Fixes Shopify/cli#1199 Starting with Ruby 3.2 – [Homebrew formula](https://github.com/Shopify/homebrew-shopify/blob/master/shopify-cli.rb) just says `depends_on "ruby"`, so that’s why such kind of issues appear now – `body.join.gsub` raises the error `invalid byte sequence in UTF-8` when `body.join` is a font body (which of course doesn’t contain any URLs or other readable characters). ### WHAT is this pull request doing? 1. Does not call `replace_asset_urls` when path starts with `/fonts`. 2. In case other "non-`gsub`able" strings are being `gsub`ed and the same `ArgumentError` containing the message `invalid byte sequence` is raised, body will simply be returned without any replacements.
Sorry that GitHub closes issues after merging a PR, but I hope that both CLI versions will be released ASAP :) |
Hi everybody, I'm experiencing the same issue using a VS Code development container. // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "Node.js",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",
"features": {
"ghcr.io/devcontainers/features/ruby:1": {}
},
// Use appPort instead of forwardports because development servers isn't available on host otherwise
// See: https://containers.dev/implementors/json_reference/#publishing-vs-forwarding-ports
"appPort": ["0.0.0.0:9292:9292"],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn global add @shopify/cli @shopify/theme && shopify --version",
"extensions": ["Shopify.theme-check-vscode"],
"containerEnv": {
"SHOPIFY_FLAG_STORE": "XXX.myshopify.com"
}
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
} I'm using this command to start the dev server an be able to access it from outside the dev container:
Thanks in advace for your answers! |
Bumping this |
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Fonts should work on 127.0.0.0:9292
Actual behavior
Font files are not loaded on the browser.
Stack trace
No response
Reproduction steps
Operating System
Mac OS Ventura
Shopify CLI version (check your project's
package.json
if you're not sure)3.36.1
Shell
zsh
Node version (run
node -v
if you're not sure)v19.4.0
What language and version are you using in your application?
liquid
The text was updated successfully, but these errors were encountered: