Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
React Native AWS Location

I am trying to create a mobile app and use AWS location trackers. I have the following code:

import React from 'react';
import AWS from 'aws-sdk/dist/aws-sdk-react-native';

export default function App() {
  const client = new AWS.Location({
    region: 'eu-west1',
    credentials: {
         ...
    }
  })
  return (
    <View style={styles.container}>
      <Text> Altitude</Text>
    </View>
  );
}
const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

And I get a fatal error which I have never encountered before.

<--- Last few GCs --->

[33230:0x561df76b3e60]    55471 ms: Mark-sweep 1965.5 (2085.9) -> 1961.2 (2092.1) MB, 4608.8 / 0.0 ms  (average mu = 0.536, current mu = 0.059) allocation failure scavenge might not succeed
[33230:0x561df76b3e60]    60543 ms: Mark-sweep 1977.7 (2092.1) -> 1972.3 (2098.1) MB, 5041.5 / 0.0 ms  (average mu = 0.335, current mu = 0.006) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

 1: 0x561df464fc81 node::Abort() [/usr/bin/node]
 2: 0x561df4556d9b node::FatalError(char const*, char const*) [/usr/bin/node]
 3: 0x561df4829ea2 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
 4: 0x561df482a108 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
 5: 0x561df49cc6c6  [/usr/bin/node]
 6: 0x561df49dd962 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node]
 7: 0x561df49dfc5a v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin,



v8::internal::AllocationAlignment) [/usr/bin/node]
 8: 0x561df49dfce7 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/bin/node]
 9: 0x561df49a39dd v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/bin/node]
10: 0x561df4cdf6db v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/bin/node]
11: 0x561df50845d9  [/usr/bin/node]

I would be grateful if someone can provide me with some tips for dealing with this issue. Note that I removed all useless parts of the code in order to reproduce the bug. Thank you!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda