Can't find Variable: Symbol
See original GitHub issueDescribe the bug Using the library 1.1.27
Expected behavior No error should occur, since this was working fine untill now.
Screenshots
Smartphone (please complete the following information):
- Device: Redmi note 5 pro
- OS: android
Sample code Adding the sample code here https://github.com/Samykills/AwsAmplifyExp
awsAmplify.js `import Amplify, { Analytics } from “aws-amplify”; import Config from “react-native-config”; import { Platform } from “react-native”; import { AppContext } from “react-native-ss-app-core”; class AwsAmplify { static initalize() { const amplifyConfig = { Auth: { identityPoolId: Config.AWS_COGNITO_IDENTITY_POOL_ID, region: “us-east-1” } }; //Initialize Amplify Amplify.configure(amplifyConfig);
const analyticsConfig = {
AWSPinpoint: {
// Amazon Pinpoint App Client ID
appId: Config.AWS_PINPOINT_APP_ID,
// Amazon service region
region: "us-east-1",
mandatorySignIn: false
}
};
Analytics.configure(analyticsConfig);
}
/** *
- @param {String} eventName - name of the event or module - “traffic”
- @param {String} type - Type of event- (“entry”/“exit”) or anything
- @param {String} value - Type of event- can be null or anything */ static recordEvent(eventName, action, title) { let attributesJson = {}; let appContext = AppContext.getAppContext(); attributesJson[“action”] = JSON.stringify(action); attributesJson[“title”] = title; attributesJson[“zoneSelected”] = appContext.parentZoneName; attributesJson[“os”] = Platform.OS; attributesJson[“version”] = Config.CODE_PUSH_VERSION; attributesJson[“eventTimeStamp”] = new Date().getTime().toString(); if (appContext.sessionData) { let sessionData = JSON.parse(appContext.sessionData); attributesJson[“userId”] = sessionData.userId.toString(); sessionData.tenantId ? (attributesJson[“tenantId”] = sessionData.tenantId.toString()) : null; sessionData.tenantDto ? (attributesJson[“tenantname”] = sessionData.tenantDto.name.toString()) : null; }
Analytics.record({
name: eventName,
attributes: attributesJson
});
} }
export default AwsAmplify;` You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = ‘DEBUG’; in your app. Adding debug log here :
Can’t find variable: Symbol <unknown> constants.js:19:54 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> API.js:74:18 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> index.js:15:12 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> index.js:26:12 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> SSAnalytics.js:1 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> index.js:1 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> emsLocationComponent.js:14 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> index.js:1 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> firebaseNotification.js:6 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> index.js:2 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> campusFeedbackServiceManager.js:2 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> campusFeedbackComponent.js:18 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> index.js:1 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> app-router.js:19 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> index.android.js:4 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> App.js:3 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:148:36 _require require.js:132:20 <unknown> index.js:2 loadModuleImplementation require.js:214:12 guardedLoadModule require.js:141:45 _require require.js:132:20 global code
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:17 (3 by maintainers)
Top GitHub Comments
To those who are still facing this issue
To resolve this followed following post https://github.com/facebook/react-native/issues/15786#issuecomment-404834632
basically this issue occurred since JavaScriptCore might be not updated on your device or emulator your best bet will be to try jsc-android-buildscripts to provide this compatibility below is the instruction to integrate same on Android
https://github.com/react-native-community/jsc-android-buildscripts#how-to-use-it-with-my-react-native-app
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.