Errors: Viable Alternative ...

Discussions about the Application Boundaries Enforcer (ABE) module
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Errors: Viable Alternative ...

Post by GµårÐïåñ »

Giorgio, I opened up my NoScript after seeing that a rule that is normally asserted did not. And to my total amazement, I saw the following:

Rulesets: SYSTEM & USER were in RED
and SYSTEM had this error on the right panel: line 10:4 no viable alternative at character ''
and USER had this error on the right panel: line 51:0 no viable alternative at character ''

and so confused and worried, I went and opened up the rules in notepad and they are fine. To add to the confusion and frustration, I have not even added a new rule in at least 6 months, so not sure what's going on. The *.abe files are fine when you open them externally and have been for a LONG time but inside the program they are shown as above. Another things that is bizarre is that there are no lines 10 or 51 in the files, the SYSTEM is default, which as you know is not that long and the user is 8 lines long.

Now to see if its the fault of something in the rules, I copied the files, AS-IS into a clean profile with NoScript and they show up just fine, so ??? I am confused what's going on. Ideas? I considered a lingering CrLF that might be the problem, you know Linux vs. Windows text files, however, this should have complained if and when it was done not now and even more bizarre, there has been no changes in months. To add more to it, it works fine as-is in another profile.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
doxsys

Re: Errors: Viable Alternative ...

Post by doxsys »

I had this same problem, and found that this issue has to do with the character set and/or the line feed used in the .abe file.

I edit my .abe files on my mac using BBEdit, which shows me the character set and line feed character in the status bar at the bottom of the window. My SYSTEM file was fine, my USER file had the error you're describing. I looked in BBEdit, and found that the SYSTEM file was using the "Unicode (UTF-16 Little Endian, no BOM)" character set and the "Windows (CRLF)" line feed, and the USER file was using the "Western (Mac OS Roman)" character set and the "Unix (LF)" line feed. When I changed the USER file's character set and line feed to match those in the SYSTEM file, it solved the problem.

Hope this is helpful!
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Errors: Viable Alternative ...

Post by GµårÐïåñ »

Thank you for the reply and letting me know I am not completely nuts but I am surprised why I have not heard from Giorgio yet, although I KNOW he is VERY busy and I don't want him to bother with it unless its a serious issue that might be affecting his releases and therefore others.

I mean after all, my rules have been setup for at last 6 months without ANY edits and they have been showing up fine and without issue all that time. It was not until recent updates (which I can't say which version, I didn't catch it until now) that this happened, suggesting the installation and update is causing some kind of file malformations, perhaps during parsing its introducing an anomaly, I am not sure. But then again, the same exact files, without any edits, copied using the file explorer into a newly created profile does not exhibit these problems and they show up, so again, the FILES and their CONTENTS are untouched and just fail in that profile not another profile or a clean profile. This suggests that it might be something else since the same updates applied to another profile did not cause the files to go bad either or exhibit this. This is truly an enigma because no basis for justification can be seen.

Now to your solution, if I had modified recently the files, then it broke, then yes I would be with you and as I stated earlier, I did consider the lingering characters but the files were NOT edited, and worked fine before for sure and still do in other profiles, so that eliminates that as an issue. Especially that I am on windows and use the system notepad to make changes and NoScript loads it by default. I am also certain that ABE has some kind of sanitation routine built into it to trim and clean strings it reads on each line and can handle anything from unwelcome character to blank lines (since we can add comments and have lines in between rules). I am still baffled and appreciate your assistance and information, it was very thoughtful and re-affirmed my earlier suspicions that I tested already. If nothing else and Giorgio doesn't reply, my assumption would be just a fluke in my case. :(
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
dhouwn
Bug Buster
Posts: 968
Joined: Thu Mar 19, 2009 12:51 pm

Re: Errors: Viable Alternative ...

Post by dhouwn »

Strange indeed.
Did you check the file date information if you didn't touch these files recently?
If you were trunk I would have suspected those UTF-16 conversion optimisations they are working on.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100430 Firefox/3.7
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Errors: Viable Alternative ...

Post by GµårÐïåñ »

