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

Can't delete my toots because of "t is undefined" #4928

Closed
Sp3r4z opened this Issue Sep 13, 2017 · 9 comments

Comments

Projects
None yet
7 participants
@Sp3r4z

Sp3r4z commented Sep 13, 2017

When I want to delete one of my toot, I click on "delete" link and nothing happens, the "confirmation toolbox" don't come, and Firefox (52.3.0) devtools give me an error message "TypeError: t is undefined".
Screen picture here: error message

PS: when I reload the page, it's "fix" the issue and I can delete my toot. But, some minutes later, problem still here…

My instance is: Mastodon.xyz, it's v1.6.0

Hope that can help you fixing issue.

@TheKinrar

This comment has been minimized.

Show comment
Hide comment
@TheKinrar

TheKinrar Sep 13, 2017

Collaborator

Just checked I can delete my own toots so it doesn't look like an instance-related problem.

Collaborator

TheKinrar commented Sep 13, 2017

Just checked I can delete my own toots so it doesn't look like an instance-related problem.

@Sp3r4z

This comment has been minimized.

Show comment
Hide comment
@Sp3r4z

Sp3r4z Sep 13, 2017

After some tests, with and without delete confirmation: problem doesn't appear in both situation…

It's not the first time, since v1.6.0 update, and always same problem about "t is undefined". I can't really explain why… Very curious and strange issue.

Sp3r4z commented Sep 13, 2017

After some tests, with and without delete confirmation: problem doesn't appear in both situation…

It's not the first time, since v1.6.0 update, and always same problem about "t is undefined". I can't really explain why… Very curious and strange issue.

@syui

This comment has been minimized.

Show comment
Hide comment
@syui

syui Sep 16, 2017

Contributor

I have the same problem. (Can't delete my toots because)

example delete : https://mstdn.syui.cf/@syui/473

version : 1.6.0(6c81f9d)

# Delete Toot !
$ url=https://mstdn.syui.cf/api/v1/statuses/473
$ curl -X DELETE $url -H "Authorization: Bearer $access_token"
> {}

# Check Toot ! (Can't delete my toots because)
$ curl -X GET $url -H "Authorization: Bearer $access_token"
{
  "id": 473,
  "created_at": "2017-09-15",
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "ja",
  "uri": "http://mstdn.syui.cf/users/syui/statuses/473",
  "content": "<p>up : master(472df245)</p>",
  "url": "http://mstdn.syui.cf/@syui/473",
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "pinned": false,
  "reblog": null,
  "application": {
    "name": "test",
    "website": null
  }
}
Contributor

syui commented Sep 16, 2017

I have the same problem. (Can't delete my toots because)

example delete : https://mstdn.syui.cf/@syui/473

version : 1.6.0(6c81f9d)

# Delete Toot !
$ url=https://mstdn.syui.cf/api/v1/statuses/473
$ curl -X DELETE $url -H "Authorization: Bearer $access_token"
> {}

# Check Toot ! (Can't delete my toots because)
$ curl -X GET $url -H "Authorization: Bearer $access_token"
{
  "id": 473,
  "created_at": "2017-09-15",
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "ja",
  "uri": "http://mstdn.syui.cf/users/syui/statuses/473",
  "content": "<p>up : master(472df245)</p>",
  "url": "http://mstdn.syui.cf/@syui/473",
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "pinned": false,
  "reblog": null,
  "application": {
    "name": "test",
    "website": null
  }
}
@syui

This comment has been minimized.

Show comment
Hide comment
@syui

syui Sep 16, 2017

Contributor
$ curl -v -X DELETE ...

https://mstdn.syui.cf/api/v1/statuses/473
*   Trying 133.19.20.31...
* TCP_NODELAY set
* Connected to mstdn.syui.cf (133.19.20.31) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate: xxxxxxx.cloudflaressl.com
* Server certificate: COMODO ECC Domain Validation Secure Server CA 2
* Server certificate: COMODO ECC Certification Authority
> DELETE /api/v1/statuses/473 HTTP/1.1
> Host: mstdn.syui.cf
> User-Agent: curl/1.00
> Accept: */*
> Authorization: Bearer xxxxxxxxxxxxx
> Content-Type: application/json
>
< HTTP/1.1 200 OK
< Date: Sat, 16 Sep 2017 00:00:00 GMT
< Content-Type: application/json; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: __cfduid=xxxxxxxx; expires=Sun, 16-Sep-18 00:00:00 GMT; path=/; domain=.syui.cf; HttpOnly
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< X-Xss-Protection: 1; mode=block
< X-Ratelimit-Limit: 300
< X-Ratelimit-Remaining: 299
< X-Ratelimit-Reset: 2017-09-16
< Vary: Accept-Encoding, Origin
< Etag: W/"xxxxxxx"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: xxxxxxxx
< X-Runtime: 0.000
< Via: 1.1 vegur
< Strict-Transport-Security: max-age=0000000; includeSubDomains; preload
< Server: cloudflare-nginx
< CF-RAY: xxxx
<
* Connection #0 to host mstdn.syui.cf left intact
Contributor

syui commented Sep 16, 2017

$ curl -v -X DELETE ...

https://mstdn.syui.cf/api/v1/statuses/473
*   Trying 133.19.20.31...
* TCP_NODELAY set
* Connected to mstdn.syui.cf (133.19.20.31) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate: xxxxxxx.cloudflaressl.com
* Server certificate: COMODO ECC Domain Validation Secure Server CA 2
* Server certificate: COMODO ECC Certification Authority
> DELETE /api/v1/statuses/473 HTTP/1.1
> Host: mstdn.syui.cf
> User-Agent: curl/1.00
> Accept: */*
> Authorization: Bearer xxxxxxxxxxxxx
> Content-Type: application/json
>
< HTTP/1.1 200 OK
< Date: Sat, 16 Sep 2017 00:00:00 GMT
< Content-Type: application/json; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: __cfduid=xxxxxxxx; expires=Sun, 16-Sep-18 00:00:00 GMT; path=/; domain=.syui.cf; HttpOnly
< X-Frame-Options: DENY
< X-Content-Type-Options: nosniff
< X-Xss-Protection: 1; mode=block
< X-Ratelimit-Limit: 300
< X-Ratelimit-Remaining: 299
< X-Ratelimit-Reset: 2017-09-16
< Vary: Accept-Encoding, Origin
< Etag: W/"xxxxxxx"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: xxxxxxxx
< X-Runtime: 0.000
< Via: 1.1 vegur
< Strict-Transport-Security: max-age=0000000; includeSubDomains; preload
< Server: cloudflare-nginx
< CF-RAY: xxxx
<
* Connection #0 to host mstdn.syui.cf left intact
@syui

This comment has been minimized.

Show comment
Hide comment
@syui

syui Sep 16, 2017

Contributor

I problem was solved.

What I did :

$ heroku buildpacks:remove https://github.com/rcaught/heroku-buildpack-cmake
$ git merge : master(efec5072)
$ heroku repo:purge_cache -a $APP_NAME
$ heroku config:set MAX_THREADS=2 -a $APP_NAME
Contributor

syui commented Sep 16, 2017

I problem was solved.

What I did :

$ heroku buildpacks:remove https://github.com/rcaught/heroku-buildpack-cmake
$ git merge : master(efec5072)
$ heroku repo:purge_cache -a $APP_NAME
$ heroku config:set MAX_THREADS=2 -a $APP_NAME
@Sciss

This comment has been minimized.

Show comment
Hide comment
@Sciss

Sciss Oct 1, 2017

I have the same problem. It seems to have to do with 'cleaning up' modal dialogs. For example, I can reproduce this by clicking on content (image) of a toot, then closing the popup, then going to the account of the author of the toot, then selecting 'block' from the menu. Nothing happens.

To reproduce

Instead of a modal dialog opening, I get this JavaScript error:

TypeError: t is undefined[Learn More]  application-beb0139c24f52508abac.js:1:78001
	[651]/o</t.prototype.render https://octodon.social/packs/application-beb0139c24f52508abac.js:1:78001
	b._renderValidatedComponentWithoutOwnerOrContext https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:495688
	b._renderValidatedComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:495812
	b.performInitialMount https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:491653
	b.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:490699
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	b.performInitialMount https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:491816
	b.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:490699
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	b.performInitialMount https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:491816
	b.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:490699
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	b.performInitialMount https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:491816
	b.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:490699
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	_<.Mixin.mountChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:486564
	_.Mixin._createInitialChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:475292
	_.Mixin.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:473506
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	_<.Mixin.mountChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:486564
	_.Mixin._createInitialChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:475292
	_.Mixin.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:473506
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	s.updateChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:488532
	_<.Mixin._reconcilerUpdateChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:486327
	_<.Mixin._updateChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:487073
	_<.Mixin.updateChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:486971
	_.Mixin._updateDOMChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:477684
	_.Mixin.updateComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:475890
	_.Mixin.receiveComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:475443
	i<.receiveComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121572
	b._updateRenderedComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:495163
	b._performComponentUpdate https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:494917
	b.updateComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:494195
	b.performUpdateIfNecessary https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:493528
	i<.performUpdateIfNecessary https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121754
	u https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:92987
	i.perform https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:136899
	i.perform https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:136899
	.perform https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:94040
	C https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:94217
	bound  self-hosted:915:17
	i.closeAll https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:137481
	i.perform https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:136979
	p.batchedUpdates https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:501972
	s https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:93200
	r https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:170404
	c<.enqueueSetState https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:171534
	r.prototype.setState https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:214353
	t/this.startAnimationIfNecessary/r.animationID< https://octodon.social/packs/application-beb0139c24f52508abac.js:1:69785
TypeError: t is undefined[Learn More]  application-beb0139c24f52508abac.js:1:78001

This is with octodon.social which is currently running 1.6.0 AFAIK. Browser is Firefox 52.3.0 (Linux Debian).

Sciss commented Oct 1, 2017

I have the same problem. It seems to have to do with 'cleaning up' modal dialogs. For example, I can reproduce this by clicking on content (image) of a toot, then closing the popup, then going to the account of the author of the toot, then selecting 'block' from the menu. Nothing happens.

To reproduce

Instead of a modal dialog opening, I get this JavaScript error:

TypeError: t is undefined[Learn More]  application-beb0139c24f52508abac.js:1:78001
	[651]/o</t.prototype.render https://octodon.social/packs/application-beb0139c24f52508abac.js:1:78001
	b._renderValidatedComponentWithoutOwnerOrContext https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:495688
	b._renderValidatedComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:495812
	b.performInitialMount https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:491653
	b.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:490699
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	b.performInitialMount https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:491816
	b.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:490699
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	b.performInitialMount https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:491816
	b.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:490699
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	b.performInitialMount https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:491816
	b.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:490699
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	_<.Mixin.mountChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:486564
	_.Mixin._createInitialChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:475292
	_.Mixin.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:473506
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	_<.Mixin.mountChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:486564
	_.Mixin._createInitialChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:475292
	_.Mixin.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:473506
	i<.mountComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121178
	s.updateChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:488532
	_<.Mixin._reconcilerUpdateChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:486327
	_<.Mixin._updateChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:487073
	_<.Mixin.updateChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:486971
	_.Mixin._updateDOMChildren https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:477684
	_.Mixin.updateComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:475890
	_.Mixin.receiveComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:475443
	i<.receiveComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121572
	b._updateRenderedComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:495163
	b._performComponentUpdate https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:494917
	b.updateComponent https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:494195
	b.performUpdateIfNecessary https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:493528
	i<.performUpdateIfNecessary https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:121754
	u https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:92987
	i.perform https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:136899
	i.perform https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:136899
	.perform https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:94040
	C https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:94217
	bound  self-hosted:915:17
	i.closeAll https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:137481
	i.perform https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:136979
	p.batchedUpdates https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:501972
	s https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:93200
	r https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:170404
	c<.enqueueSetState https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:171534
	r.prototype.setState https://octodon.social/packs/common-a62a87ca73b5d24af357.js:1:214353
	t/this.startAnimationIfNecessary/r.animationID< https://octodon.social/packs/application-beb0139c24f52508abac.js:1:69785
TypeError: t is undefined[Learn More]  application-beb0139c24f52508abac.js:1:78001

This is with octodon.social which is currently running 1.6.0 AFAIK. Browser is Firefox 52.3.0 (Linux Debian).

@Sciss

This comment has been minimized.

Show comment
Hide comment
@Sciss

Sciss Oct 20, 2017

Problem persists in 2.0.0rc3

Sciss commented Oct 20, 2017

Problem persists in 2.0.0rc3

@ProgVal

This comment has been minimized.

Show comment
Hide comment
@ProgVal

ProgVal Oct 25, 2017

Contributor

I have a similar issue.

I am not very good with debugging Javascript, but using the "Pause on exception" feature of the Firefox debugger, I think the error comes from this line:

    const leftNav  = media.size > 1 && <button tabIndex='0' className='modal-container__nav modal-container__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><i className='fa fa-fw fa-chevron-left' /></button>;

Here is the same line, in context:

  render () {
    const { media, intl, onClose } = this.props;

    const index = this.getIndex();

    const leftNav  = media.size > 1 && <button tabIndex='0' className='modal-container__nav modal-container__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><i className='fa fa-fw fa-chevron-left' /></button>;

If my understanding of Javascript is correct, accessing media.size is equivalent to accessing this.props.media.size. However, this.props.media has no attribute size, only: intl, onClose, onReblog, status, and proto.

Here is a screenshot showing all of this:

screenshot

The same error+location happens if I click the boost button, but not the favorite button, so it is probably related to the popup.

Refreshing the page temporarily fixes the issue, but it happens again rather soon (several times today).

Mastodon version: 1.6.1 (oc.todon.fr), updated this week
Firefox version: 52.4

Contributor

ProgVal commented Oct 25, 2017

I have a similar issue.

I am not very good with debugging Javascript, but using the "Pause on exception" feature of the Firefox debugger, I think the error comes from this line:

    const leftNav  = media.size > 1 && <button tabIndex='0' className='modal-container__nav modal-container__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><i className='fa fa-fw fa-chevron-left' /></button>;

Here is the same line, in context:

  render () {
    const { media, intl, onClose } = this.props;

    const index = this.getIndex();

    const leftNav  = media.size > 1 && <button tabIndex='0' className='modal-container__nav modal-container__nav--left' onClick={this.handlePrevClick} aria-label={intl.formatMessage(messages.previous)}><i className='fa fa-fw fa-chevron-left' /></button>;

If my understanding of Javascript is correct, accessing media.size is equivalent to accessing this.props.media.size. However, this.props.media has no attribute size, only: intl, onClose, onReblog, status, and proto.

Here is a screenshot showing all of this:

screenshot

The same error+location happens if I click the boost button, but not the favorite button, so it is probably related to the popup.

Refreshing the page temporarily fixes the issue, but it happens again rather soon (several times today).

Mastodon version: 1.6.1 (oc.todon.fr), updated this week
Firefox version: 52.4

@ProgVal

This comment has been minimized.

Show comment
Hide comment
@ProgVal

ProgVal Mar 24, 2018

Contributor

Fixed in v2.3.2.

Contributor

ProgVal commented Mar 24, 2018

Fixed in v2.3.2.

@Gargron Gargron closed this May 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment