Skip to content

fix(dev): use loopback IP and increase frontend server wait timeout#5776

Open
savely-krasovsky wants to merge 1 commit into
wailsapp:masterfrom
savely-krasovsky:fix-windows-bug
Open

fix(dev): use loopback IP and increase frontend server wait timeout#5776
savely-krasovsky wants to merge 1 commit into
wailsapp:masterfrom
savely-krasovsky:fix-windows-bug

Conversation

@savely-krasovsky

@savely-krasovsky savely-krasovsky commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Description

Increases overall timeout to wait frontend and make dev server listen only IPv4.

Fixes # (issue)

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

Test Configuration

Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.

Checklist:

  • (v2 only) I have updated website/src/pages/changelog.mdx with details of this PR (v3 changelog entries are added automatically)
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Bug Fixes
    • Improved development server connectivity by using a more reliable local address.
    • Increased the frontend development server startup wait window by retrying readiness checks more times, reducing failures when startup takes longer.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3c829acd-1403-4113-8fec-6c114808ac0c

📥 Commits

Reviewing files that changed from the base of the PR and between fc9f35a and dc1e1d3.

📒 Files selected for processing (2)
  • v3/internal/commands/dev.go
  • v3/pkg/application/application_dev.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • v3/internal/commands/dev.go
  • v3/pkg/application/application_dev.go

Walkthrough

Development startup now uses an explicit loopback IP for the frontend dev server and allows more time for the frontend server to become reachable.

Changes

Dev-server startup

Layer / File(s) Summary
Dev-server connectivity settings
v3/internal/commands/dev.go, v3/pkg/application/application_dev.go
The dev server uses 127.0.0.1 for binding and FRONTEND_DEVSERVER_URL, while frontend readiness checks increase from 10 to 30 attempts with the existing 500ms delay.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

  • wailsapp/wails#5265: Both changes adjust IPv4 connectivity behavior for the local Vite development server.

Poem

I’m a rabbit with a loopback hop,
Through thirty tries I never stop.
The server waits, the address is clear,
A tiny IP brings startup near. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: switching dev loopback addressing and extending the frontend wait timeout.
Description check ✅ Passed The PR follows the template and includes summary, type, and testing checklists, but the fixed issue number and wails doctor output are still blank.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain modules listed in go.work or their selected dependencies"


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.

@savely-krasovsky

Copy link
Copy Markdown
Contributor Author

This was my constant struggle while I develop Windows App. I don't know, maybe because of Windows Defender or something else, but on Windows frontend part start kind of long and I was contantly getting this race:

$ wails3 dev
Wails v3.0.0-alpha2.117 › Build
task: [windows:common:go:mod:tidy] go mod tidy
task: Task "windows:common:generate:icons" is up to date
task: [windows:common:go:mod:tidy] go mod tidy
task: [windows:common:install:frontend:deps] pnpm install
Already up to date
Done in 39ms using pnpm v11.8.0
task: [generate:bindings (BUILD_FLAGS=-buildvcs=false -gcflags=all="-l")] wails3 generate bindings -f '-buildvcs=false -gcflags=all="-l"' -clean=true -ts
Wails v3.0.0-alpha2.117 › Generate Bindings
 INFO  Processed: 332 Packages, 1 Service, 33 Methods, 40 Enums, 152 Models, 3 Events in 1.0032622s.                                                                                                      
 INFO  Output directory: D:\projects\fidoapp\frontend\bindings
task: [build:frontend (DEV=true)] pnpm run build:dev
$ vite build --minify false --mode development
vite v8.0.16 building client environment for development...
✔ [paraglide-js] Compilation complete (message-modules)                                                                                                                                                
✓ 5746 modules transformed.
computing gzip size...
dist/index.html                                                       0.39 kB │ gzip:   0.28 kB
dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2      7.50 kB
dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2           9.00 kB
dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2       12.10 kB
dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2      15.19 kB
dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2          40.40 kB
dist/assets/index-Bf6eh-vi.css                                      170.34 kB │ gzip:  26.53 kB
dist/assets/index-B8pXrTFH.js                                     2,640.94 kB │ gzip: 411.61 kB

[PLUGIN_TIMINGS] Your build spent significant time in plugins. Here is a breakdown:
  - wails-typed-events (85%)
  - vite-plugin-svelte:compile (7%)
  - vite-plugin-svelte:preprocess (7%)
See https://rolldown.rs/options/checks#plugintimings for more details.

✓ built in 4.75s
task: [windows:generate:syso] wails3 generate syso -arch amd64 -icon windows/icon.ico -manifest windows/wails.exe.manifest -info windows/info.json -out ../wails_windows_amd64.syso
task: [windows:build:native] go build -buildvcs=false -gcflags=all="-l" -o "bin/fidoapp.exe"
task: [windows:build:native] powershell Remove-item *.syso

Need documentation? Run: wails3 docs
 ♥   If Wails is useful to you or your company, please consider sponsoring the project: wails3 sponsor
task: [windows:run] bin/fidoapp.exe
Jul 13 02:36:23.779 INF Build Info: Wails=v3.0.0-alpha2.117 Compiler=go1.26.4 -compiler=gc -gcflags=all=-l CGO_ENABLED=0 GOARCH=amd64 GOOS=windows GOAMD64=v1 -buildmode=exe
Jul 13 02:36:23.780 INF AssetServer Info: middleware=true handler=true devServerURL=http://localhost:9245
Jul 13 02:36:23.780 INF Platform Info: Go-WebView2Loader=true WebView2=150.0.4078.65 ID=25H2 Name=Windows 10 Pro Version=2009 (Build: 26200) Branding=Windows 11 Pro
Jul 13 02:36:23.780 INF Waiting for frontend dev server to start... url=http://localhost:9245
task: [common:install:frontend:deps] pnpm install
Jul 13 02:36:24.287 INF Retrying...
Already up to date
Done in 28ms using pnpm v11.8.0
task: [common:dev:frontend] pnpm run dev -- --port 9245 --strictPort
Already up to date
Done in 27ms using pnpm v11.8.0
$ vite "--" "--port" "9245" "--strictPort"
Jul 13 02:36:25.289 INF Retrying...
Jul 13 02:36:26.291 INF Retrying...
Jul 13 02:36:27.293 INF Retrying...
Jul 13 02:36:28.295 INF Retrying...
✔ [paraglide-js] Compilation complete (locale-modules)                                                                                                                                                 

  VITE v8.0.16  ready in 3257 ms

  ➜  Local:   http://127.0.0.1:9245/
Jul 13 02:36:28.797 ERR 

******************************** FATAL *********************************
*      There has been a catastrophic failure in your application.      *
**************************** Error Details *****************************
unable to connect to frontend server. Please check it is running - FRONTEND_DEVSERVER_URL='http://localhost:9245'************************************************************************

  ERROR   task: Failed to run task "run": exit status 1

This PR fixes my issues completely.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@v3/pkg/application/application_dev.go`:
- Around line 25-26: Update the frontend readiness loop around client.Get in
application startup to enforce a request timeout, using an http.Client with a
finite Timeout or a context deadline for each request. Preserve the existing
retry behavior while ensuring an unresponsive frontend cannot block startup
indefinitely.
- Line 25: Update the retry documentation associated with the loop in
application startup to state that the server is retried a maximum of 30 times,
matching the loop’s 30 iterations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 54c051b6-72c9-4c79-b358-c53a6af957ca

📥 Commits

Reviewing files that changed from the base of the PR and between 3440ae5 and fc9f35a.

📒 Files selected for processing (2)
  • v3/internal/commands/dev.go
  • v3/pkg/application/application_dev.go

Comment thread v3/pkg/application/application_dev.go
Comment thread v3/pkg/application/application_dev.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant