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

json parse #260

Closed
woldtwerk opened this issue Jan 7, 2025 · 3 comments
Closed

json parse #260

woldtwerk opened this issue Jan 7, 2025 · 3 comments

Comments

@woldtwerk
Copy link

woldtwerk commented Jan 7, 2025

Describe the bug

I get a json parse error in file: @unlighthouse/core/dist/process/lighthouse.mjs#11

the value of lighthouseOptionsEncoded is

{
  "onlyCategories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "throttlingMethod": "simulate",
  "throttling": {
    "rttMs": 150,
    "throughputKbps": 1638.4,
    "requestLatencyMs": 600,
    "downloadThroughputKbps": 1638.4,
    "uploadThroughputKbps": 750,
    "cpuSlowdownMultiplier": 1
  },
  "formFactor": "mobile",
  "screenEmulation": {
    "mobile": true,
    "width": 412,
    "height": 823,
    "deviceScaleFactor": 1.75,
    "disabled": false
  },
  "emulatedUserAgent":"Mozilla/5.0"

there's something missing. At least a }

Reproduction

No response

System / Nuxt Info

System:
    OS: Linux 6.9 Fedora Linux 40 (Workstation Edition)
    CPU: (16) x64 AMD Ryzen 9 PRO 6950H with Radeon Graphics
    Memory: 10.74 GB / 30.61 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22 - 
    Yarn: 1.22.22 - ~/node_modules/.bin/yarn
    npm: 10.9.2 - ~/node_modules/.bin/npm
    pnpm: 9.15.2 - ~/node_modules/.bin/pnpm
    bun: 1.1.13 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 131.1.73.104
    Chrome: 131.0.6778.204
@harlan-zw
Copy link
Owner

I've seen another issue related to this, it was occurring when someone didn't have any disk space to write the file. Could you confirm this isn't the case?

@woldtwerk
Copy link
Author

I've seen another issue related to this, it was occurring when someone didn't have any disk space to write the file. Could you confirm this isn't the case?

this is not the case

harlan-zw added a commit that referenced this issue Mar 4, 2025
@harlan-zw
Copy link
Owner

I'm not able to replicate this so I don't think I can provide a valid fix. The best I can do is add a catch around the invalid JSON which may help debug further.

If you can provide reproduction details I'll look further.

@harlan-zw harlan-zw closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2025
harlan-zw added a commit that referenced this issue Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants