# Clicking "back" from lesson/review session shows API JSON result

**URL:** <https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829>\
**Category:** Bugs & Errors\
**Created:** [July 9, 2017, 11:52pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829 "2017-07-09T23:52:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanblue](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/seanblue/32/579844_2.png) [@seanblue](https://community.wanikani.com/u/seanblue)\
**Post date:** [July 9, 2017, 11:52pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/1 "2017-07-09T23:52:07Z")

</div>

All scripts were turned off when this occurred.

I went to the “Lessons Summary” page (`/lesson`) and started a session. Then I clicked the back button. Rather than showing the “Lessons Summary” page again, it showed the API data that is usually displayed on that page. For example, the second time I tried this (when the summary was empty) it displayed `{"radicals":[],"kanji":[],"vocabulary":[],"queue_count":63,"last_lesson_date":"2017-07-09T23:43:39.666Z"}`.

The same issue occurs with review sessions.

---

<div class="post-metadata">

**Author:** ![oldbonsai](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/oldbonsai/32/33394_2.png) [@oldbonsai](https://community.wanikani.com/u/oldbonsai)\
**Post date:** [July 10, 2017, 4:40pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/2 "2017-07-10T16:40:13Z")

</div>

What browser/version/OS are you on? The back button having that behavior is pretty strange — I reviewed the flow through the app, and the browser never hits/gets redirected through the API.

---

<div class="post-metadata">

**Author:** ![seanblue](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/seanblue/32/579844_2.png) [@seanblue](https://community.wanikani.com/u/seanblue)\
**Post date:** [July 10, 2017, 7:59pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/3 "2017-07-10T19:59:28Z")

</div>

I’m using Chrome on Windows 10.

---

<div class="post-metadata">

**Author:** ![Ryouki](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/ryouki/32/202681_2.png) [@Ryouki](https://community.wanikani.com/u/Ryouki)\
**Post date:** [July 10, 2017, 9:20pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/4 "2017-07-10T21:20:24Z")

</div>

I just tried this for funzies. Same thing happened to me. Also using Chrome on Win 10.

Edit : I did have scripts running if that’s relevant.

---

<div class="post-metadata">

**Author:** ![seanblue](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/seanblue/32/579844_2.png) [@seanblue](https://community.wanikani.com/u/seanblue)\
**Post date:** [July 10, 2017, 10:03pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/5 "2017-07-10T22:03:56Z")

</div>

I just checked my version of Chrome and it’s 59. This bug still happened a few minutes ago, still with no scripts on.

---

<div class="post-metadata">

**Author:** ![AnimeCanuck](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/animecanuck/32/576730_2.png) [@AnimeCanuck](https://community.wanikani.com/u/AnimeCanuck)\
**Post date:** [July 13, 2017, 6:18am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/6 "2017-07-13T06:18:42Z")

</div>

Oh! I think I experienced that yesterday briefly! I just reloaded the page, and everything was fine afterwards.

For me it was Lessons, Back Button, code like in the OP appeared instead.

I was on my Windows XP machine at the time, running the latest version of Firefox.

---

<div class="post-metadata">

**Author:** ![riccyjay](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/riccyjay/32/5221_2.png) [@riccyjay](https://community.wanikani.com/u/riccyjay)\
**Post date:** [July 25, 2017, 10:51am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/7 "2017-07-25T10:51:30Z")

</div>

This just happened to me too. On Chrome. Clicked on an item after lessons to view details and then when I clicked back got something like in the OP but about fifty times as long. When I clicked back again it took me straight into a set of new lessons.

---

<div class="post-metadata">

**Author:** ![AnimeCanuck](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/animecanuck/32/576730_2.png) [@AnimeCanuck](https://community.wanikani.com/u/AnimeCanuck)\
**Post date:** [August 6, 2017, 5:06am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/8 "2017-08-06T05:06:45Z")

</div>

This happened to me about 2 hours ago on Firefox. Windows 7.

Did a session of around 35-37 reviews, and hitting back from either 具合 or 場合 I had a long page full of the JSON code. Colour-coded, as if I had the console open.

Clicking Refresh made the review summary page appear normally. (I had taken a screenshot of it to post in the WK screenshots thread as a joke, while also remembering this thread… but then wound up posting a lot of other things and copied something over it in the clipboard. Oops.)

---

<div class="post-metadata">

**Author:** ![Lawlheart](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/lawlheart/32/46627_2.png) [@Lawlheart](https://community.wanikani.com/u/Lawlheart)\
**Post date:** [August 6, 2017, 5:08am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/9 "2017-08-06T05:08:56Z")

</div>

I never mentioned this, but this has happened to me a lot, actually. Chrome on Linux.

---

<div class="post-metadata">

**Author:** ![neicul](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/neicul/32/222427_2.png) [@neicul](https://community.wanikani.com/u/neicul)\
**Post date:** [August 6, 2017, 7:41am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/10 "2017-08-06T07:41:04Z")

</div>

Also happens a lot here, on both Chrome in Windows 10 and on Android

---

<div class="post-metadata">

**Author:** ![Helix](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/helix/32/2630_2.png) [@Helix](https://community.wanikani.com/u/Helix)\
**Post date:** [August 6, 2017, 7:41am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/11 "2017-08-06T07:41:54Z")

</div>

I’ve seen this a few times as well, latest Chrome on macOS.

---

<div class="post-metadata">

**Author:** ![Subversity](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/subversity/32/55827_2.png) [@Subversity](https://community.wanikani.com/u/Subversity)\
**Post date:** [August 6, 2017, 7:53am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/12 "2017-08-06T07:53:06Z")

</div>

Con confirm it happens without any scripts in incognito as well.

@oldbonsai  
Here’s the flow + network requests.

> **[Dropbox - File Deleted](https://www.dropbox.com/s/wuxbwei81f31625/back-to-json.mkv?dl=0)**
>
> Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!

---

<div class="post-metadata">

**Author:** ![jamesoneill](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/jamesoneill/32/62041_2.png) [@jamesoneill](https://community.wanikani.com/u/jamesoneill)\
**Post date:** [August 6, 2017, 8:02am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/13 "2017-08-06T08:02:02Z")

</div>

I’ve had this a couple of times too.

It’s probably because they’re using the same endpoints for HTML and JSON requests. If the site has done an AJAX request to that endpoint since you last visited the page that’s what your browser has cached so that’s what it shows when you click back.

---

<div class="post-metadata">

**Author:** ![rhet](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/rhet/32/7641_2.png) [@rhet](https://community.wanikani.com/u/rhet)\
**Post date:** [August 6, 2017, 8:02am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/14 "2017-08-06T08:02:33Z")

</div>

This happens to me too, I honestly thought it was intended since it’s so consistent. Chrome on Windows 10. It doesn’t bother me since the only time I back out of lessons or reviews like that is on accident.

---

<div class="post-metadata">

**Author:** ![AnimeCanuck](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/animecanuck/32/576730_2.png) [@AnimeCanuck](https://community.wanikani.com/u/AnimeCanuck)\
**Post date:** [August 7, 2017, 12:27am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/15 "2017-08-07T00:27:52Z")

</div>

I got one this time:

 ![image](https://global.discourse-cdn.com/wanikanicommunity/original/3X/1/b/1b0f69436a9c9fd2b0d49538a4274e30cd7a27fb.png)

I had gone to the radical “glue” to give it the synonyms つ, tsu, and attach. Since I already know it that way. When I clicked back in the browser, that was the result.

@oldbonsai

---

<div class="post-metadata">

**Author:** ![anon13312298](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/wanikanicommunity/original/3X/f/d/fd4c154120954695f788402f3bcf4e616499bc2d.png) [@anon13312298](https://community.wanikani.com/u/anon13312298)\
**Post date:** [August 7, 2017, 12:40am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/16 "2017-08-07T00:40:50Z")

</div>

Do you use Rails by chance? We had this weird bug on an app, I have a vague suspicion that it might be related to turbolinks.

---

<div class="post-metadata">

**Author:** ![uyu](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/uyu/32/707333_2.png) [@uyu](https://community.wanikani.com/u/uyu)\
**Post date:** [August 7, 2017, 1:08am UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/17 "2017-08-07T01:08:25Z")

</div>

in the other day～

 ![wakichigau](https://global.discourse-cdn.com/wanikanicommunity/original/3X/f/7/f72fd79788caf6af57ce64dda59337cdc360df0d.png)

> [@eydemidov](#):
>
> Do you use Rails by chance?

probably yes～

 ![rb](https://global.discourse-cdn.com/wanikanicommunity/original/3X/9/9/99c6ff4f80fe4c3d57a3518a5239e00eb28ede54.png)

---

<div class="post-metadata">

**Author:** ![oldbonsai](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/oldbonsai/32/33394_2.png) [@oldbonsai](https://community.wanikani.com/u/oldbonsai)\
**Post date:** [August 7, 2017, 6:50pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/19 "2017-08-07T18:50:49Z")

</div>

We’ve got a bit more information on this one.

It has to do with how some browsers handle responses for different formats at the same URL — in our case, we’ve got /reviews and /lessons set to respond to HTML and with JSON. The browser gets a bit confused about which response show up when you hit back, and it’s showing the JSON response. One would think it would be the page the user navigated to, but, well, browsers…

We’ve got a plan to clear it up, but it’ll take a couple days to knock out the fix. I’ll let everyone know when it’s live, although you’ll probably be able to tell, as the bug won’t happen anymore. 😉

---

<div class="post-metadata">

**Author:** ![uyu](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/uyu/32/707333_2.png) [@uyu](https://community.wanikani.com/u/uyu)\
**Post date:** [August 10, 2017, 2:18pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/20 "2017-08-10T14:18:15Z")

</div>

> [@oldbonsai](#):
>
> although you’ll probably be able to tell, as the bug won’t happen anymore. 😉

uuuuuwaa～ happened during review～ this time on different windows machine～

 ![無題](https://global.discourse-cdn.com/wanikanicommunity/original/3X/b/5/b57d628c3b667d4cf4782efe2fc971fe1590db63.png)

---

<div class="post-metadata">

**Author:** ![oldbonsai](https://sea1.discourse-cdn.com/wanikanicommunity/user_avatar/community.wanikani.com/oldbonsai/32/33394_2.png) [@oldbonsai](https://community.wanikani.com/u/oldbonsai)\
**Post date:** [August 10, 2017, 2:36pm UTC](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829/21 "2017-08-10T14:36:47Z")

</div>

Yep, we’re still working on the fix — a few other things got put higher on the priority list, so it’ll be a little while (like, the week of the 21st) before we wrap this one up.

I’ll post a note here as soon as it’s resolved.

[Next page](https://community.wanikani.com/t/clicking-back-from-lessonreview-session-shows-api-json-result/18829.md?page=2)
