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.

log failed with error: Event attribute value length should be less than 200

See original GitHub issue

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

Authentication, Analytics, GraphQL API, Storage, Push Notifications

Amplify Categories

auth, storage, analytics, notifications

Environment information

# Put output below this line
  System:
    OS: macOS 11.4
    CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
    Memory: 1.13 GB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 94.0.4606.61
    Safari: 14.1.1
  npmPackages:
    @aws-amplify/pushnotification: 4.2.10 => 4.2.10 
    @babel/core: ^7.12.9 => 7.15.5 
    @babel/plugin-proposal-decorators: 7.14.5 => 7.14.5 (7.15.4)
    @babel/runtime: ^7.12.5 => 7.15.4 
    @invertase/react-native-apple-authentication: 1.1.2 => 1.1.2 
    @react-native-async-storage/async-storage: 1.15.7 => 1.15.7 
    @react-native-community/art: 1.2.0 => 1.2.0 
    @react-native-community/eslint-config: ^2.0.0 => 2.0.0 
    @react-native-community/masked-view: 0.1.11 => 0.1.11 
    @react-native-community/netinfo: 6.0.0 => 6.0.0 
    @react-native-community/push-notification-ios: 1.10.1 => 1.10.1 (1.0.3)
    @react-navigation/drawer: 6.1.4 => 6.1.4 
    @react-navigation/native: 6.0.2 => 6.0.2 
    @react-navigation/native-stack: 6.1.0 => 6.1.0 
    @stripe/stripe-react-native: ^0.2.1 => 0.2.1 
    HelloWorld:  0.0.1 
    amazon-cognito-identity-js: 5.1.0 => 5.1.0 (5.1.1)
    appcenter-cli: 2.10.0 => 2.10.0 
    aws-amplify: 4.2.10 => 4.2.10 
    aws-appsync: 4.1.1 => 4.1.1 
    aws-sdk: 2.987.0 => 2.987.0 
    babel-jest: ^26.6.3 => 26.6.3 
    babel-plugin-transform-remove-console: 6.9.4 => 6.9.4 
    babel-preset-mobx: ^2.0.0 => 2.0.0 
    cardinal-direction: 1.1.1 => 1.1.1 
    convert-radix64: ^0.2.0 => 0.2.0 
    convert-units: 2.3.4 => 2.3.4 
    core-js: 3 => 3.17.3 
    es6-symbol: ^3.1.3 => 3.1.3 
    eslint: 7.14.0 => 7.14.0 
    eslint-plugin-react-hooks: ^2.0.0 => 2.5.1 (4.2.0)
    fast-text-encoding: 1.0.3 => 1.0.3 
    geodesy: ^2.2.0 => 2.2.1 
    graphql: 14.5.8 => 14.5.8 (14.0.0, 0.13.0)
    graphql-tag: 2.10.1 => 2.10.1 
    haversine: ^1.1.1 => 1.1.1 
    hermes-inspector-msggen:  1.0.0 
    jest: ^26.6.3 => 26.6.3 
    joi: 17.4.2 => 17.4.2 
    jsc-android: 241213.1.0 => 241213.1.0 (250230.2.1)
    lodash: ^4.17.15 => 4.17.21 
    metro-react-native-babel-preset: ^0.66.0 => 0.66.2 
    mobx: 6.3.2 => 6.3.2 
    mobx-react: 7.2.0 => 7.2.0 
    moment: 2.29.1 => 2.29.1 
    numeral: ^2.0.6 => 2.0.6 
    prop-types: ^15.7.2 => 15.7.2 
    react: 17.0.2 => 17.0.2 
    react-native: 0.65.1 => 0.65.1 
    react-native-app-intro-slider: 4.0.4 => 4.0.4 
    react-native-camera: 3.44.3 => 3.44.3 
    react-native-code-push: 7.0.2 => 7.0.2 
    react-native-codegen: ^0.0.7 => 0.0.7 
    react-native-config: 1.4.4 => 1.4.4 
    react-native-dash: 0.0.11 => 0.0.11 
    react-native-device-info: 8.3.0 => 8.3.0 
    react-native-elements: 2.0.0 => 2.0.0 
    react-native-gesture-handler: 1.10.3 => 1.10.3 
    react-native-inappbrowser-reborn: 3.6.3 => 3.6.3 
    react-native-json-tree: 1.3.0 => 1.3.0 
    react-native-maps: 0.28.0 => 0.28.0 
    react-native-modal: 12.1.0 => 12.1.0 
    react-native-modal-selector: 2.0.8 => 2.0.8 
    react-native-permissions: ^3.0.5 => 3.0.5 (2.2.2)
    react-native-phone-input: 1.1.0 => 1.1.0 
    react-native-picker-select: 8.0.4 => 8.0.4 
    react-native-progress: 5.0.0 => 5.0.0 
    react-native-qrcode-scanner: 1.5.4 => 1.5.4 
    react-native-reanimated: 2.2.2 => 2.2.2 
    react-native-restart: 0.0.22 => 0.0.22 
    react-native-safe-area-context: 3.3.0 => 3.3.0 
    react-native-screens: 3.6.0 => 3.6.0 
    react-native-splash-screen: 3.2.0 => 3.2.0 
    react-native-svg: 12.1.1 => 12.1.1 
    react-native-swipe-item: ^0.4.0 => 0.4.0 
    react-native-timeago: ^0.5.0 => 0.5.0 
    react-native-unordered-list: 1.0.4 => 1.0.4 
    react-native-user-inactivity: 1.2.0 => 1.2.0 
    react-native-vector-icons: 6.6.0 => 6.6.0 
    react-native-walkthrough-tooltip: 1.2.0 => 1.2.0 
    react-native-webview: 11.13.0 => 11.13.0 
    react-test-renderer: 17.0.2 => 17.0.2 
    text-encoding-polyfill: 0.6.7 => 0.6.7 
    typescript: 3.8.2 => 3.8.2 
    uuid: 8.3.2 => 8.3.2 (3.4.0, 3.3.2, 7.0.3)
    victory-native: 35.5.4 => 35.5.4 
    webpack: ^4.42.0 => 4.46.0 
  npmGlobalPackages:
    npm: 6.12.0
    react-native: 0.65.1

Describe the bug

Sending some custom logging/analytics via

Analytics.record({ name: 'log', attributes})

where attributes is

{"message":"AuthStore navigateTo: QR Scanning","sub":"google_118119099270084262167"}

app throws error even though inside try/catch

ERROR [ERROR] 24:09.27 EventsBuffer - event 5089fb44-20cc-11ec-b9cd-dbec317296cf : log failed with error: Event attribute value length should be less than 200.

Expected behavior

Given that the attributes are only 83 odd chars I would expect record to work. Others logs are working perfectly and from what I can tell in API specs it should silently truncate anyways

Reproduction steps

npx react-native run-ios

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

iphone 12 Simulator

Mobile Operating System

14.7

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
markl-vespercommented, Oct 25, 2021

Hi @chrisbonifacio

Yes - I believe it is. Will retest today and provide any applicable updates

0reactions
github-actions[bot]commented, Oct 28, 2022

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon Pinpoint quotas - AWS Documentation
Maximum number of characters per attribute value. 200. If the number of characters exceeds 200 the event is dropped. No ; Maximum number...
Read more >
Error: Member must have length less than or equal to 20 ...
I've checked again and in the template, there are 20 attributes under Schema. If I remove the phone_number_verified object, the stack is created ......
Read more >
Event Payloads - Sentry Developer Documentation
Event Payloads. Events are the fundamental data that clients, often through the use of an SDK, send to the Sentry server. Event payload...
Read more >
HTTP/1.1: Status Code Definitions
If a Content-Length header field is present in the response, its value MUST match the actual number of OCTETs transmitted in the message-body....
Read more >
HTTP status and error codes for JSON | Cloud Storage
Failed requests return status codes in the 4xx and 5xx ranges. ... Also, the example values given below are meant for illustration 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