kean / Pulse

Network logger for Apple platforms
https://pulselogger.com
MIT License
6.18k stars 294 forks source link

Crash when tapping "See all" when grouped by host #263

Closed bjtitus closed 2 months ago

bjtitus commented 2 months ago

We noticed a crash when grouping by host in PulseUI's console:

Thread 1: Fatal error: No ObservableObject of type ConsoleEnvironment found. A View.environmentObject(_:) for ConsoleEnvironment may be missing as an ancestor of this view.

Steps to Reproduce

  1. Open the PulseUI ConsoleView
  2. Tap ⋯ > "Group By" > "Host"
  3. Find a host with a "See All" cell and tap the "See All" cell
  4. 💥 Crash

CrashLog.ips.zip

Similar to https://github.com/kean/Pulse/issues/211, the issue seems to be with ConsoleEnvironment environment object not being set up.

kean commented 2 months ago

Hey, thanks for the report, @bjtitus.

Getting the SwiftUI environment work has been a challenge as the behavior keeps changing across releases. It's fixed in v4.2.5.