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

[et] Failed to parse JSON output from gn desc #148431

Closed
gaaclarke opened this issue May 15, 2024 · 7 comments · Fixed by flutter/engine#52863
Closed

[et] Failed to parse JSON output from gn desc #148431

gaaclarke opened this issue May 15, 2024 · 7 comments · Fixed by flutter/engine#52863
Assignees
Labels
e: engine-tool Engine-specific tooling (i.e. `tools/engine_tool`). P1 High-priority issues at the top of the work list team-engine Owned by Engine team

Comments

@gaaclarke
Copy link
Member

gaaclarke commented May 15, 2024

Seen at

14d27622b3144d1e14218cbb789846b00360416a

Reproduction

$ ./flutter/bin/et build -c host_debug_unopt_arm64 //flutter/impeller:impeller_unittests
[2024-05-15 15:03:50.299682] ERROR: Failed to parse JSON output from `gn desc`:
FormatException: Unexpected character (at character 1)
WARNING at build arg file (use "gn args <out_dir>" to edit):47:24: Build ar...
^

[2024-05-15 15:03:50.306646] ERROR: FatalError caught in main. Please file a bug
error: Failed to parse JSON output from `gn desc`:
FormatException: Unexpected character (at character 1)
WARNING at build arg file (use "gn args <out_dir>" to edit):47:24: Build ar...
^


stack: #0      Logger.fatal (package:engine_tool/src/logger.dart:125:5)
#1      Gn.desc (package:engine_tool/src/gn.dart:69:27)
<asynchronous suspension>
#2      BuildCommand.run (package:engine_tool/src/commands/build_command.dart:85:41)
<asynchronous suspension>
#3      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#4      ToolCommandRunner.run (package:engine_tool/src/commands/command_runner.dart:97:14)
<asynchronous suspension>
#5      main (package:engine_tool/main.dart:86:19)
<asynchronous suspension>
@gaaclarke gaaclarke added e: engine-tool Engine-specific tooling (i.e. `tools/engine_tool`). team-engine Owned by Engine team labels May 15, 2024
@gaaclarke
Copy link
Member Author

I think maybe the error may be more apparent if the output wasn't elided. I didn't add those elipses in the description. I think after them may have been the GN error.

@gaaclarke
Copy link
Member Author

et works fine for my diff at 1ccd0c308b3a567fc41bc287a584f0946cca6c6b. Something went wrong between those commits.

@matanlurey matanlurey added the P0 Critical issues such as a build break or regression label May 15, 2024
@matanlurey matanlurey self-assigned this May 15, 2024
@gaaclarke
Copy link
Member Author

My diff added a file to GN, I'm not sure if that is required for reproducing the bug. I can supply it if it helps.

@matanlurey
Copy link
Contributor

That could be useful

@matanlurey
Copy link
Contributor

Locally I can't reproduce:

flutter % et build -c host_debug_unopt_arm64 //flutter/impeller:impeller_unittests
[2024-05-15T15:57:18.043][macos/host_debug_unopt_arm64: GN]: OK
[2024-05-15T15:57:19.041][macos/host_debug_unopt_arm64: RBE startup]: Proxy started successfully.
[2024-05-15T15:59:05.520][macos/host_debug_unopt_arm64: ninja]: 100.0% (893/893) LINK ./impeller_unittests
[2024-05-15T15:59:05.524][macos/host_debug_unopt_arm64: ninja]: OK
[2024-05-15T15:59:05.893][macos/host_debug_unopt_arm64: RBE shutdown]: Actions completed: 374 (331 cache hits, 43 racing locals)

@matanlurey matanlurey added P2 Important issues not at the top of the work list P1 High-priority issues at the top of the work list and removed P0 Critical issues such as a build break or regression P2 Important issues not at the top of the work list labels May 15, 2024
@matanlurey
Copy link
Contributor

Reduced to P1: the problem is we're not giving actionable feedback, not my specific patch.

flutter/engine@41f1027 removed concurrent_dart_jobs, requiring a ./tools/gn --unopt --mac-cpu=arm64 that et doesn't handle today. I'll fix the logging issue (1-line fix), and file another issue for improved error handling/recovery.

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e: engine-tool Engine-specific tooling (i.e. `tools/engine_tool`). P1 High-priority issues at the top of the work list team-engine Owned by Engine team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants