bklaas / fontreplacer

Replace limited stock font with full Unicode font on SqueezeOS-based Squeezeboxes
1 stars 0 forks source link

Font Replacer no longer working #2

Open rojikewl opened 7 years ago

rojikewl commented 7 years ago

I've used Font Replacer on Squeezebox Touches and Radios for years to display Japanese text, but for at least several months now I've been unable to activate Font Replacer on a Touch. There is no error message and the add-on seems to install, but too quickly, with no download of files appearing to take place. When the Touch restarts it is as if Font Replacer has not been installed. "Font Replacer" does show up in the applet list with "reinstall" after it in parentheses, but the normal confirmation to activate Font Replacer doesn't appear; the Touch just shows its usual home screen. Doing a factory restore doesn't resolve the issue. I sent an e-mail asking for help but received no reply. If the files are missing, is there a way to install them manually? I do have Font Replacer working on another Touch and on a few Radios. Thanks in advance for any help, and for providing this useful software in the first place.

bklaas commented 7 years ago

I can reproduce the issue. From what I can see from the log it's failing to download the zip file. I believe this may be due to my website now exclusively being encrypted https and not http, and the squeezeplay code not properly handling the automatic URL redirect.

I am going to ask Michael to fix the URL pointer on SqueezeNetwork for FontReplacer, and we'll see if that fixes the issue.

Jul 13 08:07:11 squeezeplay: INFO squeezeplay.applets - AppletMeta.lua:146 entering SetupAppletInstaller Jul 13 08:07:11 squeezeplay: INFO applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:72 requesting applets for version: 7.8.0.16754 Jul 13 08:07:11 squeezeplay: INFO applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:115 sending query to SlimServer {zotac-the-destroyer} Jul 13 08:07:13 squeezeplay: INFO applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:140 reponse received from SlimServer {zotac-the-destroyer} with 15 entries Jul 13 08:07:13 squeezeplay: INFO applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:167 best received from SlimServer {zotac-the-destroyer} with 15 entries Jul 13 08:07:26 squeezeplay: INFO applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:442 removing: /usr/share/jive/applets/FontReplacer Jul 13 08:07:26 squeezeplay: INFO applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:456 downloading: http://benklaas.com/fontreplacer/FontReplacer-1.3.zip to: /usr/share/jive/applets/FontReplacer/ sha1: 622cd1c113973ab5f1143ecc6343988baa0da3fb Jul 13 08:07:36 squeezeplay: WARN net.thread - NetworkThread.lua:146 network thread timeout for Task(SocketHttp {benklaas.com}(W)) Jul 13 08:07:36 squeezeplay: ERROR net.http - SocketHttp.lua:375 SocketHttp {benklaas.com}:t_sendRequest.pump: inactivity timeout Jul 13 08:07:36 squeezeplay: stack traceback: Jul 13 08:07:36 squeezeplay: /usr/share/jive/jive/net/SocketHttp.lua:375: in function 'pump' Jul 13 08:07:36 squeezeplay: /usr/share/jive/jive/net/SocketTcp.lua:200: in function 'writePump' Jul 13 08:07:36 squeezeplay: /usr/share/jive/jive/net/Socket.lua:186: in function </usr/share/jive/jive/net/Socket.lua:184> Jul 13 08:07:36 squeezeplay: WARN applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:480 sha1 missmatch expected: 622cd1c113973ab5f1143ecc6343988baa0da3fb got: da39a3ee5e6b4b0d3255bfef95601890afd80709 Jul 13 08:07:36 squeezeplay: INFO squeezeplay.applets - AppletManager.lua:708 store settings: SetupAppletInstaller

mherger commented 7 years ago

@bklaas - I'm pulling your repository file from https://benklaas.com/fontreplacer/repo.xml. But I can't change that file's content. Could you please update it?

bklaas commented 7 years ago

Done.

bklaas commented 7 years ago

Thanks Michael. I can see from my logs that the URL is now https, but I'm still getting a network timeout failure. This was somewhat expected though, because that URL is not resolvable from inside my LAN (benklaas.com is inside my LAN and is unreachable from a squeezebox via DNS).

Michael, do you have a Touch available you could tail -f /var/log/messages while trying to install FontReplacer, and post the output here?

michaelherger commented 7 years ago

I fear SqueezeOS can't handle https:

# wget https://benklaas.com/fontreplacer/FontReplacer-1.3.zip
wget: not an http or ftp url: https://benklaas.com/fontreplacer/FontReplacer-1.3.zip

And the Applet installer would be redirected - most likely because it tries http instead of https:

Jul 13 15:48:22 squeezeplay: INFO   applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:456 downloading: https://benklaas.com/fontreplacer/FontReplacer-1.3.zip to: /usr/share/jive/applets/FontReplacer/ sha1: 622cd1c113973ab5f1143ecc6343988baa0da3fb
Jul 13 15:48:23 squeezeplay: INFO   net.http - RequestHttp.lua:366 301 redirect: https://benklaas.com/fontreplacer/FontReplacer-1.3.zip
michaelherger commented 7 years ago

