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

Nested #each on iOS8 #5606

Closed
jcohlmeyer opened this issue Sep 18, 2014 · 128 comments
Closed

Nested #each on iOS8 #5606

jcohlmeyer opened this issue Sep 18, 2014 · 128 comments
Assignees
Milestone

Comments

@jcohlmeyer
Copy link

Nested #each loops in handlebars do not render in Safari in iOS 8. Cause white screen of death and nothing renders. Returns error in console: TypeError: Attempted to assign to readonly property.

Tried with Ember 1.7.0 and 1.8 beta

Example:
http://emberjs.jsbin.com/vecuz/1/

@stefanpenner
Copy link
Member

http://emberjs.jsbin.com would be a good place to create a demo for this issue.

@jcohlmeyer
Copy link
Author

Thanks @stefanpenner does that link work for you? I am new to using jsbin.

@fivetanley
Copy link
Member

Sometimes you have to click "run" a few times or refresh, not sure why the s3 links don't work sometimes in jsbin.

@jcohlmeyer
Copy link
Author

Thanks @fivetanley I posted the link instead. Can you confirm that you can replicate the issue on iOS 8? It works fine on other browsers as far as I am aware, including Chrome on iOS 8.

@narkeeso
Copy link

Update: There seems to be a timing issue with iOS 8 Safari in the way that assets are loaded on SOME devices. I've confirmed this on an iPhone 5, but it works fine on iPhone 5S and 6.

Original Comment:

I am getting the same error message with Ember 1.6.1 complaining about this line inside Mixin.create():

// Mixin.create()
meta(proto).proto = proto; // this will disable observers on prototype

TypeError: Attempted to assign to readonly property.

@jcohlmeyer
Copy link
Author

@narkeeso Thanks. Have you found a workaround for this issue, or possible fix? My ember app is completely broken with iOS 8 ...

@stefanpenner
Copy link
Member

i'll take a look shortly. (I finally have some free time)

@jcohlmeyer
Copy link
Author

Thanks @stefanpenner

In case it helps this is the closest discussion I have been able to find: https://github.com/Polymer/platform/issues/66

@chrisvariety
Copy link
Contributor

Happening in our app too, leaving it unusable. Only on iPhone 5, iOS 8, in Simulator + on a real phone.

Pretty rough, I will post back here if I can figure out a workaround.

@stefanpenner
Copy link
Member

ah this is why went and installed Yosemite :P i forgot why ...

I believe i have free time this evening to dig in. Sorry for leaving this one hanging.

@stefanpenner stefanpenner self-assigned this Sep 23, 2014
@jcohlmeyer
Copy link
Author

Thanks @stefanpenner let me know how it goes and if you need any more info or if I can help in any way.

@stefanpenner
Copy link
Member

@jcohlmeyer hey I'm looking at this now. Unfortunately (unless I'm missing something) the jibs works fine on my iOS 8 Safari.

Can you double check your having issues still? Maybe also share further device info if possible

@stefanpenner
Copy link
Member

After reading i hear it might be a device specific problem. For note:

devices I have:

  • iPhone 5s iOS 8 (works)
  • iPad Retina Mini iOS 8 (works)
  • iPhone 4S iOS 8 (failse)
  • iPhone 4 (at work, i can it tomorrow)
  • iPhone 6 iOS8 (by @danmcclain) (works)

going to try the simulators after dinner

  • iOS 8.0 (12A365) Simulator (works)
  • iPhone 5 Simulator (fails)
  • iPhone 5c iOS 8 (doesn't work, but I don't have one handy)

@jcohlmeyer
Copy link
Author

Does not work on iOS 8 on iPhone 5c

@chrisvariety
Copy link
Contributor

Normal iPhone 5, iOS 8 it does not work. Both Simulator + the real live phone. If you choose the iPhone 6 simulator it works, but iPhone 5 simulator no go, even though they are both iOS 8 (12A365)

@stefanpenner
Copy link
Member

@chrisvariety awesome, both my 4s and the simulator you pointed out work. Digging in now.

@gpoitch
Copy link
Contributor

gpoitch commented Sep 24, 2014

Broken in iOS 8 on 4s / 5
Works in iOS 8 on 5s / 6 / 6 plus

Errors in backburner somewhere in this method: https://github.com/ebryn/backburner.js/blob/master/lib/backburner.js#L51-L78

TypeError: Attempted to assign to readonly property.

@stefanpenner
Copy link
Member

@gdub22 unfortunately that error is misleading. I have tracked it further and to

ret.descs = o_create(ret.descs);

@stefanpenner
Copy link
Member

now I'm going to try and dig up some inspiration/ideas for further exploration.

@johanneswuerbach
Copy link
Contributor

I'm running ember 1.7 and our error tracking is pointing to:

meta(proto).proto = proto; // this will disable observers on prototype

TypeError Attempted to assign to readonly property.

@stefanpenner
Copy link
Member

@johanneswuerbach i suspect this is not a coincidence.

@stefanpenner
Copy link
Member

@johanneswuerbach which device are you on?

@johanneswuerbach
Copy link
Contributor

Our error tracking just recorded a lot of errors from:

User-Agent  
Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A365 Safari/600.1.4

Isn't this the iOS 8 GM? Update: GM and final are the same build.

@chrisvariety
Copy link
Contributor

Similar issues

https://github.com/Polymer/platform/issues/66 -- same error, but this one is solved
uhop/dcl#15 -- good info here
angular/angular.js#9128
ibm-js/delite#259 -- here too. maybe.

@stefanpenner
Copy link
Member

@johanneswuerbach it appears to be a device specific issue.

@stefanpenner
Copy link
Member

@chrisvariety at first glance those are all related to DOM elements, as far as i can tell this property is configurable + writable and not a DOM object. (correct me if i am wrong)

@stefanpenner
Copy link
Member

@johanneswuerbach that line you pointed out, the error is actually within that function call. Unsure why safari reports it this way...

@narkeeso
Copy link

For even more confusion... Ember 1.6.1 works on our production environment but not in our development environment. Our theory is that there's something wrong/different with iOS 8 webkit asset loading.

@stefanpenner
Copy link
Member

apple what is going on here.

screenshot 2014-09-23 23 25 36

notice i have set ret.foo, but ret.proto.foo has been set...

This leads me to believe object.create is broken, and likely once opt'd (this is similar to a v8 bug we found in may/march of 2013)

@cjroebuck
Copy link

@stefanpenner After realising that the bug affects iPhone < 6 users I've rolled back ember and ember-data to their latest beta releases and re-deployed.

The ember/ember-data canary version which is still displaying the bug can now be loaded at https://bluebook.io/?version=canary

Many thanks for taking the time to look into this issue.

@stefanpenner
Copy link
Member

@cjroebuck are you sure its actually iPhone < 6 users? The bug ^^ is only armv7 devices, which doesn't include iphone 5s and various ipads. (basically 64bit devices are fine)

@stefanpenner
Copy link
Member

i have confirmed this is crashing a iphone 5

@stefanpenner stefanpenner reopened this Mar 9, 2015
@stefanpenner
Copy link
Member

@stefanpenner
Copy link
Member

this appears to be the same issue, but different manifestation. As such are previous reduction doesn't replicate. I need to run to lunch, will continue the investigation later.

If someone can help me reduce the problem more, that would be great.

@OrKoN
Copy link

OrKoN commented Mar 9, 2015

@stefanpenner some of our users complained that the app does not work with iphone 5s and ipad running iOS 8.1.2 (white screen). Unfortunately, we have no means to debug the issue but it looks similar to this one. We use Ember 1.8.1 though...

@stefanpenner
Copy link
Member

@OrKoN hmm, seems likely... This bug is rough, silly apple.

@stefanpenner
Copy link
Member

after many false starts, the problem is hilariously obvious. Our, use strict remover isn't removing the 'use stricts' cc @rwjblue

thank you mega massive @yahoo app, that nearly runs on canary :P

@rwjblue
Copy link
Member

rwjblue commented Mar 9, 2015

ugh, will fix the damned build :(

@rwjblue
Copy link
Member

rwjblue commented Mar 10, 2015

@stefanpenner - After review of the ember.prod.js output for the following builds:

The modules containing REMOVE_USE_STRICT: true definitely have 'use strict'; removed. We do not (and did not ever) intend to remove 'use strict'; from every module, only those specific ones that we identified hit this JIT problem.

The build system seems to be operating as intended....

@stefanpenner
Copy link
Member

the builds in my app, and this app do contain 'use strict', when we don't expect it. Maybe some interim build was borked? as does http://builds.emberjs.com/canary/ember.prod.js

file with annotation to drop use strict.
https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/utils.js#L1-L5

demonstrated app:
screen shot 2015-03-09 at 6 50 30 pm

http://builds.emberjs.com/canary/ember.prod.js
http://builds.emberjs.com/canary/ember.prod.js

@rwjblue
Copy link
Member

rwjblue commented Mar 10, 2015

@stefanpenner - Yes, you are correct. Something funky is going on. I'm on it....

@rwjblue rwjblue self-assigned this Mar 10, 2015
@rwjblue rwjblue added this to the 1.11.0 milestone Mar 10, 2015
@stefanpenner
Copy link
Member

@cjroebuck thanks for bringing this to our attention.

@rwjblue we should see if we can find someone to own/champion a more rigorous cross platform testing experience. Insure if this would have caught it.

I know, we are getting many of the apps at work up to canary, to help catch these issues. I'll make sure an armv7 device is included in those runs.

@rwjblue
Copy link
Member

rwjblue commented Mar 10, 2015

we should see if we can find someone to own/champion a more rigorous cross platform testing experience

I'd love to have this in general, but in this case Apple needs to fix their stupid JIT. The issue has been outstanding for quite a while, with no movement on their side. 😡

@rwjblue
Copy link
Member

rwjblue commented Mar 11, 2015

Submitted #10604 to fix the latest round of issues...

@stefanpenner
Copy link
Member

should be fixed again on master.

@j-mcnally
Copy link

Can this be tested via travis, or does anyone do CI for mobile devices?

@stefanpenner
Copy link
Member

Can this be tested via travis, or does anyone do CI for mobile devices?

this needs to be tested on a armv7 device (or simulator) we have wanted saucelabs style testing for some time, just lack a champion to move it forward.

@stefanpenner
Copy link
Member

looks like a proposed fix to JSC has landed: https://bugs.webkit.org/show_bug.cgi?id=138038
for those interested, the identify issue and patch are extremely interesting I would suggest reviewing.

@stefanpenner
Copy link
Member

looks like the fix was accepted: http://trac.webkit.org/changeset/184960 we may see it in a seed late june/july

@borhub
Copy link

borhub commented May 29, 2015

@stefanpenner Great to hear and thanks for all your work on this!

@typeoneerror
Copy link

Is there a current fix for this issue (I'm using Ember 2.4.3 and seeing this pop up with Mobile Safari iOS 8.2) or do we just recommend that users upgrade their OS?

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

No branches or pull requests