Open RedMickey opened 4 years ago
Thank you for reporting this! We are excited to to help in any way possible, although, as I mentioned in the other report, there may be some delay during the holidays.
This error happens when the size getter is called before the constructor has initialized the object, which are first sight seems impossible. However construction is in fact a two-stage process - first we allocate the object and then we call the constructor. I guess it is theoretically possible that the debugger could be invoked between them. That would explain why the getter would observe an uninitialized state.
You said that you "are trying to extend __proto__
object content". What do you mean by that specifically?
@tmikov, I meant clicking on the dropdown icon on __proto__
view in Google Chrome Scope
tab to watch detailed info about __proto__
object. This action triggers Google Chrome to send Chrome DevTools Protocol message to Hermes debugger to retrieve data about __proto__
object.
@tmikov, we've faced a new one problem similar to described earlier one. When we try to watch function info clicking the dropdown icon on its view in Google Chrome, the application crashes throwing the following error:
setTimeout
function in Global
object
resolve
function
But not all functions cause such error, we are still able to watch info about some functions. For example we can watch the following functions' info:
One guess I have is the debugger is calling the size getter as part of inspecting the __proto__
object, which causes it to be invoked with an incorrect this
. I think the problem here is not so much the behavior of the getter, but the exception propagating out of the debugger and into the app.
IIRC, we may have already fixed this. We will look into it and post an update.
I believe this was due to exceptions thrown while inspecting properties, which were not well handled in native. This has since been fixed and I'm unable to reproduce it as described.
Hello, we tested debugging of a React Native Hermes application (React Native v0.64.0 and Hermes engine v0.7.2) and could reproduce the problem with crashing of the debugged application. On debugging a Hermes application in Google Chrome we tried to inspect the contents of Map
and Set
Javascript objects as before. Currently the application being debugged doesn't show an error message, it shuts down without an error.
Trying to inspect the contents of the __proto__
object of a Map
Trying to inspect setTimeout
function in the Global
object
Hello, we tested debugging of a new React Native Hermes application (React Native v0.66.0 and Hermes engine v0.9.0) and found out that this issue is no longer reproducible for Android applications.
For iOS application we couldn't reproduce the issue in case of setTimeout
function in the Global
object. But we could reproduce the problem with crashing of the debugged iOS application when we’re trying to inspect the contents of Map
and Set
JavaScript objects as before. The application being debugged doesn’t show an error message, it just shuts down without an error.
__proto__
object of a MapAndroid app | iOS app |
---|---|
setTimeout
function in the Global
objectAndroid app | iOS app |
---|---|
Hey, I still can repro this issue on iOS app using Flipper, could you please have look on this?
Hello @EzioLi01, could you share some details on the specific steps (and builds) you're using? I can't seem to reproduce this locally using the descriptions above (e.g. inspecting __proto__
of a map on iOS
).
If you can share the stack trace of the crash, that'd be very helpful as well. Thanks!
I cannot seem to reproduce this on current versions.
Starting with a new RN application created with npx react-native init
, then adding the code in the examples above:
let timerId = setInterval(() => {
let map = new Map();
map.set(1, 'testValue');
map.set('keyValue', 'test');
let set = new Set([1, 2, 3, 4, 5]);
console.log(map);
console.log(set);
console.log('hi');
}, 7000);
I can inspect both the __proto__
of maps, and setTimeout
on Global
:
Are there still steps that can reproduce the error?
Hello, we are the development team of VS Code extension for debugging React Native apps (vscode-react-native). On debugging a Hermes application (React Native v0.61.5) in Google Chrome we tried to watch the contents of
Map
andSet
Javascript objects and faced the problem of crashing of the debugged application. The error occurs when we are trying to extend__proto__
object content. This behavior is the same forMap
andSet
objects.__proto__
object content ofMap
__proto__
object content ofSet
Is this an expected behavior?
For reference: the list of known issues with Hermes debugging for React Native Tools extension.