Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

43
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!