javascript-obfuscator / javascript-obfuscator/react-native-obfuscating-transformer

Error when running in debug mode

Aberta
#4 3 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
211
Forks
102
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

**Project dependencies**
- react-native 0.51.0
- react-native-obfuscating-transformer ^1.0.0-rc.0

**Problem details**
- Add two files with info shown in [Usage](https://github.com/javascript-obfuscator/react-native-obfuscating-transformer#usage)
- run react-native run-ios to start app in debug mode

**Observation**
Following error was thrown in console:

```
Bundling `index.js` [development, non-minified] 0.0% (0/952), failed.
error: bundling failed: Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
at SourceMapGenerator_validateMapping [as _validateMapping] (/Users/{my_account}/Documents/{my_project}/node_modules/react-native-obfuscating-transformer/node_modules/source-map/lib/source-map-generator.js:276:15)
at SourceMapGenerator_addMapping [as addMapping] (/Users/{my_account}/Documents/{my_project}/node_modules/react-native-obfuscating-transformer/node_modules/source-map/lib/source-map-generator.js:110:12)
at /Users/{my_account}/Documents/{my_project}/node_modules/react-native-obfuscating-transformer/dist/composeSourceMaps.js:9:19
at Array.forEach ()
at Object.convertMetroRawSourceMapToStandardSourceMap (/Users/{my_account}/Documents/{my_project}/node_modules/react-native-obfuscating-transformer/dist/composeSourceMaps.js:7:9)
at Object.obfuscateCodePreservingSourceMap (/Users/{my_account}/Documents/{my_project}/node_modules/react-native-obfuscating-transformer/dist/obfuscateCode.js:17:35)
at Object.transform (/Users/{my_account}/Documents/{my_project}/node_modules/react-native-obfuscating-transformer/dist/obfuscatingTransformer.js:72:96)
at asyncify (/Users/{my_account}/Documents/{my_project}/node_modules/metro-bundler/src/JSTransformer/worker/index.js:114:35)
at /Users/{my_account}/Documents/{my_project}/node_modules/async/asyncify.js:82:27
```

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Reproduce the failure with react-native run-ios in debug mode using the two files described in the Usage instructions. Start by reading dist/composeSourceMaps.js and the source-map validation error, then check the related obfuscateCode.js and obfuscatingTransformer.js flow. Done means the debug bundle completes without the source-map mapping error.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
react-native, typescript
Domínio
build-system, mobile
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.