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.

Can't find Variable: Symbol

See original GitHub issue

Describe the bug Using the library 1.1.27

Expected behavior No error should occur, since this was working fine untill now.

Screenshots image

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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ambeshHappiestMindscommented, May 9, 2019

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

0reactions
github-actions[bot]commented, Jun 12, 2021

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

Can't find variable: Symbol · Issue #15786 - GitHub
"Debug JS Remotely" is very buggy system , I have many issue with it I use Symbol in a js file from 6...
Read more >
React Native - Cant find variable: Symbol - Stack Overflow
I am writing an React-Native-Web (RNW) app. The basic design is a core application that takes a library of custom React-Native components as...
Read more >
How to Resolve The Cannot Find Symbol Error in Java - Rollbar
When the Java compiler encounters a use of an identifier which it cannot find in the symbol table, it raises the cannot find...
Read more >
Compiling ECS 6 for Safari - polyfill - Can't find Symbol
It works just fine but in safari everything is broken because of: Error: ReferenceError: Can't find variable: Symbol I search my ways and...
Read more >
What can cause the "cannot find symbol" error in Java?
The “cannot find symbol” error occurs mainly when we try to reference a variable that is not declared in the program which we...
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