Uncaught Exception: Error on Mac
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- electron, typescript, wordpress
Research direction
Start at parseJsonFromPhpOutput, shown in the stack trace in the packaged app, and trace where the Studio app reads PHP process output. Reproduce the startup error and inspect the output beginning with [notice X 0] to find why it is parsed as JSON. Done when opening the app no longer raises the exception and the reported AI operation works.
Written by the indexing model from the issue text.
Description
Quick summary
I am receiving the following error when i open the app
The AI credits are being used but it seems nothing is actually being done:
Uncaught Exception:
SyntaxError: Unexpected token 'o', "[notice X 0]"... is not valid JSON
at JSON.parse ()
at parseJsonFromPhpOutput (/Applications/Studio.app/Contents/Resources/app.asar/dist/main/index.js:22785:14)
at TypedEventEmitter. (/Applications/Studio.app/Contents/Resources/app.asar/dist/main/index.js:22807:49)
at TypedEventEmitter.emit (node:events:514:28)
at TypedEventEmitter.emit (/Applications/Studio.app/Contents/Resources/app.asar/dist/main/index.js:25446:16)
at ChildProcess. (/Applications/Studio.app/Contents/Resources/app.asar/dist/main/index.js:25573:36)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1141:16)
at Socket. (node:internal/child_process:498:11)
at Socket.emit (node:events:514:28)
Steps to reproduce
- Open the Studio App
- The error continues to appear
What you expected to happen
The error should not be showing
What actually happened
The error shows
App or CLI?
Studio App
Version
2.0.0
Impact
All
Available workarounds?
No and the app is unusable
Platform
No response
Architecture
None
Logs or notes
Uncaught Exception:
SyntaxError: Unexpected token 'o', "[notice X 0]"... is not valid JSON
at JSON.parse ()
at parseJsonFromPhpOutput (/Applications/Studio.app/Contents/Resources/app.asar/dist/main/index.js:22785:14)
at TypedEventEmitter. (/Applications/Studio.app/Contents/Resources/app.asar/dist/main/index.js:22807:49)
at TypedEventEmitter.emit (node:events:514:28)
at TypedEventEmitter.emit (/Applications/Studio.app/Contents/Resources/app.asar/dist/main/index.js:25446:16)
at ChildProcess. (/Applications/Studio.app/Contents/Resources/app.asar/dist/main/index.js:25573:36)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1141:16)
at Socket. (node:internal/child_process:498:11)
at Socket.emit (node:events:514:28)
- Dominant language
- TypeScript
- Stars
- 543
- Forks
- 104
- Avg merge
- 20h 37m
- Merged PRs (30d)
- 334
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/studio
-
Enhancement
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Automattic/studio#3017 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/studio#2868 · 2 comments ·
Maintainers usually reply within 1 day
-
Eval: Cases for the failures users reportPossibly taken @chubes4 claimed this 1 day ago. Open
Automattic/studio#5296 · 1 assignee ·
Maintainers usually reply within 1 day
-
Allow the native PHP worker pool size to be configured (hardcoded to 4)Possibly taken @chubes4 claimed this 3 days ago. Open
Automattic/studio#5238 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Automattic/studio#5169 ·
Maintainers usually reply within 1 day
All issues in Automattic/studio
Similar issues
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Status: Triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mermaid-js/mermaid#8546 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
Maintainers usually reply within 1 day