Closed Dheeeraj closed 2 years ago
Finally i was able to figure out the cause. It is because of react-native-url-polyfill
which has a dependency
whatwg-url-without-unicode: "8.0.0-3"
i had to make following changes inside node_modules/whatwg-url-without-unicode/lib/url-state-machine.js
-const punycode = require("punycode");
+const punycode = require("punycode/");
//replace all
- punycode.ucs2.decode
+ punycode.ucs2decode
and patch it with patch-package
I wasn't too happy about patching module, thus I tried to find another way to fix it on consumer side. see: https://github.com/charpeni/whatwg-url/issues/5#issuecomment-1608591564
I just added to package.json the previous version of punycode instead of patch
"resolutions": {
"punycode": "1.4.1"
}
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication, Analytics
Amplify Categories
auth
Environment information
Describe the bug
Recently i tried to update react native from
to
In old configuration
amplify pull
and running project is working as expected events are being sent if i do the same in the new configuration i'm getting following errorTypeError: undefined is not an object (evaluating 'punycode.ucs2.decode')
Expected behavior
Sending analytics object to AWSKinesisFirehoseProvider
Reproduction steps
Sending any record to analytics triggers the following error
i'm not using any auth sign in functions( i guess its failing to sign in as Guest) since i'm trying to send events immediately after app starts
Code Snippet
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response