Skip to content
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

Failed to load theme resource files on Windows #14043

Open
2 of 3 tasks
core-ai-bot opened this issue Aug 31, 2021 · 5 comments
Open
2 of 3 tasks

Failed to load theme resource files on Windows #14043

core-ai-bot opened this issue Aug 31, 2021 · 5 comments

Comments

@core-ai-bot
Copy link
Member

Issue by arcticicestudio
Saturday Sep 30, 2017 at 09:28 GMT
Originally opened as adobe/brackets#13745


Prerequisites

  • Can you reproduce the problem with Debug -> Reload Without Extensions?
  • Did you perform a cursory search to see if your bug or enhancement is already reported?
  • Did you read the Troubleshooting guide?

Description

I'm the author of the Nord theme extension. A user reported nordtheme/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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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 😄

@core-ai-bot
Copy link
Member Author

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
Copy link
Member Author

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!

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

No branches or pull requests

1 participant