Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Failed to load service file '/usr/lib/firewalld/servii ces/steam-streaming.xml' #356

Closed
mbiebl opened this issue Jul 26, 2018 · 1 comment

Comments

@mbiebl
Copy link
Contributor

mbiebl commented Jul 26, 2018

When running firewalld with a non-UTF8 locale (in my case it was POSIX), I get the following failure when starting the daemon:

2018-07-26 23:04:38 ERROR: Failed to load service file '/usr/lib/firewalld/services/steam-treaming.xml':
2018-07-26 23:04:38 Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/firewall/core/fw.py", line 530, in _loader
    obj = service_reader(filename, path)
  File "/usr/lib/python3/dist-packages/firewall/core/io/service.py", line 224, in service_reader
    parser.parse(f)
  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.6/xml/sax/xmlreader.py", line 123, in parse
    buffer = file.read(self._bufsize)
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 350: ordinal not in range(128)
@erig0
Copy link
Collaborator

erig0 commented Jul 27, 2018

There are a couple unicode right single quotation marks in this service definition. The quick fix is to convert these to ASCII apostrophe. We should really be able to handle unicode in these definitions for non-utf8 locales. I'll make a note to take a look at this. In the mean time I'll push the quick fix below.

$ git diff                                                                                                                       
diff --git a/config/services/steam-streaming.xml b/config/services/steam-streaming.xml                                                                                      
index 84b4b23acc16..0e0aca62a90e 100644
--- a/config/services/steam-streaming.xml
+++ b/config/services/steam-streaming.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <service>
   <short>Steam In-Home Streaming</short>
-  <description>Steam in-home streaming allows you to play a game on one computer when the game process is actually running on another computer elsewhere in your home. Through Steam, game audio and video is captured on the remote computer and sent to the player’s computer. The game input (keyboard, mouse or gamepad) is sent from the player’s computer to the game process on the remote computer.</description>                                                                                                            
+  <description>Steam in-home streaming allows you to play a game on one computer when the game process is actually running on another computer elsewhere in your home. Through Steam, game audio and video is captured on the remote computer and sent to the player's computer. The game input (keyboard, mouse or gamepad) is sent from the player's computer to the game process on the remote computer.</description>
   <port protocol="tcp" port="27036"/>
   <port protocol="tcp" port="27037"/>
   <port protocol="udp" port="27031"/>
$ file config/services/steam-streaming.xml                                                                                         
config/services/steam-streaming.xml: XML 1.0 document, ASCII text, with very long lines

@erig0 erig0 closed this as completed in e8d1585 Jul 27, 2018
erig0 added a commit that referenced this issue Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants