Not working in Ember 4.8+
Just upgraded my app from ember 4.4 to ember 4.9 and the following code stopped working. It makes the api request successfully but never returns after that, hanging at the await line.
fetchData = task({ restartable: true }, async () => {
const { params } = this;
if (params.q === '' || params.q === null) return;
const res = await this.store.query('searchable', params);
I downgraded to ember 4.7 and it works again, having confirmed it doesn't work in 4.8 and 4.9
Minimal reproduction in Ember and ED 4.9: https://github.com/abel-n/ec-237-ember-49
Also running into this issue on [email protected] in combination with [email protected]. Awaiting a store promise in the task results in the following error:
vendor.js:163809 Uncaught TypeError: Cannot read properties of undefined (reading 'bind')
at Object.get (vendor.js:163809:41)
at TaskInstanceExecutor.handleYieldedValue (vendor.js:190078:36)
at TaskInstanceExecutor.handleResolvedContinueValue (vendor.js:190005:12)
at TaskInstanceExecutor.proceedSync (vendor.js:189957:14)
at TaskInstanceExecutor.start (vendor.js:189897:12)
at TaskInstance.start (vendor.js:189764:21)
at vendor.js:188864:67
at Array.forEach (<anonymous>)
at Refresh.process (vendor.js:188864:30)
at EmberScheduler.refresh (vendor.js:189000:36)
After upgrading to [email protected] the issue is resolved. (haven't tried later versions)
Looks like this issues is related to: https://github.com/emberjs/data/issues/8312#issuecomment-1370334665