Ooops... fired off the comment a bit too early...

With more logging enabled we'd see that Squeezeplay is trying to reach your server on port 80:

Jul 13 15:55:02 squeezeplay: INFO   applet.SetupAppletInstaller - SetupAppletInstallerApplet.lua:456 downloading: https://benklaas.com/fontreplacer/FontReplacer-1.3.zip to: /usr/share/jive/applets/FontReplacer/ sha1: 622cd1c113973ab5f1143ecc6343988baa0da3fb
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:98 SocketHttp:__init(benklaas.com, benklaas.com, 80)
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:139 SocketHttp {benklaas.com} queuing RequestHttp {GET /fontreplacer/FontReplacer-1.3.zip} - 1 requests in queue
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:197 SocketHttp {benklaas.com}:t_sendDequeueIfIdle state=t_sendDequeue
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:149 SocketHttp {benklaas.com}:t_nextSendState(true, nil)
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:178 SocketHttp {benklaas.com}:t_sendDequeue()
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:183 SocketHttp {benklaas.com} send processing RequestHttp {GET /fontreplacer/FontReplacer-1.3.zip}
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:149 SocketHttp {benklaas.com}:t_nextSendState(true, t_sendResolve)
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:208 SocketHttp {benklaas.com}:t_sendResolve()
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:226 SocketHttp {benklaas.com} DNS loopup for benklaas.com
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:236 SocketHttp {benklaas.com} IP=97.116.150.95
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:149 SocketHttp {benklaas.com}:t_nextSendState(true, t_sendConnect)
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:253 SocketHttp {benklaas.com}:t_sendConnect()
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:149 SocketHttp {benklaas.com}:t_nextSendState(true, t_sendRequest)
Jul 13 15:55:02 squeezeplay: DEBUG  net.http - SocketHttp.lua:343 SocketHttp {benklaas.com}:t_sendRequest()
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:372 SocketHttp {benklaas.com}:t_sendRequest.pump()
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:270 SocketHttp {benklaas.com}:t_getSendHeaders()
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:323 keep-open-non-blocking sink(147, nil, 0)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:328 keep-open-non-blocking sent - first is nil returning 147, nil
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:149 SocketHttp {benklaas.com}:t_nextSendState(true, t_sendComplete)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:149 SocketHttp {benklaas.com}:t_nextSendState(true, t_sendDequeue)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:178 SocketHttp {benklaas.com}:t_sendDequeue()
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:423 SocketHttp {benklaas.com}:t_nextRecvState(true, nil)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:441 SocketHttp {benklaas.com}:t_recvDequeue() queueLength=1
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:448 SocketHttp {benklaas.com} recv processing RequestHttp {GET /fontreplacer/FontReplacer-1.3.zip}
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:423 SocketHttp {benklaas.com}:t_nextRecvState(true, t_rcvHeaders)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:470 SocketHttp {benklaas.com}:t_rcvHeaders()
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:494 SocketHttp {benklaas.com}:t_rcvHeaders.pump()
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:423 SocketHttp {benklaas.com}:t_nextRecvState(true, t_rcvResponse)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:802 SocketHttp {benklaas.com}:t_rcvResponse.pump(jive-by-length, nil)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:731 SocketHttp.jive-by-chunk.sink(339, done)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:741 SocketHttp.jive-by-chunk.sink: chunk bytes: 339
Jul 13 15:55:03 squeezeplay: INFO   net.http - RequestHttp.lua:366 301 redirect: https://benklaas.com/fontreplacer/FontReplacer-1.3.zip
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:98 SocketHttp:__init(table: 0x70dfb0, benklaas.com, 80)
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:139 SocketHttp {table: 0x70dfb0} queuing RequestHttp {GET /fontreplacer/FontReplacer-1.3.zip} - 1 requests in queue
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:197 SocketHttp {table: 0x70dfb0}:t_sendDequeueIfIdle state=t_sendDequeue
Jul 13 15:55:03 squeezeplay: DEBUG  net.http - SocketHttp.lua:149 SocketHttp {table: 0x70dfb0}:t_nextSendState(true, nil)

...and when re-directed, it just tries the same mistake again.

@bklaas - I can host that file on a plain text http server, if this doesn't worry you.

bklaas commented 7 years ago

Ouch, I kind of remember that limitation now.

I don't think it's feasible for me to self-host this file now, I need my whole website to be https only (this is not a joke- I was hacked by Russians earlier this year because of plain-text http on the wire).

If you can host the files, that would be fantastic. It's very low traffic :)

michaelherger commented 7 years ago

Could you please update your repo file to point to http://downloads.nixda.ch/FontReplacer-1.3.zip? That's fronted by cloudflare's CDN. It should be able to swallow the traffic :-)

bklaas commented 7 years ago

done

michaelherger commented 7 years ago

Ok, I think that did it. At least now I saw SP download stuff from the server, and it took much longer before it re-booted.

@rojikewl - could you please try again?

bklaas commented 7 years ago

Full confirmation from here, FontReplacer now installs and works properly.

As usual, thanks for all of the support!

rojikewl commented 7 years ago

Confirmed! Many thanks to you both!