ember-concurrency icon indicating copy to clipboard operation
ember-concurrency copied to clipboard

Not working in Ember 4.8+

Open erichaus opened this issue 2 years ago • 3 comments

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

erichaus avatar Jan 02 '23 21:01 erichaus

Minimal reproduction in Ember and ED 4.9: https://github.com/abel-n/ec-237-ember-49

abel-n avatar Jan 07 '23 15:01 abel-n

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)

IgnaceMaes avatar Jan 24 '23 09:01 IgnaceMaes

Looks like this issues is related to: https://github.com/emberjs/data/issues/8312#issuecomment-1370334665

esbanarango avatar Apr 06 '23 22:04 esbanarango