TypeError unknown encoding iso-8859-1 when running cwmp

I have installed the latest genieacs by using the git clone method in the github README. My operating system is Ubuntu 18.04.2LTS, clean install.

I then start all the services by issuing command ./dist/bin/genieacs-cwmp, etc. I then connect my device to try to talk to genieacs-cwmp - and the device does not show up listed on the device subtab of the gui. However when I look at the status of genieacs-cwmp (I have screen installed, rather than tmux), I see error messages about uncaught exception and the TypeError is [ERR_UNKNOWN_ENCODING] with reference to iso-8859-1.

So t thought that I will try 1.2 beta again on a clean install of Ubuntu 18.04.2LTS. Followed the instructions as per the new documentation - except I had to install the services at /lib/systemd/system, rather than /etc/systemd/system. I can enable and start all services. After connecting the device, I check the status of all services and they are OK, again except for geneiacs-cwmp. Again, everytime the device tries to connect with the service (via isc-dhcp-server with proper changes made to the configuration file to point to acs port), I get the same error as above which is unknown encoding and referenced to iso-8859-1

Is there anything I can try to overcome this?

Can you capture the incoming HTTP request (including headers) so I can reproduce and hopefully implement a fix?




I selected a section of the tcpdump which was appropriate. The request is repeated every 1 minute or so. Even though the http capture headers are not the time stamp as the tcp dump, they should match.

Hopefully I did it correctly. Had to learn a slight bit about tcpdump to do this

I have just implemented a fix for this in master. I had to introduce a new dependency so make sure to run ‘npm install’.

Thank you very much! That fixed it. Not that I use GenieACS much, but I hope the fix also gets implemented in 1.2beta and going forward - I like the new method of calling GenieACS better in the beta

We’re also seeing a similar error:

Jul 27 23:16:59 acs genieacs-cwmp[23935]: 2020-07-27T23:16:59.716Z [ERROR] Uncaught exception; pid=24586 exceptionName="TypeError" exceptionMessage="Unknown encoding: iso-8859-1" exceptionStack="TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: iso-8859-1\n at Buffer.toString (buffer.js:799:11)\n at listenerAsync (/usr/lib/node_modules/genieacs/bin/genieacs-cwmp:2:129798)\n at processTicksAndRejections (internal/process/task_queues.js:93:5)"

This is from a new install using the latest 1.2 beta as per the install docs. Is this the same issue or something different?

Did you install the beta from npm? If so, try installing from the latest master branch instead.

I followed the docs at http://docs.genieacs.com/en/latest/installation-guide.html from the home page.

When you refer to master, are you saying 1.1.3 instead?


No, I meant install from source rather than from npm.