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

Android 4.2.2 physical device error #1377

Closed
okonon opened this issue May 13, 2014 · 11 comments
Closed

Android 4.2.2 physical device error #1377

okonon opened this issue May 13, 2014 · 11 comments
Assignees

Comments

@okonon
Copy link

okonon commented May 13, 2014

When I run my app on physical device I get following error:
Web Console: Uncaught TypeError: Cannot read property 'width' of null at file:///android_asset/www/bower_components/ionic/release/js/ionic.js:5679

@CoenWarmer
Copy link

I'm always amazed when people open issues like this and provide 0 code and 0 context and expect their issue to be fixed.......

@okonon
Copy link
Author

okonon commented May 14, 2014

I do not expect anything... so i will close the issue... I guess i am the only one having this issue.

@okonon okonon closed this as completed May 14, 2014
@tlancina
Copy link
Contributor

I noticed this testing a few days ago, probably worth checking out at some point, although it didn't seem to break anything. It was in requestAnimationFrame on the initial load if I recall.

@tlancina tlancina reopened this May 14, 2014
@tlancina tlancina self-assigned this May 14, 2014
@okonon
Copy link
Author

okonon commented May 15, 2014

Yeah, i noticed it would throw this error when you change views... I am using android-tools -> monitor. running on Samsung Galaxy S cyanogen 10.1.3.1-eepicmtd, android 4.2.2

@gylippus
Copy link

This error is coming from the domUtil around line 6012 (as of beta5) in ionic.bundle.js

if(c.nodeType == 3) {
    childSize = ionic.DomUtil.getTextBounds(c).width;
}

It appears that some versions of Android will not allow the ionic.DomUtil#getTextBounds method to use range.selectNodeContents(textNode); on the elements in the nav bar. This method was created back in November 2013 commit, so the issue has likely existed for some time, but the fact that it is only on certain Android versions is why it has not been seen for everyone. I don't believe it is affecting performance having done few experiments testing without it.

Just to track from here and the forum. The Android versions it has been seen on are 4.2.2, 4.3.0 and as far as I can tell the nav bar just needs to have any buttons or title to get the error.

@keithdmoore
Copy link
Contributor

softBarbarian Thanks for reporting this. I saw the same error in the log and I was going to report it.

@tplessis
Copy link

I still have the same bug with the last beta 6 release. Do you know when this bug will be fixed?

@tlancina
Copy link
Contributor

@tplessis it doesn't seem to be breaking anything at the moment so it's a pretty low priority, feel free to look into it and submit a PR if you would like.

@okonon
Copy link
Author

okonon commented Jun 12, 2014

Hello, again currently we collect remote error logs, this error is filling up our logs! I think I am going to have to hardcode some logic to our logger to ignore it until this is fixed.

@fredgalvao
Copy link

This seems to break title alignment on the cases where the error pops up. The align-title property has no effect whatsoever on the devices that this error shows itself. This has existed since the first beta iirc.

@okonon
Copy link
Author

okonon commented Jun 20, 2014

Tested. All is good!

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants