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

Sometimes "hyperglass build-ui" fails #60

Closed
forkwhilefork opened this issue Jul 16, 2020 · 2 comments
Closed

Sometimes "hyperglass build-ui" fails #60

forkwhilefork opened this issue Jul 16, 2020 · 2 comments
Assignees
Labels
possible-bug Something isn't working

Comments

@forkwhilefork
Copy link

Bug Description

Sometimes, when I run hyperglass build-ui, it fails. Then I run it again and it succeeds.

Expected behavior

I expect this not to fail, but sometimes it does.

Steps to Reproduce

Make a configuration change and then run hyperglass build-ui.

Local Configurations

I can add this if you want but I don't think it's relevant here.

Logs

(The shell is "bash-4.2" because I su to the hyperglass user to run this command, otherwise the permissions get messed up. It does the same thing as root though.)

bash-4.2$ /usr/local/bin/hyperglass build-ui
[INFO] 20200716 12:22:00 | hyperglass.configuration:43 | <module> → Configuration directory: /etc/hyperglass
Starting new UI build...
[INFO] 20200716 12:22:00 | hyperglass.util:654 | build_frontend → Starting UI build...
❌ Error building UI:
Messages:
> using build directory: /usr/local/lib/python3.6/site-packages/hyperglass/ui/.next
  copying "static build" directory
> No "exportPathMap" found in "next.config.js". Generating map from "./pages"
  launching 1 workers
Exporting (0/3)
  copying "public" directory
Exporting (1/3)
Exporting (2/3)
Exporting (3/3)

Export successful
Errors:
(sharp:4430): GLib-CRITICAL **: 12:23:30.741: g_hash_table_lookup: assertion 'hash_table != NULL' failed

(sharp:4430): GLib-CRITICAL **: 12:23:30.745: g_hash_table_insert_internal: assertion 'hash_table != NULL' failed

(sharp:4430): GLib-CRITICAL **: 12:23:30.745: g_hash_table_lookup: assertion 'hash_table != NULL' failed


bash-4.2$ /usr/local/bin/hyperglass build-ui
[INFO] 20200716 12:24:06 | hyperglass.configuration:43 | <module> → Configuration directory: /etc/hyperglass
Starting new UI build...
[INFO] 20200716 12:24:07 | hyperglass.util:654 | build_frontend → Starting UI build...
[SUCCESS] 20200716 12:25:43 | hyperglass.util:681 | build_frontend → Completed UI build
[SUCCESS] 20200716 12:25:43 | hyperglass.util:530 | copyfiles → Copied /usr/local/lib/python3.6/site-packages/hyperglass/images/hyperglass-light.svg
[SUCCESS] 20200716 12:25:43 | hyperglass.util:530 | copyfiles → Copied /usr/local/lib/python3.6/site-packages/hyperglass/images/hyperglass-dark.svg
[SUCCESS] 20200716 12:25:43 | hyperglass.util:530 | copyfiles → Copied /usr/local/lib/python3.6/site-packages/hyperglass/images/hyperglass-icon.svg
✅ Completed UI build in production mode

Possible Solution

Based on some googling, it looks like there's a timeout value for one of the build tasks. If that timeout value is increased, that may resolve the issue.

Environment

Server

  • OS: Centos 7
  • Python Version: 3.6.8
  • hyperglass Version: 1.0.0-beta.51

Client

not relevant

@forkwhilefork forkwhilefork added the possible-bug Something isn't working label Jul 16, 2020
@thatmattlove
Copy link
Owner

I have encountered this as well, researched the crap out of it, and it seems to be something about 3 dependencies deep in the library used to generate the favicons, and doesn't seem like something that has a reasonable fix. For me, the workaround is to run the build again. After messing around with the Pillow library (Python image manipulation) to auto generate/size the Opengraph image, it occurred to me that I could fairly easily write a little library to do the same thing that the JS library does, but in Python, which I feel would be a way better way to do it anyway.

I'll keep this issue open so it annoys me into starting that library :)

@thatmattlove
Copy link
Owner

Favicons is now live, and merged into hyperglass as of 1.0.0-beta.55. In my testing, the favicon build process took about 1 second, vs the JS library's nearly full minute, so I'm hopeful this issue will be fully solved 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants