OS: macOS High Sierra 10.13.5
Node: 8.11.3
Yarn: 1.7.0
npm: 6.1.0
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.1 AI-173.4819257
Packages:
react: 16.0.0-alpha.12, 16.4.2
react-native: 0.47.2, 0.55.0
Othters:
iOS SDK: Platforms: iOS 11.4
Android SDK: Build Tools: 27.0.3 API Levels: 27
Chrome version: 68.0.3440.75 (Official Build) (64-bit)
When the minified jsbundle is running at android javascriptcore, the column number of error stack is not correct, causing the position of error at source code is also incorrect.
react-native@47, index.android.js ):/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Button,
ToastAndroid
} from 'react-native';
export default class rnGo47 extends Component {
_catchErrorStack() {
try {
throw new Error('catch-error');
} catch (e) {
console.log('-------catch-error-stack------', console.trace(e.stack));
ToastAndroid.show(e.stack.split('\n')[0], ToastAndroid.LONG, ToastAndroid.CENTER)
throw e
}
}
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!fasfwefew
</Text>
<Button title="_catchErrorStack" onPress={ this._catchErrorStack }></Button>
<Text style={{ height: 20 }}/>
<Text style={styles.instructions}>
To get started, edit index.android.js
</Text>
<Text style={styles.instructions}>
Double tap R on your keyboard to reload,{'\n'}
Shake or press menu button for dev menu
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('rnGo47', () => rnGo47);
Bundling index.android.js [production, minified, hmr disabled] 100.0% (263/263), done.react-native log-android to view console.log(errer.stack) at the terminal for android javascriptcore environment:08-11 08:19:11.176 16965 17029 D ReactNativeJS: value@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:12:575
08-11 08:19:11.176 16965 17029 D ReactNativeJS: touchableHandlePress@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:173:1494
08-11 08:19:11.176 16965 17029 D ReactNativeJS: [native code]
08-11 08:19:11.176 16965 17029 D ReactNativeJS: _performSideEffectsForTransition@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:166:8508
08-11 08:19:11.176 16965 17029 D ReactNativeJS: [native code]
08-11 08:19:11.176 16965 17029 D ReactNativeJS: _receiveSignal@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:166:7291
08-11 08:19:11.176 16965 17029 D ReactNativeJS: [native code]
08-11 08:19:11.176 16965 17029 D ReactNativeJS: touchableHandleResponderRelease@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:166:4735
08-11 08:19:11.176 16965 17029 D ReactNativeJS: [native code]
08-11 08:19:11.176 16965 17029 D ReactNativeJS: Gt@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:21842
08-11 08:19:11.176 16965 17029 D ReactNativeJS: invokeGuardedCallback@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:22167
08-11 08:19:11.176 16965 17029 D ReactNativeJS: invokeGuardedCallbackAndCatchFirstError@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:22289
08-11 08:19:11.176 16965 17029 D ReactNativeJS: C@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:1891
08-11 08:19:11.176 16965 17029 D ReactNativeJS: y@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:2093
08-11 08:19:11.176 16965 17029 D ReactNativeJS: nn@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:22894
08-11 08:19:11.176 16965 17029 D ReactNativeJS: rn@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:23001
08-11 08:19:11.176 16965 17029 D ReactNativeJS: forEach@[native code]
08-11 08:19:11.176 16965 17029 D ReactNativeJS: P@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:3040
08-11 08:19:11.176 16965 17029 D ReactNativeJS: processEventQueue@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:23844
08-11 08:19:11.176 16965 17029 D ReactNativeJS: G@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:5557
08-11 08:19:11.176 16965 17029 D ReactNativeJS: handleTopLevel@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:27395
08-11 08:19:11.176 16965 17029 D ReactNativeJS: http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:28897
08-11 08:19:11.176 16965 17029 D ReactNativeJS: qn@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:28122
08-11 08:19:11.176 16965 17029 D ReactNativeJS: z@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:6039
08-11 08:19:11.176 16965 17029 D ReactNativeJS: perform@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:114:3484
08-11 08:19:11.176 16965 17029 D ReactNativeJS: batchedUpdates@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:114:18574
08-11 08:19:11.176 16965 17029 D ReactNativeJS: Ce@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:10537
08-11 08:19:11.176 16965 17029 D ReactNativeJS: Q@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:6070
08-11 08:19:11.176 16965 17029 D ReactNativeJS: K@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:6132
08-11 08:19:11.176 16965 17029 D ReactNativeJS: _receiveRootNodeIDEvent@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:28868
08-11 08:19:11.176 16965 17029 D ReactNativeJS: receiveTouches@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:113:29248
08-11 08:19:11.176 16965 17029 D ReactNativeJS: value@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:30:3223
08-11 08:19:11.176 16965 17029 D ReactNativeJS: http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:30:957
08-11 08:19:11.176 16965 17029 D ReactNativeJS: value@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:30:2652
08-11 08:19:11.176 16965 17029 D ReactNativeJS: value@http://localhost:8081/index.android.bundle?platform=android&dev=false&hot=false&minify=true:30:929
08-11 08:19:11.176 16965 17029 D ReactNativeJS: [native code]
08-11 08:19:11.176 16965 17029 I ReactNativeJS: '-------catch-error-stack------', undefined
08-11 08:19:11.178 16965 17029 E ReactNativeJS: catch-error

!function(e){e.__DEV__=!1,e.__BUNDLE_START_TIME__=e.nativePerformanceNow?e.nativePerformanceNow():Date.now()}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(r){"use strict";function e(r,e,t){e in u||(u[e]={dependencyMap:t,exports:void 0,factory:r,hasError:!1,isInitialized:!1})}function t(r){var e=r,t=u[e];return t&&t.isInitialized?t.exports:i(e,t)}function i(e,t){if(!c&&r.ErrorUtils){c=!0;var i=void 0;try{i=n(e,t)}catch(e){r.ErrorUtils.reportFatalError(e)}return c=!1,i}return n(e,t)}function n(e,i){var n=r.nativeRequire;if(!i&&n&&(n(e),i=u[e]),!i)throw o(e);if(i.hasError)throw a(e,i.error);i.isInitialized=!0;var c=i.exports={},d=i,s=d.factory,f=d.dependencyMap;try{var l={exports:c};return s(r,t,l,c,f),i.factory=void 0,i.dependencyMap=void 0,i.exports=l.exports}catch(r){throw i.hasError=!0,i.error=r,i.isInitialized=!1,i.exports=void 0,r}}function o(r){var e='Requiring unknown module "'+r+'".';return Error(e)}function a(r,e){var t=r;return Error('Requiring module "'+t+'", which threw an exception: '+e)}r.require=t,r.__d=e;var u=Object.create(null),c=!1}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(n){Object.assign=function(n,e){for(var f=1;f<arguments.length;f++){var l=arguments[f];if(null!=l)for(var i in l)n[i]=l[i]}return n}}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(n){function r(r){return function(){var e=void 0;e=1===arguments.length&&"string"==typeof arguments[0]?arguments[0]:Array.prototype.map.call(arguments,function(n){return i(n,{depth:10})}).join(", ");var t=r;"Warning: "===e.slice(0,9)&&t>=a.error&&(t=a.warn),n.__inspectorLog&&n.__inspectorLog(l[t],e,[].slice.call(arguments),c),n.nativeLoggingHook(e,t)}}function e(n,r){return Array.apply(null,Array(r)).map(function(){return n})}function t(r){function t(n,r){var t=n.map(function(n,r){var t=e(" ",p[r]-n.length).join("");return n+t});return r=r||" ",t.join(r+"|"+r)}if(!Array.isArray(r)){var o=r;r=[];for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];l[u]=i,r.push(l)}}if(0===r.length)return void n.nativeLoggingHook("",a.info);var c=Object.keys(r[0]).sort(),f=[],p=[];c.forEach(function(n,e){p[e]=n.length;for(var t=0;t<r.length;t++){var o=(r[t][n]||"?").toString();f[t]=f[t]||[],f[t][e]=o,p[e]=Math.max(p[e],o.length)}});for(var s=p.map(function(n){return e("-",n).join("")}),g=t(s,"-"),y=t(c),v=[y,g],h=0;h<r.length;h++)v.push(t(f[h]));n.nativeLoggingHook("\n"+v.join("\n"),a.info)}function o(){}var i=function(){function n(n,e){var o={seen:[],stylize:r};return t(o,n,e.depth)}function r(n,r){return n}function e(n){var r={};return n.forEach(function(n,e){r[n]=!0}),r}function t(n,r,t){var f=o(n,r);if(f)return f;var p=Object.keys(r),s=e(p);if(b(r)&&(p.indexOf("message")>=0||p.indexOf("description")>=0))return i(r);if(0===p.length){if(m(r)){var g=r.name?": "+r.name:"";return n.stylize("[Function"+g+"]","special")}if(v(r))return n.stylize(RegExp.prototype.toString.call(r),"regexp");if(d(r))return n.stylize(Date.prototype.toString.call(r),"date");if(b(r))return i(r)}var y="",h=!1,j=["{","}"];if(c(r)&&(h=!0,j=["[","]"]),m(r)){var z=r.name?": "+r.name:"";y=" [Function"+z+"]"}if(v(r)&&(y=" "+RegExp.prototype.toString.call(r)),d(r)&&(y=" "+Date.prototype.toUTCString.call(r)),b(r)&&(y=" "+i(r)),0===p.length&&(!h||0==r.length))return j[0]+y+j[1];if(t<0)return v(r)?n.stylize(RegExp.prototype.toString.call(r),"regexp"):n.stylize("[Object]","special");n.seen.push(r);var O;return O=h?u(n,r,t,s,p):p.map(function(e){return a(n,r,t,s,e,h)}),n.seen.pop(),l(O,y,j)}function o(n,r){if(y(r))return n.stylize("undefined","undefined");if(g(r)){var e="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(e,"string")}return s(r)?n.stylize(""+r,"number"):f(r)?n.stylize(""+r,"boolean"):p(r)?n.stylize("null","null"):void 0}function i(n){return"["+Error.prototype.toString.call(n)+"]"}function u(n,r,e,t,o){for(var i=[],u=0,l=r.length;u<l;++u)z(r,String(u))?i.push(a(n,r,e,t,String(u),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(a(n,r,e,t,o,!0))}),i}function a(n,r,e,o,i,u){var a,l,c;if(c=Object.getOwnPropertyDescriptor(r,i)||{value:r[i]},c.get?l=c.set?n.stylize("[Getter/Setter]","special"):n.stylize("[Getter]","special"):c.set&&(l=n.stylize("[Setter]","special")),z(o,i)||(a="["+i+"]"),l||(n.seen.indexOf(c.value)<0?(l=p(e)?t(n,c.value,null):t(n,c.value,e-1),l.indexOf("\n")>-1&&(l=u?l.split("\n").map(function(n){return" "+n}).join("\n").substr(2):"\n"+l.split("\n").map(function(n){return" "+n}).join("\n"))):l=n.stylize("[Circular]","special")),y(a)){if(u&&i.match(/^\d+$/))return l;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=n.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=n.stylize(a,"string"))}return a+": "+l}function l(n,r,e){var t=0,o=n.reduce(function(n,r){return t++,r.indexOf("\n")>=0&&t++,n+r.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?e[0]+(""===r?"":r+"\n ")+" "+n.join(",\n ")+" "+e[1]:e[0]+r+" "+n.join(", ")+" "+e[1]}function c(n){return Array.isArray(n)}function f(n){return"boolean"==typeof n}function p(n){return null===n}function s(n){return"number"==typeof n}function g(n){return"string"==typeof n}function y(n){return void 0===n}function v(n){return h(n)&&"[object RegExp]"===j(n)}function h(n){return"object"==typeof n&&null!==n}function d(n){return h(n)&&"[object Date]"===j(n)}function b(n){return h(n)&&("[object Error]"===j(n)||n instanceof Error)}function m(n){return"function"==typeof n}function j(n){return Object.prototype.toString.call(n)}function z(n,r){return Object.prototype.hasOwnProperty.call(n,r)}return n}(),u="(index)",a={trace:0,info:1,warn:2,error:3},l=[];l[a.trace]="debug",l[a.info]="log",l[a.warn]="warning",l[a.error]="error";var c=1;if(n.nativeLoggingHook){n.console;n.console={error:r(a.error),info:r(a.info),log:r(a.info),warn:r(a.warn),trace:r(a.trace),debug:r(a.trace),table:t}}else n.console||(n.console={error:o,info:o,log:o,warn:o,trace:o,debug:o,table:o})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(r){var n=0,t=function(r){throw r},u={setGlobalHandler:function(r){t=r},getGlobalHandler:function(){return t},reportError:function(r){t&&t(r)},reportFatalError:function(r){t&&t(r,!0)},applyWithGuard:function(r,t,e){try{return n++,r.apply(t,e)}catch(r){u.reportError(r)}finally{n--}return null},applyWithGuardIfNeeded:function(r,n,t){return u.inGuard()?r.apply(n,t):(u.applyWithGuard(r,n,t),null)},inGuard:function(){return n},guard:function(r,n,t){function e(){return u.applyWithGuard(r,t||this,arguments,null,n)}return"function"!=typeof r?(console.warn("A function must be passed to ErrorUtils.guard, got ",r),null):(n=n||r.name||"<generated guard>",e)}};r.ErrorUtils=u}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(e){if(void 0===Number.EPSILON&&Object.defineProperty(Number,"EPSILON",{value:Math.pow(2,-52)}),void 0===Number.MAX_SAFE_INTEGER&&Object.defineProperty(Number,"MAX_SAFE_INTEGER",{value:Math.pow(2,53)-1}),void 0===Number.MIN_SAFE_INTEGER&&Object.defineProperty(Number,"MIN_SAFE_INTEGER",{value:-(Math.pow(2,53)-1)}),!Number.isNaN){var r=e.isNaN;Object.defineProperty(Number,"isNaN",{configurable:!0,enumerable:!1,value:function(e){return"number"==typeof e&&r(e)},writable:!0})}}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(t){String.prototype.startsWith||(String.prototype.startsWith=function(t){"use strict";if(null==this)throw TypeError();var r=String(this),n=arguments.length>1?Number(arguments[1])||0:0,e=Math.min(Math.max(n,0),r.length);return r.indexOf(String(t),n)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(t){"use strict";if(null==this)throw TypeError();var r=String(this),n=r.length,e=String(t),i=arguments.length>1?Number(arguments[1])||0:n,o=Math.min(Math.max(i,0),n),h=o-e.length;return!(h<0)&&r.lastIndexOf(e,h)===h}),String.prototype.repeat||(String.prototype.repeat=function(t){"use strict";if(null==this)throw TypeError();var r=String(this);if(t=Number(t)||0,t<0||t===1/0)throw RangeError();if(1===t)return r;for(var n="";t;)1&t&&(n+=r),(t>>=1)&&(r+=r);return n}),String.prototype.includes||(String.prototype.includes=function(t,r){"use strict";return"number"!=typeof r&&(r=0),!(r+t.length>this.length)&&this.indexOf(t,r)!==-1})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(e){function r(e,r){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=Object(this),t=n.length>>>0,o=0;o<t;o++)if(e.call(r,n[o],o,n))return o;return-1}Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{enumerable:!1,writable:!0,configurable:!0,value:r}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{enumerable:!1,writable:!0,configurable:!0,value:function(e,n){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");var t=r.call(this,e,n);return t===-1?void 0:this[t]}}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{enumerable:!1,writable:!0,configurable:!0,value:function(e){var r=Object(this),n=parseInt(r.length)||0;if(0===n)return!1;var t,o=parseInt(arguments[1])||0;o>=0?t=o:(t=n+o,t<0&&(t=0));for(var i;t<n;){if(i=r[t],e===i||e!==e&&i!==i)return!0;t++}return!1}})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(n){Array.from||(Array.from=function(n){if(null==n)throw new TypeError("Object is null or undefined");var e,o,t=arguments[1],f=arguments[2],r=this,l=Object(n),i="function"==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:"@@iterator",u="function"==typeof t,y="function"==typeof l[i],a=0;if(y){e="function"==typeof r?new r:[];for(var c,p=l[i]();!(c=p.next()).done;)o=c.value,u&&(o=t.call(f,o,a)),e[a]=o,a+=1;return e.length=a,e}var b=l.length;for((isNaN(b)||b<0)&&(b=0),e="function"==typeof r?new r(b):new Array(b);a<b;)o=l[a],u&&(o=t.call(f,o,a)),e[a]=o,a+=1;return e.length=a,e})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(e){!function(){"use strict";var e=Object.prototype.hasOwnProperty;"function"!=typeof Object.entries&&(Object.entries=function(n){if(null==n)throw new TypeError("Object.entries called on non-object");var t=[];for(var o in n)e.call(n,o)&&t.push([o,n[o]]);return t}),"function"!=typeof Object.values&&(Object.values=function(n){if(null==n)throw new TypeError("Object.values called on non-object");var t=[];for(var o in n)e.call(n,o)&&t.push(n[o]);return t})}()}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(e){var r=e.babelHelpers={};r.typeof="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof e},r.createRawReactElement=function(){var e="function"==typeof Symbol&&("function"==typeof Symbol?Symbol.for:"@@for")&&("function"==typeof Symbol?Symbol.for:"@@for")("react.element")||60103;return function(r,t,n){return{$$typeof:e,type:r,key:t,ref:null,props:n,_owner:null}}}(),r.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},r.createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),r.defineEnumerableProperties=function(e,r){for(var t in r){var n=r[t];n.configurable=n.enumerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,t,n)}return e},r.defineProperty=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},r._extends=r.extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.get=function e(r,t,n){null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,t);if(void 0===o){var i=Object.getPrototypeOf(r);return null===i?void 0:e(i,t,n)}if("value"in o)return o.value;var f=o.get;if(void 0!==f)return f.call(n)},r.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},r.interopRequireDefault=function(e){return e&&e.__esModule?e:{default:e}},r.interopRequireWildcard=function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r},r.objectWithoutProperties=function(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r},r.slicedToArray=function(){function e(e,r){var t=[],n=!0,o=!1,i=void 0;try{for(var f,u=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(f=u.next()).done)&&(t.push(f.value),!r||t.length!==r);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t}return function(r,t){if(Array.isArray(r))return r;if(("function"==typeof Symbol?Symbol.iterator:"@@iterator")in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r.taggedTemplateLiteral=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))},r.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},r.toConsumableArray=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}}("undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
__d(function(e,t,r,n){Object.defineProperty(n,"__esModule",{value:!0});var o=t(12),a=babelHelpers.interopRequireDefault(o),l=t(24),c=function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"_catchErrorStack",value:function(){try{throw new Error("catch-error")}catch(e){throw console.log("-------catch-error-stack------",console.trace(e.stack)),l.ToastAndroid.show(e.stack.split("\n")[0],l.ToastAndroid.LONG,l.ToastAndroid.CENTER),e}}},{key:"render",value:function(){return a.default.createElement(l.View,{style:s.container},a.default.createElement(l.Text,{style:s.welcome},"Welcome to React Native!fasfwefew"),a.default.createElement(l.Button,{title:"_catchErrorStack",onPress:this._catchErrorStack}),a.default.createElement(l.Text,{style:{height:20}}),a.default.createElement(l.Text,{style:s.instructions},"To get started, edit index.android.js"),a.default.createElement(l.Text,{style:s.instructions},"Double tap R on your keyboard to reload,","\n","Shake or press menu button for dev menu"))}}]),t}(o.Component);n.default=c;var s=l.StyleSheet.create({container:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"#F5FCFF"},welcome:{fontSize:20,textAlign:"center",margin:10},instructions:{textAlign:"center",color:"#333333",marginBottom:5}});l.AppRegistry.registerComponent("rnGo47",function(){return c})},0);
......... code continue ...........
the last line (:12) is the minified module of the above-mentioned test code named index.android.js
and the correct column of error stack should be :431 at throw new Error("catch-error")
Can you run react-native info and edit your issue to include these results under the Environment section?
If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.
Inspired by @rafeca
I found that it's working to get the correct line/column of a error stack by using react-community/jsc-android-buildscripts
@react-native-bot maybe react-native should update the android jsc
I am closing this issue because it does not contain the necessary environment info, and there has been no followup in a while.
If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.
@react-native-bot Some days ago, I have added the necessary environment info by modifying the original issue. This issue has not to be fixed in the latest release, so it should not to be closed. It is recommend and necessary to update jsc for android.
Most helpful comment
@react-native-bot Some days ago, I have added the necessary environment info by modifying the original issue. This issue has not to be fixed in the latest release, so it should not to be closed. It is recommend and necessary to update jsc for android.