Defman
January 30, 2017, 5:31pm
1
I’ve created a linter for Komodo (https://github.com/Defman21/korubocop , I’m planing to integrate it in Komodo). However, I’m not able to get it working.
Here’s the error in my log when I open a ruby file:
[2017-01-30 20:27:41,954] [ERROR] lint:
-- EXCEPTION START --
[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [koILintService.addRequest]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://komodo/content/lint/lint.js :: this.lintBuffer.prototype._issueRequest :: line 444" data: no]
+ toString (function) 3 lines
+ message (string) 'Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [koILintService.addRequest]'
+ result (number) 2147549183
+ name (string) 'NS_ERROR_UNEXPECTED'
+ filename (string) 'chrome://komodo/content/lint/lint.js'
+ lineNumber (number) 444
+ columnNumber (number) 0
+ inner (object) null
| + data (object) null
| + stack (string) 'this.lintBuffer.prototype._issueRequest@chrome://komodo/content/lint/lint.js:444:12
this.lintBuffer.prototype._continueRequest@chrome://komodo/content/lint/lint.js:387:8
'
+ location (object) JS frame :: chrome://komodo/content/lint/lint.js :: this.lintBuffer.prototype._issueRequest :: line 444
| + QueryInterface (function) 3 lines
| + language (number) 2
| + languageName (string) 'JavaScript'
| + filename (string) 'chrome://komodo/content/lint/lint.js'
| + name (string) 'this.lintBuffer.prototype._issueRequest'
| + lineNumber (number) 444
| + columnNumber (number) 12
| + sourceLine (string) ''
| + caller (object) JS frame :: chrome://komodo/content/lint/lint.js :: this.lintBuffer.prototype._continueRequest :: line 387
| + formattedStack (string) 'this.lintBuffer.prototype._issueRequest@chrome://komodo/content/lint/lint.js:444:12
this.lintBuffer.prototype._continueRequest@chrome://komodo/content/lint/lint.js:387:8
'
| + stack
this.lintBuffer.prototype._issueRequest@chrome://komodo/content/lint/lint.js:444:12
this.lintBuffer.prototype._continueRequest@chrome://komodo/content/lint/lint.js:387:8
-- EXCEPTION END --
I can access the linter itself with Cc["@addons.defman.me/koRubocopLinter;2"]
so at least I’m sure Komodo loads it, but I don’t understand the error. Is it an issue in my code?
/cc @mitchell , I’d appreciate your help since you have the knowledge of linters
@Defman please add debug logs to your linter python file and add try/catch statements. This isn’t something we can help with as we cannot possibly know what type of error your code is triggering.
Defman
January 30, 2017, 5:38pm
3
I added a lot of try catch statements and logs, but I don’t see them at all
See what koLintService is doing:
require("ko/logging").getLogger("koLintService").setLevel(10)
Defman
January 30, 2017, 5:49pm
5
[2017-01-30 20:49:01,708] [INFO] koLintService: KoLintService.cancelPendingRequests(uid='{0f78688e-7a65-4e1b-946f-7f976db2e249}')
[2017-01-30 20:49:01,708] [DEBUG] koLintService: in RequestQueue.remove_uid, acquiring esema
[2017-01-30 20:49:01,708] [DEBUG] koLintService: in RequestQueue.remove_uid, did not acquire esema
[2017-01-30 20:49:01,712] [DEBUG] console: log: {}
[2017-01-30 20:49:01,712] [INFO] koLintService: KoLintService.addRequest(<KoLintRequest: Ruby on uid {0f78688e-7a65-4e1b-946f-7f976db2e249}>)
[2017-01-30 20:49:01,715] [ERROR] lint:
-- EXCEPTION START --
[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [koILintService.addRequest]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://komodo/content/lint/lint.js :: this.lintBuffer.prototype._issueRequest :: line 444" data: no]
+ toString (function) 3 lines
+ message (string) 'Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [koILintService.addRequest]'
+ result (number) 2147549183
+ name (string) 'NS_ERROR_UNEXPECTED'
+ filename (string) 'chrome://komodo/content/lint/lint.js'
+ lineNumber (number) 444
+ columnNumber (number) 0
+ inner (object) null
| + data (object) null
| + stack (string) 'this.lintBuffer.prototype._issueRequest@chrome://komodo/content/lint/lint.js:444:12
this.lintBuffer.prototype._continueRequest@chrome://komodo/content/lint/lint.js:387:8
'
+ location (object) JS frame :: chrome://komodo/content/lint/lint.js :: this.lintBuffer.prototype._issueRequest :: line 444
| + QueryInterface (function) 3 lines
| + language (number) 2
| + languageName (string) 'JavaScript'
| + filename (string) 'chrome://komodo/content/lint/lint.js'
| + name (string) 'this.lintBuffer.prototype._issueRequest'
| + lineNumber (number) 444
| + columnNumber (number) 12
| + sourceLine (string) ''
| + caller (object) JS frame :: chrome://komodo/content/lint/lint.js :: this.lintBuffer.prototype._continueRequest :: line 387
| + formattedStack (string) 'this.lintBuffer.prototype._issueRequest@chrome://komodo/content/lint/lint.js:444:12
this.lintBuffer.prototype._continueRequest@chrome://komodo/content/lint/lint.js:387:8
'
| + stack
this.lintBuffer.prototype._issueRequest@chrome://komodo/content/lint/lint.js:444:12
this.lintBuffer.prototype._continueRequest@chrome://komodo/content/lint/lint.js:387:8
-- EXCEPTION END --
The uid does not match the one in my linter though. Could it be a conflict with the default Ruby Komodo linter?
Have you managed to disable the default Ruby linter? Sorry, but that error traceback is not making much sense to me
Defman
January 31, 2017, 5:06pm
7
I’ve disabled it by changing _reg_categories
in KoRubyCompileLinter class and it does not any linting anymore, but I still get the same error.
I see. Sorry, but I don’t have any time to try and help debug this right now. I’m not very familiar with adding new linters either, so I cannot offer any advice off the top of my head. If I think of anything I will let you know. I wish you luck.
Defman
February 1, 2017, 6:07pm
9
I’ve fixed my problems by compiling the linter as built-in Komodo linter. It gave me errors related to encoding in my code and I’ve fixed them. Thank you for the help @mitchell and @nathanr