Skip to content
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

React Native Incompatibility: "failed to delete intrinsics.[object Object]syncGenerator%6length" #660

Closed
Tracked by #12
EtDu opened this issue Apr 9, 2021 · 13 comments · Fixed by #1511
Closed
Tracked by #12
Assignees
Labels

Comments

@EtDu
Copy link

EtDu commented Apr 9, 2021

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.
@kumavis kumavis changed the title Safari Issue: failed to delete intrinsics.[object Object]syncGenerator%6length Safari (JavascriptCore) Incompatibility: "failed to delete intrinsics.[object Object]syncGenerator%6length" Apr 9, 2021
@kumavis kumavis changed the title Safari (JavascriptCore) Incompatibility: "failed to delete intrinsics.[object Object]syncGenerator%6length" Safari (JavaScriptCore) Incompatibility: "failed to delete intrinsics.[object Object]syncGenerator%6length" Apr 9, 2021
@kriskowal
Copy link
Member

@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?

@kriskowal kriskowal self-assigned this May 7, 2021
@erights
Copy link
Contributor

erights commented May 7, 2021

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?

@erights
Copy link
Contributor

erights commented May 7, 2021

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.

@erights
Copy link
Contributor

erights commented May 7, 2021

That one is in progress at #711

@erights
Copy link
Contributor

erights commented May 7, 2021

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?

@erights
Copy link
Contributor

erights commented May 7, 2021

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.

@erights
Copy link
Contributor

erights commented May 7, 2021

@EtDu @kumavis What version of Safari are you using?

@kumavis kumavis changed the title Safari (JavaScriptCore) Incompatibility: "failed to delete intrinsics.[object Object]syncGenerator%6length" React Native Incompatibility: "failed to delete intrinsics.[object Object]syncGenerator%6length" May 10, 2021
@kumavis
Copy link
Member

kumavis commented May 10, 2021

sorry for the safari/react-native confusion

@erights
Copy link
Contributor

erights commented Aug 2, 2022

@kumavis @EtDu what is the state of this? If it can now be closed, please close it.

@leotm
Copy link
Contributor

leotm commented Mar 9, 2023

apologies for the necropost, appreciate the raising of this issue ^ and prev comments

i'm also looking into this here

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 ^

@leotm
Copy link
Contributor

leotm commented Mar 14, 2023

@erights
Copy link
Contributor

erights commented Mar 14, 2023

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 #660 (comment)

Thanks @leotm !

Any idea why they do this?

@leotm
Copy link
Contributor

leotm commented Mar 14, 2023

no problemo! makes sense ^ not figured the why yet, but cloned the repo and run the big download (1.12GB) script to see (there's also various patches going on and issues, but none related to the length)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants