brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

Failed to load theme resource files on Windows #14043

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by arcticicestudio Saturday Sep 30, 2017 at 09:28 GMT Originally opened as https://github.com/adobe/brackets/issues/13745


Prerequisites

Description

I'm the author of the Nord theme extension. A user reported arcticicestudio/nord-brackets#3 which I was only able to reproduce on Windows 7- and 10. It works fine on my main Arch Linux system (details below).

The theme only differs from other theme extensions by splitting the sources into different files using the @import CSS feature, but this works fine on my main system so this can not be the root cause.

Steps to Reproduce

  1. Install the Nord theme using the extension manager
  2. Activate the theme via View > Themes... and select Nord from the drop-down menu.

Expected behavior:

The theme should be loaded without errors.

Actual behavior:

The theme gets not applied and the debug console throws the following errors (Windows 7- and 10):

Failed to load resource: file:///C:/Program%20Files%20(x86)/Brackets/www/c:/Users/virtu-win10/AppData/Roaming/Brackets/extensions/user/nord-brackets/styles/variables.less (thirdparty.min.js)
file:///C:/Program%20Files%20(x86)/Brackets/www/c:/Users/virtu-win10/AppData/Roaming/Brackets/extensions/user/nord-brackets/styles/editor.less  (thirdparty.min.js)
file:///C:/Program%20Files%20(x86)/Brackets/www/c:/Users/virtu-win10/AppData/Roaming/Brackets/extensions/user/nord-brackets/styles/syntax.less  (thirdparty.min.js)
file:///C:/Program%20Files%20(x86)/Brackets/www/c:/Users/virtu-win10/AppData/Roaming/Brackets/extensions/user/nord-brackets/styles/extensions.less  (thirdparty.min.js)
file:///C:/Program%20Files%20(x86)/Brackets/www/c:/Users/virtu-win10/AppData/Roaming/Brackets/extensions/user/nord-brackets/styles/ui.less  (thirdparty.min.js)

The errors are thrown by file:///C:/Program%20Files%20(x86)/Brackets/www/thirdparty/thirdparty.min.js.

Versions

OS

Tested on Windows 7- and 10 (x86_64) running as Virtual Box. It works fine on my main system running Arch Linux (4.12.13-1-ARCH x86_64) with GNOME 3.24 DE or i3 session.

Brackets

Tested with Brackets 1.10 and the currently latest version 1.11

core-ai-bot commented 3 years ago

Comment by petetnt Sunday Oct 01, 2017 at 19:00 GMT


Thanks for reporting@arcticicestudio.

The line

Failed to load resource: file:///C:/Program%20Files%20(x86)/Brackets/www/c:/Users/virtu-win10/AppData/Roaming/Brackets/extensions/user/nord-brackets/styles/variables.less

Looks like the culprit, something funky going on with the paths.

core-ai-bot commented 3 years ago

Comment by petetnt Sunday Oct 01, 2017 at 20:04 GMT


Actual culprit is https://github.com/adobe/brackets/blob/master/src/view/ThemeManager.js#L166-L168 which for some reason doesn't handle Windows URIs

core-ai-bot commented 3 years ago

Comment by arcticicestudio Monday Oct 02, 2017 at 03:52 GMT


Good catch on the full URI, I've only looked which file has not been able to be loaded but missed to check if there are errors in the path :smile:

core-ai-bot commented 3 years ago

Comment by arcticicestudio Thursday Feb 08, 2018 at 04:57 GMT


Any progress with this one or a way to contribute a fix for it? Some users reported after updating to version 1.12 the problem still persists and that there are also a lot of Internal error's when trying to to install any themes now.

core-ai-bot commented 3 years ago

Comment by petetnt Thursday Feb 08, 2018 at 08:20 GMT


Sorry@arcticicestudio, I did some initial testing getting around it but the issue got lost in the mix.

That said, the fix is either fixing it in the less end or working around the issue in Brackets end.

If you'd like to work on this issue we'd love that! If you need any help navigating the codebase let me know!