Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Brackets does not launch when Ubuntu/Gentoo OS locale set to "C" instead of real locale #9883

Closed
stollar opened this issue Nov 9, 2014 · 13 comments

Comments

@stollar
Copy link

stollar commented Nov 9, 2014

Ob Ubuntu 14.10 Brackets opens but the window does not initialize. The left-nav is just an empty grey area and there is a menu above the main window ares (File | Edit | Find | ... ) Ths icons at the right do not function.
Installed from: Brackets.Release.1.0.64-bit.deb
I need to kill -9 brackets - File -> Quit does nothing!

@peterflynn
Copy link
Member

@stollar While Brackets is open, go to http://localhost:9234 in Chrome and click the Console tab. What errors are listed there?

@stollar
Copy link
Author

stollar commented Nov 10, 2014

Here's what I see:
Download the React DevTools for a better development experience: http://fb.me/react-devtools /thirdparty/react.js:4356
Blind write attempted: /home/rs/.config/Brackets/state.json 1415169006000 null /filesystem/impls/appshell/AppshellFileSystem.js:441
(anonymous function) /filesystem/impls/appshell/AppshellFileSystem.js:441
Uncaught RangeError: Invalid language tag: c v8/i18n:75

@peterflynn
Copy link
Member

@stollar A few more questions...

  1. If you type navigator.language in the console what does it show?
  2. After opening developer tools, press F5 to force Brackets to reload. You should see all the same errors again, but this time there should be a triangle next to each one to expand it. Can you expand the item for "Uncaught RangeError" and paste the full stack trace here?

@stollar
Copy link
Author

stollar commented Nov 29, 2014

Sorry for the delay...
Download the React DevTools for a better development experience: http://fb.me/react-devtools /thirdparty/react.js:4356
Blind write attempted: /home/rs/.config/Brackets/state.json 1415169006000 null /filesystem/impls/appshell/AppshellFileSystem.js:441
(anonymous function) /filesystem/impls/appshell/AppshellFileSystem.js:441
(anonymous function) /filesystem/impls/appshell/AppshellFileSystem.js:244
(anonymous function) appshell:273
Uncaught RangeError: Invalid language tag: c v8/i18n:75
canonicalizeLanguageTag v8/i18n:75
initializeLocaleList v8/i18n:89
resolveLocale v8/i18n:952
initializeCollator v8/i18n:184
coll v8/i18n:226
cachedOrNewService v8/i18n:1146
Object.defineProperty.value v8/i18n:1158
compareFilenames /file/FileUtils.js:477
_dirsFirstCompare /project/FileTreeView.js:503
(anonymous function) /thirdparty/immutable.js:621
sortBy /thirdparty/immutable.js:620
superCall /thirdparty/immutable.js:32
sortBy /thirdparty/immutable.js:962
sort /thirdparty/immutable.js:615
_sortDirectoryContents /project/FileTreeView.js:520
React.createClass.render /project/FileTreeView.js:739
(anonymous function) /thirdparty/react.js:7048
(anonymous function) /thirdparty/react.js:12743
(anonymous function) /thirdparty/react.js:6578
(anonymous function) /thirdparty/react.js:12743
ReactMultiChild.Mixin.mountChildren /thirdparty/react.js:12255
ReactDOMComponent.Mixin._createContentMarkup /thirdparty/react.js:7818
(anonymous function) /thirdparty/react.js:7740
(anonymous function) /thirdparty/react.js:12743
(anonymous function) /thirdparty/react.js:6583
(anonymous function) /thirdparty/react.js:12743
ReactComponent.Mixin._mountComponentIntoNode /thirdparty/react.js:5580
Mixin.perform /thirdparty/react.js:16908
ReactComponent.Mixin.mountComponentIntoNode /thirdparty/react.js:5556
(anonymous function) /thirdparty/react.js:11683
(anonymous function) /thirdparty/react.js:12743
ReactMount.renderComponent /thirdparty/react.js:11749
(anonymous function) /thirdparty/react.js:12743
render /project/FileTreeView.js:994
_renderTree /project/ProjectManager.js:620
(anonymous function) /project/ProjectManager.js:236
o.event.dispatch thirdparty.min.js:560
r.handle thirdparty.min.js:560
o.event.trigger thirdparty.min.js:560
(anonymous function) thirdparty.min.js:560
o.extend.each thirdparty.min.js:559
o.fn.o.each thirdparty.min.js:559
o.fn.extend.trigger thirdparty.min.js:560
(anonymous function) /project/ProjectModel.js:222
o.event.dispatch thirdparty.min.js:560
r.handle thirdparty.min.js:560
o.event.trigger thirdparty.min.js:560
(anonymous function) thirdparty.min.js:560
o.extend.each thirdparty.min.js:559
o.fn.o.each thirdparty.min.js:559
o.fn.extend.trigger thirdparty.min.js:560
FileTreeViewModel._commit /project/FileTreeViewModel.js:152
FileTreeViewModel.setDirectoryContents /project/FileTreeViewModel.js:797
(anonymous function) /project/ProjectModel.js:517
_applyAllCallbacks /filesystem/Directory.js:122
(anonymous function) /filesystem/Directory.js:217
(anonymous function) /filesystem/impls/appshell/AppshellFileSystem.js:304
(anonymous function) /filesystem/impls/appshell/AppshellFileSystem.js:244
(anonymous function) appshell:273
navigator.language
"en-US"

@stollar
Copy link
Author

stollar commented Nov 29, 2014

I uninstalled Brackets, deleted ~/.config/Brackets and re-installed to have a clean install - same problems.
Not sure if this helps but:
rs@FALCON:/opt/brackets$ ./brackets
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[1129/163244:ERROR:sandbox_linux.cc(130)] InitializeSandbox() called with multiple threads in process gpu-process
^C
rs@FALCON:/opt/brackets$

@or2008
Copy link

or2008 commented Dec 13, 2014

I have the same problem with ubuntu gnome 14.10

I did some debugging and found that
brackets.app.language = "c"

I couldn't find where that parameter was set, but changing that line of code solved the problem:

main.js - line 58:
require.config({
locale: window.localStorage.getItem("locale") || (typeof (brackets) !== "undefined" ? brackets.app.language : navigator.language)
});

replace "brackets.app.language" with "en-us"

@trompa
Copy link

trompa commented Dec 14, 2014

This is for gentoo, but it could be of help.
Gentoo has as recommended setting for root to have all locales "C":

LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

Since having custom locales can make the compilation fail, and harder to debug why ( In fact this was a setting from my first gentoo install 2004 or sooner that maybe now is not needed, but i just kept using it)

I forgot to set a custom locale for my daily use in a new install and this issue was happening.

A simple:

export LANG="es_ES.UTF-8"

solved it.
Of course, change it for your own locale ...

Just for completeness.
First I tried with a non generated in my machine locale. And this was output in console:

(process:29779): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.

Weird that the fallback locale is not supported by brackets/v8

Cheers

@stollar
Copy link
Author

stollar commented Dec 15, 2014

Replacing "brackets.app.language" with "en-us" got me going - thanks for the suggestion.

@pickettd
Copy link

I ran into this problem today. I managed to get Brackets working by following trompa's advice. I think the only thing I needed to do for English in the US was:

export LANG="en_US.UTF-8"

@nethip
Copy link
Contributor

nethip commented Feb 27, 2015

Closing as it is resolved now.

@nethip nethip closed this as completed Feb 27, 2015
@peterflynn peterflynn changed the title Ubunti 14.10 Problems Brackets does not launch when Ubuntu/Gentoo OS locale set to "C" instead of real locale Mar 6, 2015
@MathewLech
Copy link

For the sake of helping someone in the future who runs into this issue. Simply go to Debug-->Switch Language. change from system default to the language of interest and the issue should be resolved.

@epexa
Copy link

epexa commented Feb 9, 2019

For the sake of helping someone in the future who runs into this issue. Simply go to Debug-->Switch Language. change from system default to the language of interest and the issue should be resolved.

@MathewLech it helped me, thank you!

@imsahil007
Copy link

Thanks @epexa
Changing the language to en-us from Debug>Switch language worked like a charm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants