AppIntents crashes in prod

We implemented AppIntents using EnumerableEntityQuery and @Dependency and we are receiving these crash reports:

AppIntents/AppDependencyManager.swift:120: Fatal error: AppDependency  of type MyDependency.Type was not initialized prior to access. Dependency values can only be accessed inside of the intent perform flow and within types conforming to _SupportsAppDependencies unless the value of the dependency is manually set prior to access.

I can't post the stack because of the Developer Forums sensitive language filter :( but basically it's just a call to suggestedEntities of MyEntityQuery that calls the dependency getter and then it crashes.

My understanding was that when using @Dependency, the execution of the intent, or query of suggestedEntities in this case, would be delayed by the AppIntents framework until the dependency was added to the AppDependencyManager by me. At least that's what's happening in my tests. But in prod I'm having these crashes which I haven't been able to reproduce in dev yet.

Does anyone know if this is a bug or how can this be fixed? As a workaround, I can avoid using @Dependency and AppDependencyManager completely and make sure that all operations are async and delay the execution myself until the dependency is set. But I'd like to know if there's a better solution.

Thanks!

I can't post the stack because of the Developer Forums sensitive language filter

First, please use Feedback Assistant to report this as a bug on the forums, and of course, please include the content that is getting caught by the filter there. If you post the FB number here, I can take a look at that content to see the stack trace.

Aside from that, I'm gathering that you're adding items to the dependency manager as your app executes, rather than all at once in your App's init or delegate callbacks upon launch, and that's all that's required for you to reproduce this message — do I understand that right?

— Ed Ford,  DTS Engineer

AppIntents crashes in prod
 
 
Q