Skip to content

fix(v3): revert goccy/go-json to stdlib encoding/json to fix Windows panic#4859

Merged
leaanthony merged 2 commits into
v3-alphafrom
v3/fix-go-json-dialog-types
Jan 4, 2026
Merged

fix(v3): revert goccy/go-json to stdlib encoding/json to fix Windows panic#4859
leaanthony merged 2 commits into
v3-alphafrom
v3/fix-go-json-dialog-types

Conversation

@leaanthony

@leaanthony leaanthony commented Jan 4, 2026

Copy link
Copy Markdown
Member

Summary

Reverts all runtime usages of goccy/go-json back to stdlib encoding/json to fix a Windows-specific panic.

Problem

After upgrading to alpha.56, calling service methods on Windows causes an index out of bounds panic:

runtime error: index out of range [576456381117104054] with length 57499

This is caused by a bug in goccy/go-json's type address calculation on Windows. The library uses memory address-based type caching which produces garbage values on Windows for types not warmed up during init().

Solution

Revert to stdlib encoding/json for all runtime code paths. The performance gains from goccy/go-json are not worth the stability issues on Windows.

This partially reverts PR #4843.

Files Changed

  • v3/internal/assetserver/webview/ (4 files)
  • v3/internal/capabilities/
  • v3/internal/runtime/
  • v3/pkg/application/ (13 files)
  • v3/pkg/services/ (4 files)

Test and benchmark files are left unchanged.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Fixed an index out of bounds panic on Windows when calling service methods.

✏️ Tip: You can customize this high-level summary in your review settings.

Add FileFilter, OpenFileDialogOptions, SaveFileDialogOptions, and
MessageDialogOptions to the init() warmup to prevent index out of bounds
panic on Windows when these types are first unmarshaled.

Fixes goccy/go-json#474 for Wails internal dialog types.
@coderabbitai

coderabbitai Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR reverts from the external goccy/go-json dependency back to the standard library encoding/json across the codebase. It removes the dependency from go.mod, replaces all imports throughout the application, removes related initialization code, disables benchmarks, and addresses a reported index out of bounds panic on Windows.

Changes

Cohort / File(s) Summary
Dependency & Changelog
v3/go.mod, v3/UNRELEASED_CHANGELOG.md
Removed bytedance/sonic, goccy/go-json, json-iterator/go and indirect dependencies from go.mod. Added changelog entry documenting the revert to fix Windows service method panic.
Asset Server WebView
v3/internal/assetserver/webview/request_darwin.go, v3/internal/assetserver/webview/request_ios.go, v3/internal/assetserver/webview/responsewriter_darwin.go, v3/internal/assetserver/webview/responsewriter_ios.go
Replaced goccy/go-json import with encoding/json for JSON marshaling/unmarshaling operations.
Core Application
v3/pkg/application/application_android.go, v3/pkg/application/application_android_nocgo.go, v3/pkg/application/application_darwin.go, v3/pkg/application/application_ios.go, v3/pkg/application/events.go, v3/pkg/application/logger_ios.go, v3/pkg/application/webview_window.go
Replaced goccy/go-json with encoding/json across platform-specific application files; no logic changes to public APIs or control flow.
Initialization & Utilities
v3/pkg/application/bindings.go
Replaced goccy/go-json with encoding/json and removed init function that initialized goccy/go-json type-address cache at startup.
Message Processing
v3/pkg/application/messageprocessor_args.go, v3/pkg/application/messageprocessor_call.go, v3/pkg/application/messageprocessor_events.go
Swapped import from goccy/go-json to encoding/json; JSON usage patterns remain unchanged.
Services
v3/pkg/application/single_instance.go, v3/pkg/application/transport_http.go, v3/pkg/services/kvstore/kvstore.go, v3/pkg/services/notifications/notifications_darwin.go, v3/pkg/services/notifications/notifications_linux.go, v3/pkg/services/notifications/notifications_windows.go
Replaced external JSON dependency with standard encoding/json library across service implementations.
Core Runtime
v3/internal/capabilities/capabilities.go, v3/internal/runtime/runtime.go
Switched goccy/go-json to encoding/json for marshal operations; behavior remains equivalent.
Testing
v3/pkg/application/json_libs_bench_test.go
Disabled benchmark test file by wrapping contents in block comment; prevents compilation and execution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

Suggested labels

Bug, go, Windows, v3-alpha, v3, size:L

Suggested reviewers

  • ndianabasi
  • makew0rld

Poem

🐰 The JSON standard hops once more,
No fancy third-party any fore,
Windows panic now ✨ healed,
Simple encoding/json revealed,
Fast or slow, both paths explored,
Standard libs we trust restored! 📚

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description is largely complete with summary, problem explanation, solution, and files changed. However, the required checklist items are not addressed, and no issue link is provided in the description. Add 'Fixes #' to link the related issue and complete the checklist items (testing platforms, test configuration via 'wails doctor', and documentation updates).
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: reverting goccy/go-json to stdlib encoding/json to fix a Windows panic. It is concise, specific, and clearly conveys the primary objective.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23b3424 and 8cce4b8.

⛔ Files ignored due to path filters (1)
  • v3/go.sum is excluded by !**/*.sum
📒 Files selected for processing (27)
  • v3/UNRELEASED_CHANGELOG.md
  • v3/go.mod
  • v3/internal/assetserver/webview/request_darwin.go
  • v3/internal/assetserver/webview/request_ios.go
  • v3/internal/assetserver/webview/responsewriter_darwin.go
  • v3/internal/assetserver/webview/responsewriter_ios.go
  • v3/internal/capabilities/capabilities.go
  • v3/internal/runtime/runtime.go
  • v3/pkg/application/application_android.go
  • v3/pkg/application/application_android_nocgo.go
  • v3/pkg/application/application_darwin.go
  • v3/pkg/application/application_ios.go
  • v3/pkg/application/bindings.go
  • v3/pkg/application/events.go
  • v3/pkg/application/ios_runtime_ios.go
  • v3/pkg/application/json_libs_bench_test.go
  • v3/pkg/application/logger_ios.go
  • v3/pkg/application/messageprocessor_args.go
  • v3/pkg/application/messageprocessor_call.go
  • v3/pkg/application/messageprocessor_events.go
  • v3/pkg/application/single_instance.go
  • v3/pkg/application/transport_http.go
  • v3/pkg/application/webview_window.go
  • v3/pkg/services/kvstore/kvstore.go
  • v3/pkg/services/notifications/notifications_darwin.go
  • v3/pkg/services/notifications/notifications_linux.go
  • v3/pkg/services/notifications/notifications_windows.go
💤 Files with no reviewable changes (1)
  • v3/go.mod
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: popaprozac
Repo: wailsapp/wails PR: 4098
File: v3/pkg/services/notifications/notifications_windows.go:91-113
Timestamp: 2025-02-24T06:08:55.645Z
Learning: The JSON quote handling in Windows notifications' activation arguments (v3/pkg/services/notifications/notifications_windows.go) has a known limitation with single-quote collisions that needs to be addressed after initial testing.
Learnt from: fbbdev
Repo: wailsapp/wails PR: 4024
File: v3/pkg/application/services.go:38-51
Timestamp: 2025-01-18T21:19:47.778Z
Learning: In the Wails v3 codebase, panic is used to catch invalid invocations that should never occur in production (programming errors), while error returns are reserved for recoverable error conditions (runtime errors). For example, the `NewService` function in `v3/pkg/application/services.go` uses panic to handle the case where more than one `ServiceOptions` instance is provided, as this is considered an unrecoverable programming error.
📚 Learning: 2025-02-13T01:05:02.267Z
Learnt from: fbbdev
Repo: wailsapp/wails PR: 4066
File: v3/pkg/application/messageprocessor_call.go:174-174
Timestamp: 2025-02-13T01:05:02.267Z
Learning: When handling JSON marshaling errors in Wails v3, the error message from json.Marshal provides sufficient debugging context. Logging raw data is unnecessary and could make logs harder to read.

Applied to files:

  • v3/pkg/application/messageprocessor_call.go
  • v3/pkg/application/messageprocessor_events.go
  • v3/pkg/application/application_android.go
  • v3/pkg/application/logger_ios.go
  • v3/pkg/services/kvstore/kvstore.go
  • v3/internal/capabilities/capabilities.go
  • v3/pkg/application/transport_http.go
📚 Learning: 2026-01-04T08:01:00.038Z
Learnt from: symball
Repo: wailsapp/wails PR: 4853
File: v2/internal/system/system.go:128-152
Timestamp: 2026-01-04T08:01:00.038Z
Learning: In v2/internal/system/system.go, shared functions like checkLibrary are defined without build tags but are only invoked from platform-specific files (system_linux.go, system_windows.go, system_darwin.go) that have build constraints. Reviewers should ensure there are no runtime OS checks in system.go and that platform-specific behavior is controlled via build tags. If runtime switches exist, remove them in favor of compile-time platform constraints to reduce overhead and improve correctness.

Applied to files:

  • v3/pkg/application/messageprocessor_call.go
  • v3/pkg/services/notifications/notifications_linux.go
  • v3/pkg/application/application_darwin.go
  • v3/pkg/application/messageprocessor_events.go
  • v3/pkg/services/notifications/notifications_darwin.go
  • v3/pkg/application/application_android.go
  • v3/pkg/application/application_android_nocgo.go
  • v3/pkg/application/logger_ios.go
  • v3/internal/assetserver/webview/responsewriter_darwin.go
  • v3/pkg/application/single_instance.go
  • v3/pkg/application/messageprocessor_args.go
  • v3/pkg/services/kvstore/kvstore.go
  • v3/pkg/application/events.go
  • v3/internal/capabilities/capabilities.go
  • v3/pkg/application/application_ios.go
  • v3/pkg/application/json_libs_bench_test.go
  • v3/pkg/application/transport_http.go
  • v3/internal/runtime/runtime.go
  • v3/internal/assetserver/webview/request_ios.go
  • v3/internal/assetserver/webview/request_darwin.go
  • v3/pkg/application/ios_runtime_ios.go
  • v3/pkg/services/notifications/notifications_windows.go
  • v3/pkg/application/webview_window.go
  • v3/internal/assetserver/webview/responsewriter_ios.go
  • v3/pkg/application/bindings.go
📚 Learning: 2025-03-24T20:22:56.233Z
Learnt from: popaprozac
Repo: wailsapp/wails PR: 4098
File: v3/pkg/services/notifications/notifications.go:46-55
Timestamp: 2025-03-24T20:22:56.233Z
Learning: In the notifications package, initialization of the `Service` struct is handled through platform-specific `New()` functions in each implementation file (darwin, windows, linux) rather than a generic constructor in the main package file.

Applied to files:

  • v3/pkg/services/notifications/notifications_linux.go
  • v3/pkg/services/notifications/notifications_darwin.go
  • v3/pkg/services/notifications/notifications_windows.go
📚 Learning: 2025-02-24T06:08:55.645Z
Learnt from: popaprozac
Repo: wailsapp/wails PR: 4098
File: v3/pkg/services/notifications/notifications_windows.go:91-113
Timestamp: 2025-02-24T06:08:55.645Z
Learning: The JSON quote handling in Windows notifications' activation arguments (v3/pkg/services/notifications/notifications_windows.go) has a known limitation with single-quote collisions that needs to be addressed after initial testing.

Applied to files:

  • v3/pkg/services/notifications/notifications_linux.go
  • v3/pkg/services/notifications/notifications_darwin.go
  • v3/pkg/services/notifications/notifications_windows.go
📚 Learning: 2025-03-24T20:22:56.233Z
Learnt from: popaprozac
Repo: wailsapp/wails PR: 4098
File: v3/pkg/services/notifications/notifications.go:46-55
Timestamp: 2025-03-24T20:22:56.233Z
Learning: In the notifications package, initialization of the `Service` struct is handled through platform-specific `New()` functions in each implementation file (darwin, windows, linux) rather than a generic constructor in the main package file. Each platform implementation follows a singleton pattern using `notificationServiceOnce.Do()` and creates a global `NotificationService` variable that's accessed through a thread-safe `getNotificationService()` function.

Applied to files:

  • v3/pkg/services/notifications/notifications_linux.go
  • v3/pkg/services/notifications/notifications_darwin.go
  • v3/pkg/services/notifications/notifications_windows.go
📚 Learning: 2025-03-24T06:54:22.127Z
Learnt from: popaprozac
Repo: wailsapp/wails PR: 4098
File: v3/pkg/services/notifications/notifications_windows.go:0-0
Timestamp: 2025-03-24T06:54:22.127Z
Learning: popaprozac prefers to focus on getting the Notifications API functionality working first and may consider code cleanup/refactoring for payload encoding logic in notifications_windows.go at a later time.

Applied to files:

  • v3/pkg/services/notifications/notifications_linux.go
  • v3/pkg/services/notifications/notifications_windows.go
📚 Learning: 2025-12-29T08:02:15.134Z
Learnt from: popaprozac
Repo: wailsapp/wails PR: 4839
File: docs/src/content/docs/reference/window.mdx:616-620
Timestamp: 2025-12-29T08:02:15.134Z
Learning: In Wails v3, the correct API for creating windows is `app.Window.New()` and `app.Window.NewWithOptions(...)`, not `app.NewWebviewWindow()` or `app.NewWebviewWindowWithOptions(...)`. The Application struct exposes a Window field of type *WindowManager that provides these methods.

Applied to files:

  • v3/pkg/application/application_darwin.go
  • v3/pkg/application/webview_window.go
📚 Learning: 2025-01-18T21:19:47.778Z
Learnt from: fbbdev
Repo: wailsapp/wails PR: 4024
File: v3/pkg/application/services.go:38-51
Timestamp: 2025-01-18T21:19:47.778Z
Learning: In the Wails v3 codebase, panic is used to catch invalid invocations that should never occur in production (programming errors), while error returns are reserved for recoverable error conditions (runtime errors). For example, the `NewService` function in `v3/pkg/application/services.go` uses panic to handle the case where more than one `ServiceOptions` instance is provided, as this is considered an unrecoverable programming error.

Applied to files:

  • v3/pkg/application/messageprocessor_events.go
📚 Learning: 2025-02-04T23:59:43.956Z
Learnt from: fbbdev
Repo: wailsapp/wails PR: 4045
File: v3/internal/generator/render/info.go:28-68
Timestamp: 2025-02-04T23:59:43.956Z
Learning: In the Wails v3 project, internal functions are designed to panic on nil parameters as they represent contract violations, rather than adding defensive nil checks.

Applied to files:

  • v3/pkg/application/messageprocessor_events.go
  • v3/pkg/application/application_android.go
📚 Learning: 2025-01-15T22:30:08.796Z
Learnt from: fbbdev
Repo: wailsapp/wails PR: 4001
File: v3/internal/generator/testcases/no_bindings_here/person.go:9-9
Timestamp: 2025-01-15T22:30:08.796Z
Learning: When dealing with fixed-length arrays in Go structs, encoding/json automatically handles bounds checking during unmarshaling, returning an error if the JSON array length exceeds the Go array length. No additional runtime validation is needed.

Applied to files:

  • v3/pkg/application/messageprocessor_events.go
  • v3/pkg/application/application_android.go
  • v3/pkg/application/application_android_nocgo.go
  • v3/pkg/application/events.go
  • v3/internal/capabilities/capabilities.go
  • v3/internal/runtime/runtime.go
  • v3/pkg/application/ios_runtime_ios.go
📚 Learning: 2025-01-15T22:40:58.594Z
Learnt from: fbbdev
Repo: wailsapp/wails PR: 4001
File: v3/internal/generator/testcases/aliases/main.go:65-68
Timestamp: 2025-01-15T22:40:58.594Z
Learning: Files in `v3/internal/generator/testcases` are test dummies used for testing purposes only. They are never compiled into the application and should not be subject to the same level of code review as production code.

Applied to files:

  • v3/pkg/application/json_libs_bench_test.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Run Go Tests v3 (macos-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (windows-latest, 1.24)
  • GitHub Check: Run Go Tests v3 (ubuntu-latest, 1.24)
  • GitHub Check: Analyze (go)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (29)
v3/pkg/application/messageprocessor_events.go (1)

4-4: LGTM! Import correctly switched to standard library.

The replacement of goccy/go-json with encoding/json is correct. The json.RawMessage type and API are identical between the two libraries, preserving all existing functionality while resolving the Windows panic issue.

v3/pkg/application/messageprocessor_call.go (1)

7-7: LGTM! Import correctly switched to standard library.

The replacement of goccy/go-json with encoding/json is correct. The json.Marshal calls (lines 106, 110) have identical behavior with the standard library, preserving functionality while addressing the Windows panic.

v3/UNRELEASED_CHANGELOG.md (1)

29-29: LGTM! Changelog entry accurately documents the fix.

The entry clearly describes the Windows panic issue and the resolution. The reference to reverting goccy/go-json provides appropriate technical context for developers tracking this change.

v3/pkg/application/transport_http.go (1)

13-13: LGTM! Import correctly switched to standard library.

The replacement of goccy/go-json with encoding/json is correct throughout this critical HTTP transport layer. All JSON operations (json.Marshal, json.Unmarshal, and json.RawMessage on line 74) maintain identical behavior with the standard library.

v3/pkg/application/ios_runtime_ios.go (2)

15-15: LGTM! Import correctly switched to standard library.

The replacement of goccy/go-json with encoding/json is correct. The json.Unmarshal call on line 41 maintains identical behavior with the standard library, ensuring consistency across all platforms.


1-79: Migration to encoding/json is complete across runtime code.

The verification confirms that goccy/go-json has been fully removed from all non-test files in the runtime code, and the dependency is no longer present in go.mod. All runtime code paths have been successfully migrated to use encoding/json.

v3/pkg/application/messageprocessor_args.go (1)

6-6: LGTM! Standard library import fixes Windows panic.

The import replacement from goccy/go-json to encoding/json is correct and addresses the Windows index out of range panic mentioned in the PR objectives. The standard library provides an identical API for json.RawMessage and json.Unmarshal used in this file.

v3/internal/capabilities/capabilities.go (1)

3-3: LGTM! Standard library import resolves the Windows panic.

The switch to encoding/json is appropriate and fixes the critical Windows bug. The json.Marshal usage in this file is straightforward and will behave identically with the standard library.

v3/pkg/services/notifications/notifications_darwin.go (1)

23-23: LGTM! Standard library import addresses the Windows panic issue.

The import replacement is clean and appropriate for this Darwin-specific notification service. All json.Marshal and json.Unmarshal operations in this file use standard patterns that are fully compatible with the standard library.

v3/pkg/application/events.go (1)

10-10: LGTM! Standard library import resolves the Windows panic.

The import change is appropriate for this event processing code. All json.Marshal and json.Unmarshal operations, including those used in custom event validation and decoding logic, are fully compatible with the standard library.

v3/pkg/application/application_ios.go (1)

23-23: LGTM! Standard library import is part of the comprehensive Windows panic fix.

The import replacement is correct for this iOS-specific platform code. All json.Marshal and json.Unmarshal operations, including those used for native tabs configuration and JavaScript message handling, are fully compatible with the standard library.

v3/pkg/application/application_android_nocgo.go (1)

10-10: LGTM: Import change correctly addresses Windows panic.

The switch from goccy/go-json to encoding/json is appropriate and necessary to fix the Windows index-out-of-bounds panic described in the PR objectives. The standard library provides better stability and avoids the type address calculation bug.

v3/internal/assetserver/webview/request_darwin.go (1)

118-118: LGTM: Import change is correct.

The migration to encoding/json is appropriate and maintains API compatibility. No functional changes to the request header parsing logic.

v3/pkg/application/webview_window.go (1)

12-12: LGTM: Import change fixes critical Windows bug.

The revert to encoding/json is necessary to address the type address calculation panic on Windows. The change maintains full API compatibility with existing json.Marshal usage.

v3/pkg/services/kvstore/kvstore.go (1)

8-8: LGTM: Import change maintains KV store functionality.

The switch to encoding/json is correct and maintains compatibility with existing Marshal/Unmarshal operations for store persistence.

v3/internal/assetserver/webview/request_ios.go (1)

116-116: LGTM: Import change is appropriate.

The migration to encoding/json is correct and maintains API compatibility with the existing header unmarshaling logic.

v3/internal/assetserver/webview/responsewriter_ios.go (1)

76-76: LGTM: Standard library import resolves Windows panic.

The switch to encoding/json is the correct fix for the reported Windows type address calculation bug in goccy/go-json. The usage at line 138 remains unchanged and compatible.

v3/pkg/application/application_darwin.go (1)

203-203: LGTM: Stdlib replacement maintains compatibility.

The encoding/json import correctly replaces goccy/go-json. Usage at line 322 with json.Unmarshal remains semantically identical, and the existing error handling (panic at line 325) is appropriate.

v3/pkg/application/application_android.go (1)

151-151: LGTM: Standard library import is correct.

The switch to encoding/json properly addresses the Windows panic issue. The json.Unmarshal usage at line 627 remains compatible, with appropriate error handling that returns errors to the Android layer.

v3/pkg/application/logger_ios.go (1)

20-20: LGTM: Logging subsystem correctly updated.

The encoding/json import properly replaces goccy/go-json. The json.Marshal calls at lines 60 and 113 remain compatible, and blank error handling is appropriate in the logging context where failures should not block execution.

v3/internal/assetserver/webview/responsewriter_darwin.go (1)

74-74: LGTM: Darwin response writer correctly updated.

The encoding/json import is the correct fix for the Windows panic issue. The json.Marshal usage at line 127 remains unchanged and compatible, with appropriate blank error handling for the always-marshalable header map.

v3/pkg/services/notifications/notifications_linux.go (1)

12-12: LGTM: Import change aligns with Windows panic fix.

The switch from goccy/go-json to encoding/json is a straightforward API-compatible replacement that resolves the Windows type address calculation bug described in the PR objectives.

v3/pkg/application/json_libs_bench_test.go (1)

3-314: LGTM: Benchmark disabling is appropriate.

With the project standardizing on encoding/json, comparative benchmarks against other JSON libraries (goccy/go-json, sonic, jsoniter) are no longer needed. The explanatory comment clearly links to this PR.

v3/pkg/services/notifications/notifications_windows.go (1)

14-14: LGTM: Critical fix for Windows notification handling.

The import change resolves the index out of bounds panic that occurred when unmarshaling notification types on Windows. The encoding/json API is fully compatible with the existing code.

v3/internal/runtime/runtime.go (1)

6-6: LGTM: Runtime flags marshaling updated.

The import change maintains identical behavior while contributing to the project-wide fix for the Windows panic issue.

v3/pkg/application/single_instance.go (1)

13-13: LGTM: Single instance communication updated.

The change maintains identical serialization behavior for SecondInstanceData while aligning with the project-wide standardization on encoding/json.

v3/pkg/application/bindings.go (3)

5-5: LGTM! Critical fix for Windows panic.

The reversion to stdlib encoding/json directly addresses the reported Windows index out of range panic caused by goccy/go-json's type address calculation bug. While there may be a performance trade-off compared to goccy/go-json, correctness and cross-platform reliability are paramount.


173-175: Documentation formatting improvement.

The comment formatting adjustment improves readability with no functional impact.


5-5: No consistency issues found across runtime files.

Verification confirms all goccy/go-json imports have been removed from runtime code (0 results when searching non-test files), and encoding/json is properly in use across key runtime paths in v3/pkg/application, v3/internal/runtime, and related modules. The migration is complete and consistent.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Missing Changelog Update

Hi @leaanthony, please update v3/UNRELEASED_CHANGELOG.md with a description of your changes.

This helps us keep track of changes for the next release.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jan 4, 2026

Copy link
Copy Markdown

Deploying wails with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8cce4b8
Status: ✅  Deploy successful!
Preview URL: https://533671e1.wails.pages.dev
Branch Preview URL: https://v3-fix-go-json-dialog-types.wails.pages.dev

View logs

@leaanthony leaanthony force-pushed the v3/fix-go-json-dialog-types branch 2 times, most recently from 4ab4471 to 74317dc Compare January 4, 2026 20:06
@leaanthony leaanthony changed the title fix(v3): warm up dialog types in go-json cache to prevent Windows panic fix(v3): revert goccy/go-json to stdlib encoding/json to fix Windows panic Jan 4, 2026
@leaanthony leaanthony force-pushed the v3/fix-go-json-dialog-types branch from 74317dc to 1dd2201 Compare January 4, 2026 20:37
…panic

goccy/go-json has a type address calculation bug on Windows that causes
index out of bounds panic when decoding user-defined types for the first time.

This reverts all runtime usages of goccy/go-json back to stdlib encoding/json.
Test and benchmark files are left unchanged.

Partially reverts PR #4843.
@leaanthony leaanthony force-pushed the v3/fix-go-json-dialog-types branch from 1dd2201 to 8cce4b8 Compare January 4, 2026 20:38
@sonarqubecloud

sonarqubecloud Bot commented Jan 4, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
14.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@leaanthony leaanthony merged commit 4dce80d into v3-alpha Jan 4, 2026
54 of 55 checks passed
@leaanthony leaanthony deleted the v3/fix-go-json-dialog-types branch January 4, 2026 21:26
Grantmartin2002 pushed a commit to Grantmartin2002/wails that referenced this pull request Apr 29, 2026
…panic (wailsapp#4859)

* fix(v3): warm up dialog types in go-json cache to prevent Windows panic

Add FileFilter, OpenFileDialogOptions, SaveFileDialogOptions, and
MessageDialogOptions to the init() warmup to prevent index out of bounds
panic on Windows when these types are first unmarshaled.

Fixes goccy/go-json#474 for Wails internal dialog types.

* fix(v3): revert goccy/go-json to stdlib encoding/json to fix Windows panic

goccy/go-json has a type address calculation bug on Windows that causes
index out of bounds panic when decoding user-defined types for the first time.

This reverts all runtime usages of goccy/go-json back to stdlib encoding/json.
Test and benchmark files are left unchanged.

Partially reverts PR wailsapp#4843.
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

Successfully merging this pull request may close these issues.

1 participant