Mashiane Expert Licensed User Longtime User Mar 30, 2025 #1 Hi I am trying to have a Background Worker working in a BANanoServer app. Im trying to execute a call to it via a button click. The error that is being raised is on this line. Code: Copy _banano_bmw_browserwebworker.worker.handler.banano_messagefrombackgroundworker('worker', event.data.tag, event.data.value, event.data.error); I am attaching a project to reproduce this. I would appreciate help on how to fix this. I have used the BANano REST API Server with PWA Project Template to create this and added a background worker. Thank you in advance. PS: Similar implementation on my app. Code: Copy _banano_bananoserverpablo_browserwebworker.worker.handler.banano_messagefrombackgroundworker is not a function at Worker.<anonymous> (app1743365863954.js:3:146474) Attachments BMW.zip BMW.zip 33.1 KB · Views: 261 Last edited: Mar 30, 2025
Hi I am trying to have a Background Worker working in a BANanoServer app. Im trying to execute a call to it via a button click. The error that is being raised is on this line. Code: Copy _banano_bmw_browserwebworker.worker.handler.banano_messagefrombackgroundworker('worker', event.data.tag, event.data.value, event.data.error); I am attaching a project to reproduce this. I would appreciate help on how to fix this. I have used the BANano REST API Server with PWA Project Template to create this and added a background worker. Thank you in advance. PS: Similar implementation on my app. Code: Copy _banano_bananoserverpablo_browserwebworker.worker.handler.banano_messagefrombackgroundworker is not a function at Worker.<anonymous> (app1743365863954.js:3:146474)
Solution alwaysbusy Apr 1, 2025 You create the background worker but do not start it. Add this line in BROWSERApp Initialize(): Code: Copy BANano.StartBackgroundWorker("worker", Null) see for a full explanation of the cycle: https://www.b4x.com/android/forum/t...d-workers-in-your-webapps-introduction.134544 Alwaysbusy
You create the background worker but do not start it. Add this line in BROWSERApp Initialize(): Code: Copy BANano.StartBackgroundWorker("worker", Null) see for a full explanation of the cycle: https://www.b4x.com/android/forum/t...d-workers-in-your-webapps-introduction.134544 Alwaysbusy
alwaysbusy Expert Licensed User Longtime User Apr 1, 2025 #2 You create the background worker but do not start it. Add this line in BROWSERApp Initialize(): Code: Copy BANano.StartBackgroundWorker("worker", Null) see for a full explanation of the cycle: https://www.b4x.com/android/forum/t...d-workers-in-your-webapps-introduction.134544 Alwaysbusy Upvote 1 Solution
You create the background worker but do not start it. Add this line in BROWSERApp Initialize(): Code: Copy BANano.StartBackgroundWorker("worker", Null) see for a full explanation of the cycle: https://www.b4x.com/android/forum/t...d-workers-in-your-webapps-introduction.134544 Alwaysbusy
Mashiane Expert Licensed User Longtime User Apr 4, 2025 #3 Update: Tip: Add the start method in the class you want the background worker to execute on... Upvote 0