# Blank page - JavaScript error on Android

**URL:** https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642
**Category:** Bug
**Created:** [December 13, 2015, 11:18am UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642 "2015-12-13T11:18:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [December 13, 2015, 11:18am UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642/1 "2015-12-13T11:18:11Z")

</div>

##Info  
Uncaught TypeError: Cannot read property ‘user’ of undefined  
Url: [http://example.com/assets/application-622c68bf359d79a9bf2cb12ba4772774.js](http://example.com/assets/application-622c68bf359d79a9bf2cb12ba4772774.js)  
Line: 3  
Column: 30623  
Window Location: [http://example.com/](http://example.com/)

##Backtrace

```
TypeError: Cannot read property 'user' of undefined
    at p.extend.s.value (http://example.com/assets/application-622c68bf359d79a9bf2cb12ba4772774.js:3:30623)
    at null.<anonymous> (http://example.com/assets/application-622c68bf359d79a9bf2cb12ba4772774.js:1:5924)
    at a.d.get (http://example.com/assets/ember_jquery-c510009d3d7cecdf3f948f54d4922d9a.js:6:25589)
    at s (http://example.com/assets/ember_jquery-c510009d3d7cecdf3f948f54d4922d9a.js:7:30860)
    at l (http://example.com/assets/ember_jquery-c510009d3d7cecdf3f948f54d4922d9a.js:7:31452)
    at Object.s [as get] (http://example.com/assets/ember_jquery-c510009d3d7cecdf3f948f54d4922d9a.js:7:30849)
    at t.get (http://example.com/assets/application-622c68bf359d79a9bf2cb12ba4772774.js:1:20436)
    at n (http://example.com/assets/application-622c68bf359d79a9bf2cb12ba4772774.js:1:18524)
    at Object.Ember.TEMPLATES.mobile/list/topic_list_item.raw.Discourse.EmberCompatHandlebars.template.1 (http://example.com/assets/application-622c68bf359d79a9bf2cb12ba4772774.js:38:16392)
    at Object.o [as inverse] (http://example.com/assets/vendor-2ff9e230f5bc60c6d19b98f79e81c3d5.js:1:8834)

```

##Env  
`application_version	3c3d7c03f0cad4067988fce6e6e776a163875ff1`

##Repeatable in Chrome Dev Tools

 ![](https://global.discourse-cdn.com/meta/original/3X/b/0/b079a39df111f5ed5cd6809c4920f146d583c147.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/4/0/40588fc8764a5ef17a3cee0f28d128523743ac28.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/3/3/3394b4f7e35a6b8be49cc99ca860f4ee668444ad.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 13, 2015, 12:09pm UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642/2 "2015-12-13T12:09:15Z")

</div>

You can repro this here on meta?

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [December 13, 2015, 6:14pm UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642/3 "2015-12-13T18:14:07Z")

</div>

No, it looks data specific in that way. I have no additional plug ins and no customisations enabled.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [December 13, 2015, 7:41pm UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642/4 "2015-12-13T19:41:09Z")

</div>

Debugging this still further it looks like the `extras` data is empty for all users

 ![](https://global.discourse-cdn.com/meta/original/3X/2/9/2920ae181cd78bdd00e7b12892be4796a3c545cc.png)

At this point `t` is undefined after executing the `.filter` - so I dumped the data in `e` using `JSON.stringify(e)`:

```plaintext
[{
    "extras": null,
    "description": "Original Poster",
    "user_id": 10309,
    "user": {
        "id": 10309,
        "username": "andybarb",
        "avatar_template": "/user_avatar/example.com/andybarb/{size}/24058_1.png",
        "store": {}
    }
}, {
    "extras": null,
    "description": "Frequent Poster",
    "user_id": 651,
    "user": {
        "id": 651,
        "username": "CDMH",
        "avatar_template": "/user_avatar/example.com/cdmh/{size}/25343_1.png",
        "store": {}
    }
}, {
    "extras": null,
    "description": "Frequent Poster",
    "user_id": 20,
    "user": {
        "id": 20,
        "username": "Martyn",
        "avatar_template": "/user_avatar/example.com/martyn/{size}/22504_1.png",
        "store": {}
    }
}, {
    "extras": null,
    "description": "Frequent Poster",
    "user_id": 10155,
    "user": {
        "id": 10155,
        "username": "maxxbradley",
        "avatar_template": "/user_avatar/example.com/maxxbradley/{size}/21606_1.png",
        "store": {}
    }
}, {
    "extras": null,
    "description": "Frequent Poster",
    "user_id": 9929,
    "user": {
        "id": 9929,
        "username": "mark0",
        "avatar_template": "/letter_avatar_proxy/v2/letter/m/8e7dd6/{size}.png",
        "store": {}
    }
}]

```

* * *

##Edit - Possible Cause

I believe the cause to be a change in ownership of the last post on a topic which is listed on the forum’s latest topics.

### (Hopefully) Steps to Reproduce

- Have two existing test Users - “User 1” and “User 2”
- Take an topic with several posts
- the topic that caused the issue had 22 posts (inc. topic post) - created by users other than “User 1” and “User 2”
- Make a new post in thread using “User 1”
- this post was made 5 months later
- Select the “User 1” post using the spanner and then using “Select Posts…”
- Select “change ownership” from the menu which just appeared.
- Change the owner user from “User 1” to “User 2”
- Delete “User 1”.

##Expected Result

- Forum to still load on Android and Desktop browsers alike.

##Actual Result

- White / Blank screen when loaded on Android.
- Loads and works correctly on Desktop Chrome browser.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 13, 2015, 9:22pm UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642/5 "2015-12-13T21:22:31Z")

</div>

Excellent repro see if you can also repro and correct this @techapj?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [December 13, 2015, 9:27pm UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642/6 "2015-12-13T21:27:38Z")

</div>

Note, this is not an android bug,it’s a mobile Bug

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [December 14, 2015, 5:25am UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642/7 "2015-12-14T05:25:44Z")

</div>

This happens cause somehow we have a topic that has no latest poster.

I do not thing the client should crash out so I fixed that:

[https://github.com/discourse/discourse/commit/1ff5ed4e084b73d9b7e1ed4a1a624282a9970a12](https://github.com/discourse/discourse/commit/1ff5ed4e084b73d9b7e1ed4a1a624282a9970a12)

We should also clean up the “cast of characters” better in the case of user removals.

The bug in the OP is fixed

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [December 14, 2015, 3:05pm UTC](https://meta.discourse.org/t/blank-page-javascript-error-on-android/36642/8 "2015-12-14T15:05:52Z")

</div>

This topic was automatically closed after 6 hours. New replies are no longer allowed.