No, no trunk but my profiles, except for one, has been through several Fx updates, something there could have corrupted it. I am at this point going to accept that despite my nature I have to accept this was a fluke and move on. The files have last modified date of 09 and they worked simply by copying in other profiles without any edit needed, and also when opened show all is well. I have even used editor with character reveal (shows you all the hidden elements including spaces) and saw nothing out of place either. More bizarre, the line number referenced in the error doesn't even exist in each ABE file. Anyway, thank you and if Giorgio finds something, I am sure he will update us here. In the meantime for the record we have this thread so if it appears again people can post here and we can direct attention to it with the history of the issue in mind.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Errors: Viable Alternative ...

Post by therube »

I can force this to occur by inserting a $1a$ (hex character, Ctrl+Z) into the .abe file.

Code: Select all

# Prevent Internet sites from requesting LAN resources.
Site LOCAL
Accept from LOCAL Deny
Gives the message:

Code: Select all

line 3:18 no viable alternative at character ''
In this case the $1a$ character is at line 3, char 18.

So maybe you have (had) some funky (UTF) domain as a rule that happened to contain a $1a$ character?

(As you can see from your original post, it sure appears that it was there.)

[[ When i added the $1a$ into the file, I overwrite the EOL character & that's why the Deny shows on the same line as the Accept. I should have inserted instead & things would look a bit more normal.]]


Your situation sure is strange.
EOL characters are not an issue here. (DOS/UNIX/MAC makes no difference.)
A Unicode (format) encoded file is not even seen by ABE, so that shouldn't be it either.

Can you ZIP & upload SYSTEM.abe somewhere.

Wonder if the .abe file isn't cached in memory? Or at least <sometimes> during times when something like this occurs?
Everything looks to update in realtime (like if you interactively change the file encoding to Unicode then the file disappears entirely from ABE options dialog) but for a period of time after removing the $1a$, ABE still reported a problem. Overwrote the file & tried again, but couldn't duplicate. It immediately recognized the $1a$ was gone & no longer presented the message.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100420 SeaMonkey/2.1a1pre
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Errors: Viable Alternative ...

Post by GµårÐïåñ »

therube, as always thank you and I appreciate the input. However, just because I, we can find a way to make it break and say the same thing, is not the same as it happening on its own. As I stated, if that was the issue, copying the abe files into another profile as-is and running it, without changing the content, would have resulted in the same issue, but it didn't. Also, I have not and had not updated the files in a long time. Also, the location referenced doesn't even exist in the file. Also, I have checked the content and it doesn't contain and commands being on the same line, or any special characters, which was actually a moot test since the files work fine as-is elsewhere but I checked anyway. I honestly can say its nothing we have discussed so far, I accounted for all that on my own BEFORE posting it, that's why I felt it might be something uncaught that is causing it and bringing it to Giorgio's attention was the only way to be sure it wasn't something else. The domains are not UTF or any bizarre character domains, they are your run of the mill .com and the only reason I have the rule is because I want THESE to have access to the Google framework for developer scripting but not end up giving EVERY site those access since they have to be whitelisted for ABE to work and it would by proxy allow others to access them too without the restrictions. I rather not share them publicly for personal reasons (although nothing bad or embarrassing is there, I just don't wish everyone to know what I use and allow, for security reasons) but if you saw them you would see, nothing that would cause what is seen. I am at my wits end trying to figure out what it is and I have the help of good people who try but its not supported by the facts. I have to resign myself to not knowing and just letting it go as a glitch unless it starts happening more often and in more places to give us more information to go on.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Errors: Viable Alternative ...

Post by therube »

the SYSTEM is default
That's why I asked for that specific file.
Your situation sure is strange.
I understand the rest :-).
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 SeaMonkey/2.0.4
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Errors: Viable Alternative ...

Post by GµårÐïåñ »

I'd be happy to PM it to you if you like, but I am sorry I didn't understand what you meant by files, I assumed you wanted the actual files, I understand that you wanted the content, I will be happy to copy and paste it for you in PM to take a look. Again, sorry for the confusion.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Post Reply