Skip to content
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

Some times the browser get stuck in the error view #11378

Closed
bep opened this issue Aug 23, 2023 · 5 comments · Fixed by #12981
Closed

Some times the browser get stuck in the error view #11378

bep opened this issue Aug 23, 2023 · 5 comments · Fixed by #12981

Comments

@bep
Copy link
Member

bep commented Aug 23, 2023

I'm not sure when it happens, but it's annoying as it requires a restart. I have seen this while editing CSS files built with Tailwind. Not sure what, but I need to fix it.

@bep bep added the Bug label Aug 23, 2023
@bep bep added this to the v0.118.0 milestone Aug 23, 2023
@bep bep self-assigned this Aug 23, 2023
@bep bep changed the title Some times the server get stuck in the error console Some times the browser get stuck in the error view Aug 23, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 4, 2023
@simonheimlicher
Copy link

simonheimlicher commented Oct 11, 2023

For what it's worth, this issue has led me to go back to v0.111.3 for the time being.

This leads me to suspect the change that introduced issue 11313 back in v0.112.0.

Please let me know if I can assist with a minimum viable example.

@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
@saikadaramakaisosjupita
Copy link

I have noticed this issue very consistently for a long time, even with new sites. But I also use Tailwind, so that must be it!

@joaormatos
Copy link

joaormatos commented Oct 23, 2024

This can be quite annoying when getting started with Hugo and routinely* breaking things in the frontmatter.

For now I'm using this expect script as a workaround.
I still have to manually reload the page in the web browser, though...

#!/usr/bin/expect

set command [list hugo server -D]
set string_to_look_for "unmarshal failed: toml:"
# Disable input timeout
set timeout -1

while {1} {

    puts "Starting the process."
    spawn {*}$command

    expect {
        -re $string_to_look_for {
            puts "Restarting the process..."
            exec kill [exp_pid]
            close
        }
        eof {
            puts "Process exited. Restarting..."
        }
    }

    sleep 1
}

Usage:

  1. Save this script to hugo_server.exp, next to your hugo.toml
  2. chmod +x hugo_server.exp
  3. ./hugo_server.exp

* Especially because I set my editor to autosave when I stop typing.

@bep bep modified the milestones: v0.125.0, v0.137.0, v0.138.0 Oct 23, 2024
@bep
Copy link
Member Author

bep commented Oct 23, 2024

Thanks for the heads up, I will fix this in the next Hugo release.

bep added a commit that referenced this issue Oct 24, 2024
Also clean up the error handlingin the commands package.

Fixes #11378
bep added a commit that referenced this issue Oct 24, 2024
bep added a commit that referenced this issue Oct 24, 2024
bep added a commit that referenced this issue Oct 24, 2024
bep added a commit that referenced this issue Oct 24, 2024
bep added a commit that referenced this issue Oct 24, 2024
@bep bep closed this as completed in cb6e27b Oct 24, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants