endo
endo copied to clipboard
React Native Incompatibility: "failed to delete intrinsics.[object Object]syncGenerator%6length"
When running lockdown.umd.js inside Safari and calling lockdown(), the following error appears:
[Log] Removing intrinsics.%AsyncGenerator%.length
[Error] failed to delete intrinsics.[object Object]syncGenerator%6length
Console Evaluation (Console Evaluation 1:2063)
Console Evaluation (Console Evaluation 1:1937)
Console Evaluation (Console Evaluation 1:2046)
Console Evaluation (Console Evaluation 1:2074)
Console Evaluation (Console Evaluation 1:5249)
Console Evaluation (Console Evaluation 1:5306)
Console Evaluation (Console Evaluation 2:3)
evaluateWithScopeExtension
(anonymous function)
_wrapCall
< TypeError: Unable to delete property.
@erights It looks like there’s a non-standard non-configurable length property on AsyncGenerator. On the one hand, this seems to be a Safari bug, and on the other this is probably safe to allow. Should we retitle this to “Add AsyncGenerator.length to allow-list to accommodate Safari” and do the work?
I know I've run SES on Safari before. Is this new? Also, AsyncGenerator is a function. Functions have a length property. I'll investigate. Don't do anything until we understand this.
What version of Safari?
To try diagnosing this, I visited https://ses-demo.netlify.app/demos/console/ using Safari Version 14.1 (16611.1.21.161.3) . I found that my old Safari bug came back! I reopened it at
https://bugs.webkit.org/show_bug.cgi?id=222538#c17
After I revise endo to workaround that bug, I'll get back to this one.
That one is in progress at https://github.com/endojs/endo/pull/711
I cannot reproduce this. While running on my development version of #711 , running a local http server, and visiting http://localhost:8080/demos/console/ I get no errors in the console when I refresh. That demo calls lockdown with no arguments, letting everything default. What lockdown arguments are you using?
Revising to
lockdown({
errorTaming: 'unsafe',
stackFiltering: 'verbose',
overrideTaming: 'severe',
});
I was still not able to reproduce. This sets all possibly relevant lockdown options to their non-default setting.
@EtDu @kumavis What version of Safari are you using?
sorry for the safari/react-native confusion
@kumavis @EtDu what is the state of this? If it can now be closed, please close it.
apologies for the necropost, appreciate the raising of this issue ^ and prev comments
i'm also looking into this here
- https://github.com/LavaMoat/docs/issues/16
Revising to
lockdown({ errorTaming: 'unsafe', stackFiltering: 'verbose', overrideTaming: 'severe', });I was still not able to reproduce. This sets all possibly relevant lockdown options to their non-default setting.
after the revision
undefined is not an object (evaluating '(_console = console)._errorOriginal.apply')
undefined is not an object (evaluating (_console = console)._errorOriginal.apply')
any thoughts appreciated while i continue debugging
edit: if sticking to the original React Native title then imo should remain open till fully resolve and present a solution nb: it's an error on Android JSC only blocking runtime - not on Android V8 (various warnings), or iOS JSC (Promise warnings)
otherwise if renaming to Add AsyncGenerator.length to allow-list to accommodate Safari i think we can close this from your findings ^
@naugtur and i found the semi-root cause and raised the issue here
- https://github.com/react-native-community/jsc-android-buildscripts/issues/181
Ok, with that diagnosis, I agree we should
retitle this to “Add AsyncGenerator.length to allow-list to accommodate Safari” and do the work?
as @kriskowal suggests at https://github.com/endojs/endo/issues/660#issuecomment-834560524
Thanks @leotm !
Any idea why they do this?