specialunderwear / Hosts.prefpane

a Cocoa GUI for /etc/hosts
http://niggazpullintriggaz.blogspot.com/2011/11/how-i-managed-to-edit-etchosts-without.html
GNU General Public License v3.0
1.62k stars 126 forks source link

impossible to add entry #14

Closed samuelvincent closed 7 years ago

samuelvincent commented 11 years ago

hi! on different systems, each time that i open prefpane and add or edit an entry i have this error message:

"syntax error, unexpected HOSTNAME, expecting END or COMMENT or ADDRESS or NEWLINE Should this line be permanently removed from /private/etc/hosts? Choose no to quit Hosts and manually correct the error."

what is the problem? if i erase my host file and redo, i have the same error message...

specialunderwear commented 11 years ago

No idea, maybe attach your hosts file. Btw you don't want to remove the default entries from your hosts file.

bpinney commented 11 years ago

I am having a similar issue

IP addresses and hostnames added to the Hosts Preferences Pane disappear after pressing the enter button or clicking on another field. Furthermore, new entries appear in the hosts file as "(null)".

Screen shot 2012-12-18 at 10 37 41 AM

Furthermore, this (null) entry crashes Hosts Preferences Pane when it loads again.

Parse error

In /private/etc/hosts on line:12 null)

syntax error, unexpected HOSTNAME, expecting END or COMMENT or ADDRESS or NEWLINE

Should this line be permanently removed from /private/etc/hosts? Choose no to quit Hosts and manually correct the error.

Yes / No

Screen shot 2012-12-18 at 10 39 50 AM

specialunderwear commented 11 years ago

Maybe you could attach your hosts file. It could be the file has strange non unicode characters in it. Also have you got administrator rights on the box you installed hosts on.

Moreover when you close system preferences, and then reopen have you got the same issues?

What os version are you on?

specialunderwear commented 11 years ago

It seems that you get very strange behaviour if you hosts can not obtain authorization for editing the hosts file. #16