Habitica: language cannot be changed in Firefox

Created on 16 Nov 2017  Â·  17Comments  Â·  Source: HabitRPG/habitica

In Firefox 57, when you go to User Icon > Settings and change the language using the drop-down menu, the website reloads as it should but your language setting is not saved. When I tested this using my own account, examining my user document in the database showed that preferences.language was not changed. I repeated this a few times with the same result.

When I tried to change the language in the same account using Vivaldi on the same desktop machine, preferences.language was changed correctly immediately.

The same problem in Firefox 57 was reported by Pantoufle (de5fc7a7-5994-4e30-8376-eda6a20d3335) in the Report a Bug guild.

I haven't tested on other versions of Firefox or on other browsers.

help wanted medium Settings

All 17 comments

labels updated

There's been more reports about this (below). It seems to be recent Firefox releases, not just 57. I'll be updating the title as soon as I've posted this.


Aerilita ( 3b724a41-48d3-4048-ae27-70b258cf5a72 )

Coming to add to the language changing bug (doesn't switch, no amount of refreshes help), only my Firefox isn't new, it's Firefox 52.5.0 (32-bit) esr (on Windows XP). Given how in my saved file it used to be 52.4.0, esr Firefox was also updated recently, and something seems to have changed.

_Note from Alys: ESR is Extended Support Release, so this is not an outdated version of Firefox, even though it's not version 57._


Pantoufle ( de5fc7a7-5994-4e30-8376-eda6a20d3335 )

Hi Alys, i was curious about the language changing bug so i messed around a bit with firefox 57 and i found out that this is not an always occuring bug (yesterday i thought it was but i only tried two languages before panicking and i was quite unlucky). Actually, when i change my language, i can have three results:

  • The language is changed. It's the expected result.
  • The language setting is changed but i have to refresh Habitica (a simple f5 is enough) to actually apply it to the site.
  • Neither of the language setting or the language of the site are changed.

I don't know what to do to reproduce one result in particularly, that seems quite random at first sight.


George Seymour ( 0f2a776d-633e-4f1e-9f60-179198cb0536 )

Hello, cannot change language to english. When I select english, habitica reloads but language isn't changed. Firefox 57.0 (64-bit)

@Alys The error is in client/components/settings/site.vue
async changeLanguage (e) { const newLang = e.target.value; this.user.preferences.language = newLang; await this.set('language'); window.location.href = '/'; }
at "await this.set('language');", that seems to not be executed sometimes. This issue is random, but seems to be solved when this line is replaced by "someVariable = this.set('language');", that forces the function call to be completed. Is this an acceptable way of solving this issue, or should I try to find another way to solve it?

@klezt I'm sorry no one replied to you. I'm not sure whether that's the best solution or not but I'll ask the other admins to look at this.

(FYI I've confirmed this bug is still happening today.)

This.set does need to be awaited it seem. The function is async. However, it looks like the issue is the promise is not returned: https://github.com/HabitRPG/habitica/blob/develop/website/client/store/actions/user.js#L54

@TheHollidayInn Not using await seems to solve the issue (I could not reproduce the bug after several tries)

Sorry for my delay. The client may be messing up while awaiting a non promise. I'll try fixing the set function and go from there. We do want to wait for the set promise to finish even if currently removing await solves the issue by removing side effects. The for pointing that out!

Problems persists in Firefox 59.0.2 in Ubuntu 18.04.

It persists on Firefox 60.0.1

Still on Firefox 60.0.1 (32-bit)

The change hasn't been deployed yet, it'll be in the next few days

This issue is happening for me at this day. Please re-open.

@riki137 you reported that in the Report a Bug guild a couple of days ago and I posted a reply there to you. Can you please go back there to find my reply and give answers to my questions? Once we have the information we need to better understand the problem you are experiencing, we'll either reopen this or (more likely) admins will open a new issue with the appropriate information.

Confirmed that it's happening again :( Will look into it in the next few
days

Il Mer 17 Apr 2019, 07:16 Alys notifications@github.com ha scritto:

@riki137 https://github.com/riki137 you reported that in the Report a
Bug guild a couple of days ago and I posted a reply there to you. Can you
please go back there to find my reply and give answers to my questions?
Once we have the information we need to better understand the problem you
are experiencing, we'll either reopen this or (more likely) admins will
open a new issue with the appropriate information.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/HabitRPG/habitica/issues/9514#issuecomment-483940227,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAkAV_Avaz7hIQUkaLVo0ir9rc2GOiuFks5vhq4cgaJpZM4QgaOi
.

We've had two reports of it so far with the first one, from tarrasqueSorcerer (a15db324-d5f8-49e2-91ce-d91455766a59) on the 9th, fixing itself as soon as a shift-reload happened so it might have been a local glitch (and hence my question to @riki137 in RaB to see if the same behaviour occurred for them). The first report wasn't reproducible at the time so a bug now might be from a code or library change that happened since the 9th.

@Alys sorry for late reply.
The language is switchable if i do shift+f5 force reload, but it is only switchable once. Then, i have to do shift reload yet again if i want to switch to another or previous language. So sadly still a bug.

Should be fixed but it might take about 1 week before it goes live

Was this page helpful?
0 / 5 - 0 ratings