-
-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"'getPrototypeOf' on proxy: trap returned neither object nor null" on Chrome 77 #428
Comments
Could you provide a small reproduction, for example in a code sandbox? |
Same issue in my project, but I can not reproduce it in the CodeSandbox demo. |
So it is not just the browser? Then some deeper diving is needed I fear.
Are there any polyfills active that could hamper the situation, cross
document transportation of the objects, etc etc?
…On Fri, Sep 20, 2019 at 9:08 AM Zhao ***@***.***> wrote:
Same issue in my project, but I can not reproduce it in the CodeSandbox
demo.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#428?email_source=notifications&email_token=AAN4NBBTWPSWKOJ5AGVQ43TQKSAHRA5CNFSM4IXNLMA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7F553A#issuecomment-533454572>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN4NBFJOYQAAGU52VHGPITQKSAHRANCNFSM4IXNLMAQ>
.
|
I got here because I'm having the same issue in node 12.11.0, and I think that you may find this useful. Here's how to reproduce it. Open a node v12.11.0 and paste this: Object.getPrototypeOf(new Proxy(Object.create(null), {
getPrototypeOf(target) {
return Reflect.getPrototypeOf(target)
}
})) I think it's a regression in v8 that shipped in chrome 77 and node v12.11.0. PS: I just updated chrome to 77 and I can reproduce. I couldn't before, with 76. |
@alcuadrado |
Seems like it! Probably best report it there. In my experience they are
quite receptive for this kind of pin-point accurate bugs and fix it quickly
Op vr 27 sep. 2019 03:50 schreef Zhao <[email protected]>:
… @alcuadrado <https://github.com/alcuadrado>
But this only happens in Node.js and Chrome. Is this a bug of V8?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#428?email_source=notifications&email_token=AAN4NBGZEMNYVXCFMSW7KVLQLVYIPA5CNFSM4IXNLMA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7XRYGY#issuecomment-535763995>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN4NBH6DES74LZNKWJ6BE3QLVYIPANCNFSM4IXNLMAQ>
.
|
Yes, it's a bug in v8.
|
Awesome, thanks!
…On Fri, Sep 27, 2019 at 4:00 PM Patricio Palladino ***@***.***> wrote:
But this only happens in Node.js and Chrome. Is this a bug of V8?
Yes, it's a bug in v8.
Probably best report it there
I did: https://bugs.chromium.org/p/v8/issues/detail?id=9781
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#428?email_source=notifications&email_token=AAN4NBENX27W7F3RJIT2GQDQLYNX7A5CNFSM4IXNLMA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7ZFUJA#issuecomment-535976484>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN4NBBW4I32YVK7XBWLDB3QLYNX7ANCNFSM4IXNLMAQ>
.
|
Closing now, as this is beyond Immer. Let's hope they ship soon, but at least the fix landed quickly :) |
🐛 Bug Report
isPlainObject
method throws a "'getPrototypeOf' on proxy: trap returned neither object nor null" on Chrome 77, with my current observation.I haven't locate the problem precisely, but I'll try to describe the whole progress at my best.
When manipulating a draft, I traced my code into a
isPlainObject
call on a draft, and an error above was thrown on the line:var proto = Object.getPrototypeOf(value);
.value
is a draft and when I digging in, into the getPrototypeOf trap:Object.getPrototypeOf(target.base)
correctly evaluates and returnsnull
in the devtool. After the trap returns, the error was thrown on the next step.What's worth noting is the error raised only on Chrome 77.
To Reproduce
Still trying to minimize reproduce.
Expected behavior
As the
getPrototypeOf
trap returnsnull
, the "'getPrototypeOf' on proxy: trap returned neither object nor null" error should not be thrown.Link to repro (highly encouraged)
Please provide either a CodeSandbox demo or a minimal repository on GitHub.
Environment
4.0.0
setUseProxies(true)
setUseProxies(false)
(ES5 only)with default settings
The text was updated successfully, but these errors were encountered: