-
Notifications
You must be signed in to change notification settings - Fork 78
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
Local and available local #229
Comments
Hey @kaluznyo, what version of MIssion Control are you using? |
Sorry ! 1.0.1, and rails 8.0.1 |
Huh, 1.0.1 should have a fix for that problem... could you copy the full trace from the error? |
The error and the trace is on my 'main' app, when it crash, mission control is still alive https://gist.github.com/kaluznyo/e99d274c971c4a37e534e43aa2573535 |
Oh, interesting... it's different from the error I fixed in version 1.0.1. 🤔 The code here is only used in Mission Control's controllers, so it shouldn't affect the code path in your error trace 🤔 Could you check what locale is being passed to the translate call in |
I just use the translate (t()) rails method on line 17. I suppose it's related to this, because when I put in production with Mission Control tab open, my main app crash. If I put in production without Mission Control open, it's work. My intuition, says the available locals is redefined globally by Mission Control. But if you say it's not possible, I'm probably wrong ! |
Huh, so do you mean that in both cases, Mission Control is installed in your app, just that in the second case you're not using it? So strange! |
Ok, I reproduce in local, start my server, without any tab open on my localhost, got to /jobs (url for mission control), and then go to my main page where I have I18n. Crash |
@kaluznyo, could I get more details on how you have configured Mission Control? The routes where it's mounted and all that? |
Only |
This is so strange. The custom I18n configuration is only used here, to set Could you debug your app so that you check the value of |
I try to make a new rails 8 project on https://github.com/kaluznyo/test_mc_i18n, the only modification is :
I reproduce with the same way. Launche server, open directly /jobs, then /dummy -> Crash. Inverse work well. |
Yes I agree with you... I don't know where is wrong, the |
Oh, thank you so much for that reproduction app! I can reproduce with that, so I should be able to debug it. Looking into it... |
To add more incomprehension, if I add |
@kaluznyo I think I found the problem thanks to your app and reproduction steps. The key is that the request to I have a possible fix ready, will push it tomorrow! |
In multi-threaded servers when Mission Control is requested before other pages in the host app. Fixes #229
Works fine ! Thanks ! |
In multi-threaded servers when Mission Control is requested before other pages in the host app. Fixes #229
Hi,
I don't know if MissionControl is the guilty, but since I have installed, I get random error on my main app, and crash with :
:fr is not a valid locale
On my app I've this :
I18n.load_path += Dir[Rails.root.join("config", "locale", "*.{rb,yml}")] config.i18n.default_locale = :fr
Can be related to MissionControl code in https://github.com/rails/mission_control-jobs/blob/66f829f795c1f96a33484fbe410a2bd4e9f69640/lib/mission_control/jobs/i18n_config.rb.
The text was updated successfully, but these errors were encountered: