Closed
Labels
StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
Is this a bug report?
(Yes , 100000000%)
Have you read the Contributing Guidelines?
(Yes)
Environment
react-native -v:
react-native-cli: 2.0.1
react-native: 0.47.1
node -v:
v8.1.3
npm -v:
5.0.3
yarn --version:
0.27.5
Then, specify:
- Target Platform: Android
- Development Operating System: Windows10
- Build tools:
react-native run-android
Steps to Reproduce
You cannot easily reproduce error , this is a random cryptic error
Expected Behavior
Executing JS code must not depends on remote debug , So works well when remote debug is off or on
Actual Behavior
For android when remote debug is ON , code works and when OFF not works
Foe more information see:
https://medium.com/@jordan_mohi/cant-find-variable-symbol-in-react-native-782489d86bd7
#15786
#15497
Reproducible Demo
(N/A)
Metadata
Metadata
Assignees
Labels
StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Activity
iegik commentedon Sep 5, 2017
I think, it's not a bug, it is a feature.
With Debug enabled, I think for debug needs are included some additional es6 modules, such as
Request,Symbolor some ofRegExpfeatures, So, ensure, that You have all dependences included, before start to scripting.For example,
In production mode, you would not need to have redundant script included.
Also, try the following configuration in gradle:
sm2017 commentedon Sep 5, 2017
@iegik I think it is a bug because , I use
Symbolin a js file from 6 months ago , I don't change this file from 2-3 months ago , suddenly react-nativeCan’t find variable: Symbolonly on android when remote debug is not enabled (see #15786). If it is not a bug and a feature why iOS has not this feature?If you think it is a feature , Why we lost BackHandler on android when remote debug is off? (See #15497)
iegik commentedon Sep 5, 2017
@sm2017 You can also try to debug with Android Monitor or logcat
stale commentedon Nov 4, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
dummerbd commentedon Dec 20, 2017
Just fyi for people finding this issue via Google, the problem as I understand it is
Symbolis not supported in the current version of the JavaScript Core shipped with Android but it is supported natively on iOS which has a newer version of JSC. The reason you don't see this issue when using Remote Debug is because your JavaScript actually runs remotely in Chrome which does supportSymbol.Long story short, use a polyfill for now like
es6-symbol.joeytwiddle commentedon Feb 26, 2018
A possible polyfill solution is mentioned here