Crash on some Apple Watch models #780
-
I have a state that does periodic requests to an endpoint (through environment) and depending on the response it produces on of two actions: success or retry. The retry action is returned in a throttled effect that crashes upon firing:
The crash message is |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Can you provide any more info about the action/crash? It could be a threading issue? Adding |
Beta Was this translation helpful? Give feedback.
-
I managed to fix the crash, but now I don't have defer/throttle behaviour at all. Here's how the effect looks like:
and I still see that the action is being called every 2 or 3 seconds (that's how long it takes to I am completely baffled :( is it something that I don't understand about how schedulers work? |
Beta Was this translation helpful? Give feedback.
-
I don't fully understand your use case but was it originally set up where a |
Beta Was this translation helpful? Give feedback.
I don't fully understand your use case but was it originally set up where a
retryRequest
could create anotherretryRequest
? If aretryRequest
hadn't responded in the given timeframe was it getting cancelled?Also, I remember someone at some point having an issue trying to schedule tasks in the background. It was just a vanilla SwiftUI thing though. It was like the scheduler would stop triggering or get out of sync... especially when the View wasn't the main focus. Not sure if it's related, but it could be something that is more likely to occur on watchOS.
Someone else might be able to help you out more though.