Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.15k stars 300 forks source link

Don't use host name for codeintel #3190

Closed sgtcoder closed 6 years ago

sgtcoder commented 6 years ago

Short Summary

Code Intel Does not work for PHP: http://prntscr.com/gqf9t4

Steps to Reproduce

Try to type and built-in PHP function and nothing auto completes, not even the variables.

Expected results

Autocomplete menu pops up

Actual results

Nothing happens

Platform Information

Komodo Edit or IDE? IDE Komodo Version? 11 Operating System (and version)? Xubuntu 16.0.4.2 LTS

Additional Information

mitchell-as commented 6 years ago

This is likely a duplicate of #3102. However, without sample code, it is impossible to know for sure.

Naatan commented 6 years ago

@mjbrancato could you provide some sample codes that aren't working. Or is it not working for anything at all?

I assume you can get var and function completion for a local file (same file)?

sgtcoder commented 6 years ago

I posted it on the other thread that this was closed/linked to. It is for anything in PHP. No code intel and no autocomplete. I am not sure about the other languages, if you need to know, let me know I can do test compares since I have upgraded my laptop Komodo yet.

This is still not working for me in Linux using the nightly build pushed tonight: http://prntscr.com/gslt1m

Please see screenshots, a menu doesn't popup with the explanation and then showing usage, array_push($haystack, $array_variable);

PHP Configured: http://prntscr.com/gslti8 Code Intel Enabled: http://prntscr.com/gsltlt

Naatan commented 6 years ago

So you get no completions for this simple snippet?

<?php
$foobar = "foo";
$foo<|>

Where <|> is your caret.

sgtcoder commented 6 years ago

Correct, I do not get any completions for that either. Originally, I did copy and paste that entire block in and got the syntax error notifications so that part is working.

Have you tried it in Linux or Ubuntu (if that feature does exist, I wonder if something in the settings is blocking it or something)? Let me know if you need a video/screencast or something or TeamViewer.

Naatan commented 6 years ago

I'm on Arch, working for me. Can you try it in safe mode? Help > Troubleshooting > Restart in Safe-mode.

sgtcoder commented 6 years ago

I still don't have the autocomplete. I tried all of this and nothing popped up: http://prntscr.com/gsu4zt

Is there anything else I need in the settings, how does autocomplete work, how does it get the code definitions from a PHP binary interpreter?

Naatan commented 6 years ago

It uses a static parser we wrote, it does not even depend on PHP being configured. What desktop do you use?

sgtcoder commented 6 years ago

Well that is a relief about the PHP interpreter thing. I read somewhere some people had to reinstall PHP or something, that made completely no sense. I think they were talking about the autocomplete from other files or something.

I use Xubuntu 16.0.4.2 LTS (Or simply Ubuntu)

If you want, I host my own server, I can technically deploy an Xubuntu VPS and give you TeamViewer access if you wanted a platform to play around with?

Naatan commented 6 years ago

I guess I could have guessed that from your picture :p I wonder if Xfce has anything to do with this.

Appreciate the offer, but we ought to be able to dig into this internally. Let me see what I can arrange and I'll get back to you.

sgtcoder commented 6 years ago

:-)

It could be, but I would hope not, all it is is a lightweight desktop manager without the buggy bloat. Then again, you never know in today's computing. It's just the Ubuntu Gnome is very horrible as if you were using Windows or Mac :-P

Thank you!

Naatan commented 6 years ago

Alright so QA tried Xfce but they got completions just fine.

One thing I noticed is you didn't respond explicitly to my ask for trying this in safe-mode. Did you in fact try that?

sgtcoder commented 6 years ago

I still don't have the autocomplete. I tried all of this and nothing popped up: http://prntscr.com/gsu4zt

