question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SyntaxError: /tmp/hyperglass_XXX.json: Unexpected end of JSON input

See original GitHub issue

Bug Description

Whenever I try to build the ui with hyperglass build-ui it errors out giving the error SyntaxError: /tmp/hyperglass_XXX.json: Unexpected end of JSON input

Expected behavior

I expect it to build the UI without any issue.

Steps to Reproduce

  • Install hyperglass using pip3
  • Create devices.yaml file
  • Run hyperglass build-ui

Local Configurations

devices.yaml

routers:
  - name: rtr.fra.vtr.as211167.net
    address: REDACTED
    network:
      name: production
      display_name: AS211167
    credential:
      username: REDACTED
      password: REDACTED
    port: 22
    nos: vyos
    vrfs:
      - name: global
        default: true
        ipv4:
          source_address: REDACTED

Logs

❌ Error building UI:
Messages:

Errors:
> Build error occurred
SyntaxError: /tmp/hyperglass_7ounc0yp.json: Unexpected end of JSON input
    at parse (<anonymous>)
    at Object.Module._extensions..json (internal/modules/cjs/loader.js:1128:22)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/usr/local/lib/python3.7/dist-packages/hyperglass/ui/next.config.js:3:16)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)

Possible Solution

Environment

Debian 10 LXC container 2GB/2C

Server

❕ Please copy & paste this table in your bug report:

Metric Value
hyperglass Version 1.0.3
hyperglass Path /etc/hyperglass
Python Version 3.7.3
Platform Info Linux-5.4.119-1-pve-x86_64-with-debian-10.10
CPU Info AMD Ryzen 5 3600 6-Core Processor
Logical Cores 2
Physical Cores 6
Processor Speed 3.6014085GHz
Total Memory 2.15 GB
Memory Utilization 5.2%
Total Disk Space 17.18 GB
Disk Utilization 11.8%

Client

  • OS & Version: Windows 10
  • Browser: MS Edge (Chromium ver.)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thatmattlovecommented, Dec 9, 2021

I’m marking this as fixed-in-next-release, as I’ve completely done away with the /tmp/hyperglass.env.json file/concept in v2.0. I’ll leave this open until that release is available, in case others come across the same issue.

0reactions
ssh-sysadmincommented, Feb 2, 2022

Am getting this same issue. Output of /tmp/hyperglass_xxxxxxxx.json using node commands above: https://www.toptal.com/developers/hastebin/ogayakaset.less

Metric Value
hyperglass Version 1.0.4
hyperglass Path /etc/hyperglass
Python Version 3.8.10
Node Version 14.19.0
Platform Info Linux-5.4.124-1-pve-x86_64-with-glibc2.29
CPU Info Intel® Xeon® CPU E5-2690 v2 @ 3.00GHz
Logical Cores 6
Physical Cores 20
Processor Speed 3.006451825GHz
Total Memory 4.29 GB
Memory Utilization 3.6%
Total Disk Space 53.69 GB
Disk Utilization 4.4%

Running in Ubuntu 20.04.3 LXC within Proxmox.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found