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

40
Visualizações
URL.hostname is not implemented

I'm looking for some help on my textract client project. I am trying to follow the AWS Textract documentation, but I am stuck at the textractClient.send(). I am getting the error URL.hostname is not implemented

I have followed the steps on AWS to set up my IAM, S3, and I have updated my ~/.aws/config and credentials files. I left out a couple of fields but here's my code:

import { AnalyzeExpenseCommand } from  "@aws-sdk/client-textract";
import  { TextractClient } from "@aws-sdk/client-textract";
...
const textractClient = new TextractClient({ region: 'us-east-1' });

const bucket = 'scannsplit-s3-bucket'
const photo = 'Sojuba.png'

// Set params
const params = {
    Document: {
        S3Object: {
            Bucket: bucket,
            Name: photo
        },
    },
}
...
const process_text_detection = async () => {
    try {
        const aExpense = new StartExpenseAnalysisCommand(params);
        console.log(aExpense);
        const response = await textractClient.send(aExpense);
        console.log(response);
        return response; // For unit tests.
     } catch (error) {
        console.log('Error: ' + error);
    }
}
...
process_text_detection() is being called with a button

What I've tried: I came across this other post Error "URL.hostname is not implemented", AWS SNS in React Native Android that seems to have a similar issue. I tried the solution and after I installed react-native-url-polyfill and react-native-get-random-values, I got the error Native module is not found. I tried looking for fixes for that error but also did not have much luck.

Any help is much appreciated.

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