Tons of errors are ignored
Mantenedores costumam responder em até 2 dias
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- react-native, typescript
- Domínio
- cli
Direção de pesquisa
Comece com isPackagerRunning.ts e rastreie cada try/catch aninhado em torno de fetch, dos dados da resposta e dos headers. Compare os casos relatados de dados undefined e de erros inesperados com os resultados pretendidos running, not_running e unrecognized. A tarefa estará concluída quando os erros não forem mais ignorados silenciosamente nem interpretados incorretamente, e o comportamento ficar visível onde a issue exigir.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Hello. This bug is to keep track of a multitude of small issues where errors are silently ignored or misinterpreted. There are several pull requests fixing some of them already but this one does not appear to have a PR yet and is a great example. From isPackagerRunning.ts:
async function isPackagerRunning(
packagerPort: string | number = process.env.RCT_METRO_PORT || '8081',
): Promise<
| {
status: 'running';
root: string;
}
| 'not_running'
| 'unrecognized'
> {
try {
const {data, headers} = await fetch(
`http://localhost:${packagerPort}/status`,
);
try {
if (data === 'packager-status:running') {
return {
status: 'running',
root: headers.get('X-React-Native-Project-Root') ?? '',
};
}
} catch (_error) {
return 'unrecognized';
}
return 'unrecognized';
} catch (_error) {
return 'not_running';
}
}
Two issues here had me chasing false starts with another bug:
- Any error interpreting the data (e.g. data is undefined) is treated as
undefined. This will likely be wrong so at minimum there should be a visible by default warning in this scenario - Any issue during this entire process that isn't explicitly handles is treated as
not_running. Again this might be ok if the unrecognized error were visible, since that will not always be the correct thing to do
Bit of a side note with this snippet, there is a lot of unnecessary complexity that stems from the strange shape of this methods return type. We might want to make it something like
{status: 'running' | 'not_running' | 'unrecognized', root: string?}
and/or use an enum for the status. This is just "bug prone" not itself a bug, and we would need to refractor this area anyway, so let me know if we feel like this should be its own bug or if we should ignore it.
- Linguagem predominante
- TypeScript
- Estrelas
- 2.9k
- Forks
- 950
- Merge médio
- 10d 19h
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de react-native-community/cli
-
run-ios --udid <physical device> throws "No simulator available" because the fallback simulator is resolved eagerlyTalvez já em andamento @huytdps13400 assumiu há 45 dias. Abertabug report
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
react-native-community/cli#2826 ·
Mantenedores costumam responder em até 2 dias
-
`project.ios.automaticPodsInstallation` default of `true` never applies unless `project.ios` is explicitly declared in `react-native.config.js`Talvez já em andamento @huytdps13400 assumiu há 45 dias. Abertabug report
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
react-native-community/cli#2825 ·
Mantenedores costumam responder em até 2 dias
-
run-ios: "Unable to boot device in current state: Booted" alert when the simulator is already bootedTalvez já em andamento @bryandent assumiu há 88 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
react-native-community/cli#2820 ·
Mantenedores costumam responder em até 2 dias
-
run-ios --buildFolder installs the app from the default DerivedData instead of the build folderTalvez já em andamento @lovisschmidt assumiu há 4 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
react-native-community/cli#2869 ·
Mantenedores costumam responder em até 2 dias
-
run-ios on Xcode 27: DeviceHub opens no window when the simulator is shut downTalvez já em andamento @rakodev assumiu há 5 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 25/100
react-native-community/cli#2866 · 2 comentários ·
Mantenedores costumam responder em até 2 dias
Todas as issues de react-native-community/cli
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
openclaw/openclaw#168089 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
✨ enhancement needs-discussion
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferenceTalvez já em andamento @alok-108 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/playwright#43263 ·
Mantenedores costumam responder em até 1 dia
-
area:studio type:security
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia