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

Require-related error in extension causes other extensions to fail to load #8285

Open
blackmambahk opened this issue Jul 1, 2014 · 7 comments
Assignees

Comments

@blackmambahk
Copy link

Except I don't think it is!

I have had a problem with a particular extension randomly not loading, other people have as well and have reported it to the author

https://github.com/thomasvalera/Brackets-Workspaces/issues/8

but when I look in the dev tools it appears the problem is not really with this extension and can randomly occur in several different extensions, in fact of late I have removed a number of extensions which had shown up in the Extension Manager as having errors and I now suspect that actually there was nothing wrong with any of them but they are just getting randomly hit with the same issue.

The dev tools console shows the following:

Failed to load resource file:///C:/Users/XXXXXXX/AppData/Roaming/Brackets/extensions/lib/codemirror.js

Uncaught Error: Script error for: ../../lib/codemirror

http://requirejs.org/docs/errors.html#scripterror require.js:138

[Extension] failed to load C:/Users/XXXXXXX/AppData/Roaming/Brackets/extensions/user/brackets-workspaces Error: Load timeout for modules: text!libraries/MainWindow/htmlContent/notification.html_unnormalized2,text!libraries/MainWindow/htmlContent/partials/indicator.html_unnormalized3,text!libraries/MainWindow/htmlContent/partials/toolbar.html_unnormalized4,text!htmlContent/index.html_unnormalized5,text!htmlContent/manage.html_unnormalized6,text!htmlContent/add.html_unnormalized7,text!htmlContent/modify.html_unnormalized8,text!htmlContent/wall.html_unnormalized9,text!htmlContent/partials/workspace.html_unnormalized10,text!htmlContent/partials/path.html_unnormalized11

http://requirejs.org/docs/errors.html#timeout /utils/ExtensionLoader.js:213
errback /utils/ExtensionLoader.js:213

Uncaught RangeError: Maximum call stack size exceeded require.js:1

[brackets-jsdownloader] Ready for ludicrous speed!

for some reason require thinks that the codemirror module should be loaded from
C:/Users/XXXXXXX/AppData/Roaming/Brackets/extensions/lib/codemirror.js but its not there from what I can see its actually in C://Program Files(x86)/Brackets/www/thirdparty/CodeMirror2/lib/codemirror.js

I don't know enough about brackets to figure this out but as it seems to be affecting several different extension just wanted to let someone know.

@le717
Copy link
Contributor

le717 commented Jul 1, 2014

What OS and release of Brackets are you using, what extensions do you have installed, and do you know exactly what extension(s) is/are throwing this error? I just installed the extension linked above and obtained no such error (Brackets commit 91a6b4d (the latest development build, Windows 8.1 x64).

@blackmambahk
Copy link
Author

windows 8.1 x64 - brackets 41

Extensions:
Annotate
Autosave Files on Window Blur
Brackets Auto Pairs
CanIUse
Code Folding
GitHubAccess
ImageToData
Inline Regex Editor
JSDownloader
Markdown Preview
Match Highlighter
QuickDocsJS
Reasonable Comments
Sidebar Plus
Tag Renamer
Ternific
Todo
Workspaces

Workspace is the one where it is obvious that it throws an error because it has a top level menu which is missing. The others I only noticed after opening dev tools and they vary each time you load brackets.

For instance just now I got this requirejs error:
Uncaught Error: Mismatched anonymous define() module: function (CodeMirror)

but the workspace extension loaded...so it seems random.

Then I restarted Brackets and this time I got :
Failed to load resource file:///C:/Users/XXXXXX/AppData/Roaming/Brackets/extensions/user/lib/codemirror.js
[Extension] failed to load C:/Users/XXXXXX/AppData/Roaming/Brackets/extensions/user/brackets-code-folding Error: Script error for: foldhelpers/../../lib/codemirror
http://requirejs.org/docs/errors.html#scripterror /utils/ExtensionLoader.js:213
errback

Which shows the code folding extension failed, it just seems a different one each time

The ones that I had noticed in the past few weeks I forget, they just show up in the Extension Manager with a note saying there was an error loading the extension so I just get rid of them at that point assuming they are just not compatible with the latest Brackets.

@le717
Copy link
Contributor

le717 commented Jul 2, 2014

@blackmambahk If you disable all extensions but the Workspace one, then do the same but enable only the code-folder extension, do the errors still occur? I'm not so sure this is an extension/Brackets extension loader error as much as it might be your Brackets installation...

@blackmambahk
Copy link
Author

couldn't find a way to just disable a particular extension so had to remove all of them except those two and then they load without error which might mean its some other extension or a combination that really caused the problem, thing was there have been several people experiencing the same issue as I mentioned at above.

@le717
Copy link
Contributor

le717 commented Jul 2, 2014

For now, to disable extensions you move them to the disabled folder.

Since it would take a while to go through and test all possible extension combinations, you may want to try reinstalling Brackets and see if that changes anything. If not, and if checking each extensions individually does not produce any errors, than I am out of ideas.

@dangoor dangoor self-assigned this Jul 9, 2014
@peterflynn
Copy link
Member

This looks like a duplicate of #8445, but maybe we should leave it open to try to get ExtensionLoader to report more accurate error messages in this case.

@peterflynn
Copy link
Member

The buggy extension, fwiw, is Match Highlighter -- see gintau/bracket-match-highlighter#5.

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

4 participants