[Bug]: Generic "Error: 1" in Sentry
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 32/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- ios, react-native, typescript
- Área
- mobile
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 1.6k
- Forks
- 194
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de transistorsoft/react-native-background-fetch
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
transistorsoft/react-native-background-fetch#583 · 1 comentario ·
Todos los issues de transistorsoft/react-native-background-fetch
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
NationalSecurityAgency/ghidra#10220 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
RIS export splits an organization name containing “and” into multiple authorsPosiblemente ocupada @Gautam-aman la tomó hoy. Abiertostatus: needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
JabRef/jabref#17821 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
FailureContext.java rounds down thresholds in lastedAtLeast()Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día