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

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.

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.

I’m using Chrome on Windows 10.

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.

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

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.

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.

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.)

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

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

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

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

@oldbonsai
Here’s the flow + network requests.

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.

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.

I got one this time:

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

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.

in the other day~

probably yes~

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. :wink:

2 Likes

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

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.

1 Like