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

Pulse 4.0 crash when opening network task details #211

Closed
ejensen opened this issue Aug 7, 2023 · 1 comment
Closed

Pulse 4.0 crash when opening network task details #211

ejensen opened this issue Aug 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ejensen
Copy link
Sponsor Contributor

ejensen commented Aug 7, 2023

When opening a network task details, the app crashes due to the ConsoleEnvironment not being assigned.

SwiftUI/EnvironmentObject.swift:82: Fatal error: No ObservableObject of type ConsoleEnvironment found. A View.environmentObject(_:) for ConsoleEnvironment may be missing as an ancestor of this view.

This can be reproduced in the Pulse iOS demo app:

EnvironmentObject.mp4
@kean
Copy link
Owner

kean commented Aug 7, 2023

Thanks for the report, @ejensen. Fixed in 4.0.1.

The root cause is the incorrect use of environment objects. I was setting environment objects on ConsoleView and they are not propagated to the screens pushed from it. This was a last minute change, so it wasn't fully tested.

@kean kean closed this as completed Aug 7, 2023
@kean kean added the bug Something isn't working label Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants