[Bug]: Generic "Error: 1" in Sentry
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 32/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- ios, react-native, typescript
- Ambito
- mobile
Direzione di ricerca
Start with the promise behavior of BackgroundFetch.configure on iOS, as the reporter describes it, and compare it with the documented return values of 0, 1 and 2. Decide whether configure should resolve with the status or reject, and settle that with maintainers before writing code. Done means the chosen behavior is documented and a test or sample shows the rejected case is caught.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Required Reading
- Confirmed
Plugin Version
4.4.2
Mobile operating-system(s)
- iOS
- Android
Device Manufacturer(s) and Model(s)
any iOS device (SE, 15, 17)
Device operating-systems(s)
iOS 26 + 13% other
React Native / Expo version
RN86
What happened?
6 years of "Error: 1" in Sentry. Never dug into it - till now w/ AI.
Long story short. We followed doc sample, but best I understand iOS devices will only ever return status=2 from that await as anything else is rejected in the promise and not caught.
So it explains why our Sentry filled over 6 years with these rare, but impossible to triage errors since its a bare rejection from native with no stacktrace.
We adapted to this
try {
await BackgroundFetch.configure(...)
} catch {
// Status is read below
}
try {
const status = await BackgroundFetch.status()
// etc
Wouldn't it be cool since the docs suggest reading the status from .configure that it could return 0,1 or 2? Or should it never do that and instead reject and we handle in userland? Just seems like we stumbled upon the source of the error, but don't have best idea on fix and we were just following doc recommendation.
Plugin Code and/or Config
let status = await BackgroundFetch.configure({
minimumFetchInterval: minimumFetchInterval,
stopOnTerminate: false,
startOnBoot: true,
requiredNetworkType: BackgroundFetch.NETWORK_TYPE_ANY,
requiresBatteryNotLow: true,
}, async (taskId) => {
BackgroundFetchCallBack();
BackgroundFetch.finish(taskId);
}, async (taskId) => {
BackgroundFetch.finish(taskId);
});
Relevant log output
- Lingua principale
- Java
- Stelle
- 1.6k
- Fork
- 194
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 transistorsoft/react-native-background-fetch
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
transistorsoft/react-native-background-fetch#583 · 1 commento ·
Tutte le issue di transistorsoft/react-native-background-fetch
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
NationalSecurityAgency/ghidra#10220 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
RIS export splits an organization name containing “and” into multiple authorsForse già presa @Gautam-aman l’ha presa oggi. Apertastatus: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
JabRef/jabref#17821 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
FailureContext.java rounds down thresholds in lastedAtLeast()Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno