Skip to content

TypeError: undefined is not an object (evaluating '_this$workers$workerN.isBusy') #94

@MrWarzo

Description

@MrWarzo

Hello,

I tried some things with this lib, and everything was good... but now, whatever i'm doing i get this error, even with the doc example :/

This happen when I use the "addJob" method.

I don't understand at all what the problem.. does someone can help me ?

Job table created.
2023-01-05 17:02:10.602151+0100 Photos & Vidéos[97342:6585161] [javascript] Possible Unhandled Promise Rejection (id: 0):
TypeError: undefined is not an object (evaluating '_this$workers$workerN.isBusy')
getJobsForWorker$@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:187596:97
tryCatch@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24037:23
invoke@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24207:32
tryCatch@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24037:23
invoke@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24109:30
@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24139:19
tryCallTwo@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:28723:9
doResolve@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:28887:25
Promise@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:28746:14
callInvokeWithMethodAndArg@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24138:33
enqueue@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24143:157
@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24158:69
getJobsForWorker@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:187592:42
_callee3$@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:187106:73
tryCatch@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24037:23
invoke@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24207:32
tryCatch@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24037:23
invoke@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24109:30
@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:24119:21
tryCallOne@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:28714:16
@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:28815:27
@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:29406:26
_callTimer@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:29302:17
_callReactNativeMicrotasksPass@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:29341:17
callReactNativeMicrotasks@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:29551:44
__callReactNativeMicrotasks@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:3057:46
@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:2835:45
__guard@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:3040:15
flushedQueue@/private/var/containers/Bundle/Application/43F837AB-4A17-4F33-A721-F45B3D32965B/Photos & Vidéos.app/main.jsbundle:2834:21
flushedQueue@[native code]
invokeCallbackAndReturnFlushedQueue@[native code]

last try :

    queue.configure({
      onQueueFinish: (executedJobs: Job<any>[]) => {
        console.log('Queue stopped and executed', executedJobs);
      },
    });
    queue.addWorker(
      new Worker('testWorker', async payload => {
        return new Promise<void>(resolve => {
          setTimeout(() => {
            console.log(payload.text);
            resolve();
          }, payload.delay);
        });
      }),
    );
    queue.addJob('testWorker', {text: 'hey !! -> ', delay: 5000});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions