Seeing errors with a basic attempt at using the plugin
@theproducer ci sta già lavorando.
Dal 1/8/2023.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
In my background.js file i have 1 event listener defined:
addEventListener("myEvent", (details) => {
console.log("do something to update the system here:", details);
details.completed();
});
In my capacitor.config.ts i have Background Runner configured as follows:
BackgroundRunner: {
label: "com.myappname.background.task",
src: "background.js",
event: "myEvent",
repeat: false,
interval: 2,
autoStart: false,
}
In my React App i am using the @capacitor/app plugin to monitor appStateChange and am triggering myEvent based on the isActive status as follows:
App.addListener('appStateChange', async ({ isActive }) => {
if(!isActive) {
await BackgroundRunner.dispatchEvent({
label: "com.myappname.background.task",
event: "myEvent",
details: {foo: 'bar'},
});
}
});
Results in the following errors when running the app on an actual iOS device running iOS v16.5.1(c) after putting the app into the background:
starting runner and loading contexts...
2023-07-29 18:39:07.567069-0400 App[39138:2062252] *** Assertion failure in -[CLLocationManager setAllowsBackgroundLocationUpdates:], CLLocationManager.m:1033
2023-07-29 18:39:07.567933-0400 App[39138:2062252] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient) || _CFMZEnabled()'
*** First throw call stack:
(0x1c0b98cb4 0x1b9c343d0 0x1bb32a56c 0x1cc5b1f28 0x10135d0d8 0x10135ce1c 0x101359274 0x10134e8a0 0x10134b400 0x10134c814 0x101352820 0x10134a600 0x101b7c520 0x101b7e038 0x101b92670 0x101b92e34 0x220918da0 0x220918b7c)
libc++abi: terminating due to uncaught exception of type NSException
What am i missing?
- Lingua principale
- C
- Stelle
- 57
- Fork
- 37
- Merge medio
- 3g 17h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ionic-team/capacitor-background-runner
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
ionic-team/capacitor-background-runner#158 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ionic-team/capacitor-background-runner#155 · 1 reazione ·
-
Capacitor keeps running old background runnersForse di nuovo libera @theproducer l’ha presa 245 giorni fa e non c’è nessuna pull request aperta. Apertabug
ionic-team/capacitor-background-runner#152 · 1 commento · 2 reazioni · 1 assegnatario ·
Tutte le issue di ionic-team/capacitor-background-runner
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
fastfetch-cli/fastfetch#2628 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
FujiNetWIFI/fujinet-firmware#1736 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100