question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Data does not reach Aws Kinesis from React Native correctly

See original GitHub issue

When i send data with:

  let datadummie = 'Hello World'
 await Analytics.record({
 data: datadummie,
 streamName: 'ClientLoginStreamRN-dev'
}, 'AWSKinesis');

This is executed through a lambda that sends the data through python correctly, but when I deal with react native the data reaches me as:

In Cloudwatch of my lambda: 15:34:35 Before decoding: AAAAAAAAAAAAAAAA

My lambda decode is:

def decode(encoded_client):
    print("Before decoding: ", encoded_client)
    payload=base64.b64decode(encoded_client).decode("utf-8")
    print(payload)
    #payload=json.loads(payload)
    print("Decoded payload: " + str(payload))
    print('tipo:', type(payload))

    return payload

My kinesis job has data encryption disabled, so I don’t know why amplify converts the data to “AAAAAAAAA”.

Thanks.

To Reproduce Steps to reproduce the behavior: 1.- Create a react native app 2.- Import aws-sdk and configure kinesis with amplify. 3.- Create Lambda where configure how trigger when kinesis take the data. 4.- Execute the sendData().

Expected behavior It is hoped that through my lambda I can have the information I am sending in kinesis.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Amplifiyercommented, Apr 29, 2020

The fix is out on the unstable version of aws-amplify aws-amplify@unstable and will be available in stable release in next few days.

1reaction
IronTonycommented, Oct 1, 2020

I still have the same problem only on a React-Native application. image

With the same configuration everything is work on a web React app. Any help please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started in React Native - AWS SDK for JavaScript
This tutorial shows you how you can create a React Native app that connects to Amazon S3 to create and delete an Amazon...
Read more >
Troubleshoot data delivery failure between Kinesis and S3
If there is no data reaching Kinesis Data Firehose, then the issue might reside upstream. For a direct PUT operation, confirm that the...
Read more >
Class: AWS.Kinesis — AWS SDK for JavaScript
Amazon Kinesis Data Streams is a managed service that scales elastically for ... This feature is only available in the Node.js environment.
Read more >
Troubleshooting Kinesis Data Streams Consumers
Get solutions to problems found while using Amazon Kinesis Data Streams ... To avoid infinite retries on a recurring failure, the KCL does...
Read more >
Analytics - Getting started - React Native - AWS Amplify Docs
The Analytics category enables you to collect analytics data for your app. The Analytics category comes with built-in support for Amazon Pinpoint and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found