Is there anything else I need in the settings, how does autocomplete work, how does it get the code definitions from a PHP binary interpreter?`

^^^ I meant I did that it Safe Mode and it did not work for me.

I might deploy this on my Laptop in parallel with the IDE 10 installation and see if that works.

I have logs, is there something I can extract from there?

Naatan commented 6 years ago

In safe-mode opening a PHP file like that and typing in it as I suggested would give completions without any further config required.

Your error log might be helpful, check Help > Troubleshooting > View Log File. Pleas share its entire contents.

sgtcoder commented 6 years ago

Still the same issue: http://prntscr.com/gswv81 Logging Doesn't work in Safe Mode: http://prntscr.com/gswvli

Let me fetch the log from live mode.

sgtcoder commented 6 years ago
[2017-10-03 13:53:55,208] [INFO] Startup: Welcome to Komodo IDE 11.0.1 build 90720 (platform linux-x86_64, running on Linux 4.4.0-96-generic version #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017)
[2017-10-03 13:53:55,208] [INFO] Startup: /usr/bin/python built on Mon Oct 2 00:21:28 2017
[2017-10-03 13:53:55,254] [INFO] koInitService: installing Komodo samples to '/home/mjbrancato/.komodoide/11.0/samples'
[2017-10-03 13:53:55,405] [INFO] koInitService: Setting LC_CTYPE to utf-8
[2017-10-03 13:53:55,947] [WARNING] koLess: Clearing local and file cache
[2017-10-03 13:53:56,040] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in resource://gre/modules/Preferences.jsm:381
[2017-10-03 13:53:56,606] [WARNING] root: [object Object].logging has been converted to a CommonJS module; use require("ko/logging") instead (since Komodo 9.0.0a1).
    @chrome://komodo/content/komodo.js:15:1

[2017-10-03 13:53:57,590] [WARNING] findlib2: Unable to import scandir - defaulting to os.walk
[2017-10-03 13:53:57,608] [WARNING] keybindings: [Ctrl+0] was used for 'cmd_goToQuickBookmark_0', overriding to use 'cmd_fontZoomReset'
[2017-10-03 13:53:57,954] [DEBUG] ko.launch: versioncheck on http://docs.komodoide.com/changelog/11
[2017-10-03 13:53:58,107] [INFO] koInitService: Adding pre startup service for 'koFileStatusService': '@activestate.com/koFileStatusService;1'
ERROR:xpcom:Unhandled exception calling 'int8 * isEnabledFor(in int32, out retval boolean);'
Traceback (most recent call last):
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/python/xpcom/server/loader.py", line 134, in loadModule
    return self._getCOMModuleForLocation(aLocalFile)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/python/xpcom/server/loader.py", line 158, in _getCOMModuleForLocation
    py_mod = loader.load_module( module_name_in_sys, stuff )
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/ihooks.py", line 272, in load_module
    m = self.hooks.load_source(name, filename, file)
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/ihooks.py", line 170, in load_source
    return imp.load_source(name, filename, file)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/extensions/scope-files@activestate.com/components/koScopeFiles.py", line 17, in <module>
    import scandir
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/python/komodo/scandir.py", line 448, in <module>
    libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/ctypes/util.py", line 242, in find_library
    return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/ctypes/util.py", line 235, in _findSoname_ldconfig
    f.close()
IOError: [Errno 10] No child processes
[2017-10-03 13:53:58,278] [INFO] elastic_tabstops: Elastic tabstops loaded.
[2017-10-03 13:53:58,396] [INFO] komodospellchecker: Spell checker loaded.
[2017-10-03 13:53:58,397] [INFO] komodospellchecker: Using dictionary en-US
[2017-10-03 13:53:58,413] [INFO] codeintel/process: Starting CodeIntel
[2017-10-03 13:53:58,415] [DEBUG] codeintel/process: PYTHONPATH: /home/mjbrancato/Komodo-IDE-11/lib/python/bin/../lib/python2.7:/home/mjbrancato/Komodo-IDE-11/lib/support/dbgp/pythonlib:/home/mjbrancato/Komodo-IDE-11/lib/mozilla/extensions/codeintel@activestate.com/content/../pylib/codeintel/lib:/home/mjbrancato/Komodo-IDE-11/lib/mozilla/extensions/codeintel@activestate.com/content/../pylib/codeintel/env/lib
[2017-10-03 13:53:58,873] [ERROR] console-logger: Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService] (2) in undefined:14
Traceback (most recent call last):
  File "undefined", line 14, in 

[2017-10-03 13:53:59,153] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in file:///home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koamAddonManager.js:138
[2017-10-03 13:54:00,240] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koLessProtocolHandler.js:154
[2017-10-03 13:54:00,240] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koLessProtocolHandler.js:154
[2017-10-03 13:54:00,240] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koLessProtocolHandler.js:154
[2017-10-03 13:54:00,242] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koLessProtocolHandler.js:154
[2017-10-03 13:54:00,242] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koLessProtocolHandler.js:154
[2017-10-03 13:54:00,243] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in file:///home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koLessProtocolHandler.js:154
[2017-10-03 13:54:01,104] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2017-10-03 13:54:01,105] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2017-10-03 13:54:01,105] [WARNING] console-logger: XUL box for tab element contained an inline #text child, forcing all its children to be wrapped in a block. (1) in chrome://unittest/content/views/panel.xul:0
[2017-10-03 13:54:01,263] [INFO] koInitService: Adding pre startup service for 'KoMemoryReporter': '@activestate.com/koMemoryReporter;1'
[2017-10-03 13:54:01,275] [INFO] koInitService: Adding pre startup service for 'koCommandmentService': '@activestate.com/koCommandmentService;1'
ERROR:xpcom:Creation of class '<class 'component:koCommandmentService.KoCommandmentService'>' failed!
Exception details follow

ERROR:xpcom:Unhandled exception calling 'int8 * createInstance(in nsISomething, in nsIID &, out retval InterfaceIs *);'
Traceback (most recent call last):
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/python/xpcom/server/policy.py", line 303, in _CallMethod_
    return 0, func(*params)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/python/xpcom/server/factory.py", line 57, in createInstance
    return self.klass()
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koCommandmentService.py", line 444, in __init__
    self._reader = _CommandmentsReader(koDirs.userDataDir, ver)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koCommandmentService.py", line 353, in __init__
    self._pipe = os.open(self._commandmentsFileName, os.O_RDWR)
OSError: [Errno 2] No such file or directory: '/home/mjbrancato/.komodoide/11.0/commandments.fifo'
[2017-10-03 13:54:01,288] [ERROR] koInitService: Unable to start 'koCommandmentService' service: '@activestate.com/koCommandmentService;1'
Traceback (most recent call last):
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/components/koInitService.py", line 371, in loadStartupCategories
    getService(components.interfaces.nsIObserver)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/python/xpcom/components.py", line 195, in getService
    return serviceManager.getServiceByContractID(self.contractid, _get_good_iid(iid))
  File "<XPCOMObject method 'getServiceByContractID'>", line 3, in getServiceByContractID
Exception: 2147500037 (NS_ERROR_FAILURE)
[2017-10-03 13:54:01,328] [INFO] koInitService: Adding pre startup service for 'koDBGPManager': '@activestate.com/koDBGPManager;1'
[2017-10-03 13:54:01,672] [WARNING] codeintel/process: stderr: Exception in thread ServiceThread:
Traceback (most recent call last):
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/servicethread.py", line 101, in __start
    onDisconnect = self.__onSocketClientDisconnect)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/server/socketserver.py", line 28, in __init__
    self.server = BaseSocketServer.TCPServer((self.configuredHost, self.configuredPort), RequestHandler)
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/SocketServer.py", line 430, in ser
[2017-10-03 13:54:01,672] [WARNING] codeintel/process: stderr: ver_bind
    self.socket.bind(self.server_address)
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known

[2017-10-03 13:54:02,109] [DEBUG] ko.launch: Response: http://docs.komodoide.com/__omnigollum__/auth/github?origin=%2Fcreate%2Fchangelog%2F11 (404)
[2017-10-03 13:54:02,110] [DEBUG] ko.launch: versioncheck on http://docs.komodoide.com/changelog/110
[2017-10-03 13:54:03,251] [DEBUG] ko.launch: Response: http://docs.komodoide.com/__omnigollum__/auth/github?origin=%2Fcreate%2Fchangelog%2F110 (404)
[2017-10-03 13:54:54,603] [WARNING] console-logger: Key event not available on GTK2: key="u" modifiers="control,shift" (1) in chrome://komodo/content/komodo.xul:0
[2017-10-03 13:54:54,604] [WARNING] console-logger: Key event not available on some keyboard layouts: key="w" modifiers="control,alt" (1) in chrome://komodo/content/komodo.xul:0
[2017-10-03 13:54:54,604] [WARNING] console-logger: Key event not available on some keyboard layouts: key="n" modifiers="control,alt" (1) in chrome://komodo/content/komodo.xul:0
[2017-10-03 13:54:54,604] [WARNING] console-logger: Key event not available on some keyboard layouts: key="s" modifiers="control,alt" (1) in chrome://komodo/content/komodo.xul:0
[2017-10-03 13:54:54,605] [WARNING] console-logger: Key event not available on some keyboard layouts: key="d" modifiers="control,alt,shift" (1) in chrome://komodo/content/komodo.xul:0
[2017-10-03 13:55:19,928] [WARNING] views: Inconsistent view count in view_closed event
[2017-10-03 13:55:20,182] [WARNING] views: Inconsistent view count in view_opened event
[2017-10-03 13:57:31,382] [ERROR] history: Could not note location
-- EXCEPTION START --
[Exception... "Could not convert JavaScript argument arg 2 [koIHistoryService.note_loc]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: chrome://komodo/content/library/history.js :: this._note_loc :: line 307"  data: no]
+ toString (function) 3 lines
+ message (string) 'Could not convert JavaScript argument arg 2 [koIHistoryService.note_loc]'
+ result (number) 2153185289
+ name (string) 'NS_ERROR_XPC_BAD_CONVERT_JS'
+ filename (string) 'chrome://komodo/content/library/history.js'
+ lineNumber (number) 307
+ columnNumber (number) 0
+ inner (object) null
| + data (object) null
| + stack (string) 'this._note_loc@chrome://komodo/content/library/history.js:307:8
note_curr_loc@chrome://komodo/conten'...2249 chars
+ location (object) JS frame :: chrome://komodo/content/library/history.js :: this._note_loc :: line 307
| + QueryInterface (function) 3 lines
| + language (number) 2
| + languageName (string) 'JavaScript'
| + filename (string) 'chrome://komodo/content/library/history.js'
| + name (string) 'this._note_loc'
| + lineNumber (number) 307
| + columnNumber (number) 8
| + sourceLine (string) ''
| + caller (object) JS frame :: chrome://komodo/content/library/history.js :: note_curr_loc :: line 272
| + formattedStack (string) 'this._note_loc@chrome://komodo/content/library/history.js:307:8
note_curr_loc@chrome://komodo/conten'...2249 chars
| + stack
    this._note_loc@chrome://komodo/content/library/history.js:307:8
    note_curr_loc@chrome://komodo/content/library/history.js:272:8
    note_curr_loc@chrome://komodo/content/library/history.js:330:4
    this._handle_view_changed@chrome://komodo/content/library/history.js:705:8
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:157:4
    initWithDocument@view-quickstart:225:12
    createViewFromDocument@viewlistbase:100:16
    viewManager.prototype._newViewFromURI@chrome://komodo/content/views.js:328:19
    viewManager.prototype._doFileOpen@chrome://komodo/content/views.js:457:11
    open_openStartPage@chrome://komodo/content/library/open.js:416:0
    this.updateViewDeck@chrome://komodo/content/library/uilayout.js:1970:8
    _Observer.prototype.current_view_changed_common@chrome://komodo/content/library/uilayout.js:1161:4
    _Observer.prototype.handle_view_list_closed@chrome://komodo/content/library/uilayout.js:1170:4
    _Observer/this.handle_view_list_closed_setup@chrome://komodo/content/library/uilayout.js:1043:8
    xtk.domutils.fireEvent@chrome://xtk/content/domutils.js:157:4
    removeTab@viewtabbedlist:224:16
    removeView@viewtabbedlist:171:16
    close_viewbase@viewbase:748:20
    close_viewbufferbase@viewbufferbase:508:19
    closeUnconditionally@vieweditor:1093:26
    projectManager.prototype.forceCloseAllViewsForURL@chrome://komodo/content/project/projectManager.js:161:8
    projectManager.prototype.closeProject@chrome://komodo/content/project/projectManager.js:324:20
    projectManager.prototype._closeAllProjectsByFunc@chrome://komodo/content/project/projectManager.js:349:13
    projectManager.prototype.closeAllProjects@chrome://komodo/content/project/projectManager.js:360:11
    this.runCanCloseHandlers@chrome://komodo/content/komodo.js:255:22
    this.observe@chrome://komodo/content/komodo.js:621:13
    canQuitApplication@chrome://global/content/globalOverlay.js:45:4
    goQuitApplication@chrome://global/content/globalOverlay.js:57:7
    this.quitApplication@chrome://komodo/content/komodo.js:57:8
    @chrome://komodo/content/library/controller.js line 111 > eval:1:0
    broadcasterController.prototype.doCommand@chrome://komodo/content/library/controller.js:111:0
    command_doCommand@chrome://komodo/content/library/commands.js:239:0
    command_doCommandAsync/<@chrome://komodo/content/library/commands.js:196:12
-- EXCEPTION END --
[2017-10-03 13:57:31,763] [WARNING] views: Inconsistent view count in view_closed event

Looks like it's an errno? Name or service not known

Naatan commented 6 years ago

It seems the TCP server codeintel uses is failing to start on your machine:

[2017-10-03 13:54:01,672] [WARNING] codeintel/process: stderr: Exception in thread ServiceThread:
Traceback (most recent call last):
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/servicethread.py", line 101, in __start
    onDisconnect = self.__onSocketClientDisconnect)
  File "/home/mjbrancato/Komodo-IDE-11/lib/mozilla/extensions/codeintel@activestate.com/pylib/codeintel/lib/server/socketserver.py", line 28, in __init__
    self.server = BaseSocketServer.TCPServer((self.configuredHost, self.configuredPort), RequestHandler)
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/SocketServer.py", line 430, in ser
[2017-10-03 13:54:01,672] [WARNING] codeintel/process: stderr: ver_bind
    self.socket.bind(self.server_address)
  File "/home/mjbrancato/Komodo-IDE-11/lib/python/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known

Do you have a firewall installed maybe? CodeIntel listens on localhost on any available port.

sgtcoder commented 6 years ago

I don't use Firewalls on User client machines, only servers.

I do have a network firewall, but everything is 100 percent open outbound from LAN. Unless if it is considered mischievous and blocked by ADP.

Is there something different in Komodo 11? Because Komodo 10 didn't have this issue on any machines. Is there a package dependency that needs to be installed?

Are you saying I have to NAT/PAT specifically?

I found this too? https://groups.google.com/forum/#!topic/google-appengine-python/gQcPi4aSSfE

I have no DNS issues though.

Looks like a Python issue with that? The Install script did say I needed some Python version, but I already have the latest.

Naatan commented 6 years ago

No, you don't need any special networking aside from not having a firewall that blocks local connections. This same mechanic existed in Komodo 10 although the implementation might have been slightly different.

Are you maybe missing a localhost entry in your /etc/hosts file? Can you ping localhost ?

sgtcoder commented 6 years ago

OMG, that worked! I just had to add localhost to the hosts file then restart Komodo. I didn't realize it was using localhost.

Thank you for this! That is so awesome!

Defman21 commented 6 years ago

@Naatan why not 127.0.0.1 though?

sgtcoder commented 6 years ago

I think I agree with @Defman21 If you are running CentOS or something, I don't even think localhost is a default entry. Not that it is a major concern now that we know just have localhost mapped out.

Naatan commented 6 years ago

OMG, that worked! I just had to add localhost to the hosts file. I didn't realize it was using localhost.

Glad we got you sorted.

@Naatan why not 127.0.0.1 though?

Obviously it's very easy to say this in retrospect. We just had this whole thread trying to figure out the problem, now we know it. You can't just come in at the end of it and say "hey why not do the solution?" :p That's the bug we were trying to find! ;)

Defman21 commented 6 years ago

I thought there are some reasons to use a named entry instead of an IP.

You can't just come in at the end of it and say "hey why not do the solution?" :p

That's what I did so I definitely can :p

Naatan commented 6 years ago

I suppose neither is 100% fool proof. I think 127.0.0.1 might still fail if someone doesnt have a network card of any sort. I think that's a safe assumption though.

Frankly localhost is so basic it seemed pretty safe to assume this is a default everywhere. But in retrospect why bother doing a lookup at all.

sgtcoder commented 6 years ago

@Naatan I agree that localhost is so basic and should be defined anywhere. I don't know why it wasn't in my hosts, sorry. It is on my laptop. I might have accidentally removed when I cleaned my hosts file from past computer renames.

Maybe keep it localhost and have an error message come up saying it can't translate localhost and ensure that is in the localhost... This is a very rare issue.

Defman21 commented 6 years ago

Just use 127.0.0.1 because it's still possible to point localhost to whatever you want (8.8.8.8 for example). I wonder about other ways to communicate with the codeintel server though.

Naatan commented 6 years ago

I think 0.0.0.0 might be even safer. Will look into this when I get around to fixing the bug.

Naatan commented 6 years ago

@mjbrancato I'm kind of amazed you seem to be enjoying our product considering one of the major features wasnt working. You just opened up a huge box of goodies just by fixing that.

sgtcoder commented 6 years ago

Not trying to bloat this thread, but.... @Naatan I didn't know 0.0.0.0 is a pingback, does that work on all systems? It pinged in Linux. Linux also now likes to add in 127.0.1.1 for whatever reason in addition to the 127.0.0.1.

I have always enjoyed your product, just get angered when I try to make my life perfect with it. OMG, it is so much better than Dreamweaver, and forget Java apps like Aptana Studio, Java is garbage IMO. And PHPStorm and NetBean IDE are complete trash and a joke when comparing to your product.

But yes, I am so happy for the autocompletion, it's not that I can't code without it, I am highly capable, it's just it allows you to code faster and with less thinking allowing you to focus your brain resources on coding and not recalling other things that IDE's can already do.

You use Python mainly right? I think Python is perfect for application development. The stability of it is mindblowing. Afterall, Linux loves Python! And so do I (even though I don't know how to program in it, I need to learn though, I have clients requesting it from me)!

Defman21 commented 6 years ago

0.0.0.0 ain't a good ip to bind to because if your computer is connected to the Internet directly (no router basically) and you don't have a firewall, anyone could connect to the codeintel server. At least that's the case with docker containers. If your app is listening on 0.0.0.0, you can connect to it by docker.container.ip:port. I'm unsure it's safer than 127.0.0.1.

sgtcoder commented 6 years ago

@Defman21 what if you made it a failsafe? Leave it at localhost and if it gives you an error, then default to 127.0.0.1 per session or something.

Defman21 commented 6 years ago

You can use 127.0.0.1 in first place so you don't have to failsafe the localhost connection error. The final verdict is up to Nathan though. IMO, the safety statement for this whole mess is:

127.0.0.1 > 0.0.0.0 (potential data leak/ddos of codeintel) > localhost (potential A record which isn't 127.0.0.1).

Naatan commented 6 years ago

You use Python mainly right?

Yes, Python for backend/heavy duty, JavaScript for frontend (UI).

Anyway we're getting a bit off-topic here. Why not join us on gitter?

@Defman21 good point, I had not considered that.

sgtcoder commented 6 years ago

@Naatan sorry about that. I get super excited sometimes. I will join you there and keep side convos to gitter.

Naatan commented 6 years ago

https://github.com/Komodo/KomodoIDE/commit/72e0adae2404ce41727c424279faf6f997d67f27