System commands won't work at smartphone apps

Hi guys,

I have problem with switching my printer light on/off via smartphone apps like OctoClient or OctoPod. If I use OctoPrint web interface it works fine. But if I'd like to use commands via app it doesn't work at all - nothing happens.

I had long time conversation with OctoClient support, but without getting my problem solved. After that I tried another app called OctoPod and guess what - same issue within this app. The commands are shown in the menu but there is no action after clicking.

Here are my system facts at all:

  • Ender 3 Pro

  • RaspberryPi 3 B+

  • OctoPrint 1.3.11 (actual 1.3.12)

  • iPhone XR with iOS 12.1 (actual 13.1.1)

  • OctoClient v 3.0.4 (42)

  • OctoPod v 2.8 build 2

Here are the part of the ~/.octoprint/config.yaml

system:
  actions:
  - action: mainlight on
    command: /usr/local/bin/gpio -g write 17 1
    name: Hauptbeleuchtung einschalten
  - action: mainlight off
    command: /usr/local/bin/gpio -g write 17 0
    name: Hauptbeleuchtung ausschalten

I checked octoprint.log about any command response … this is the "old" log:

2019-08-05 11:33:25,728 - octoprint.plugins.navbartemp - INFO - Checking SoC internal temperature
2019-08-05 11:33:55,781 - octoprint.plugins.navbartemp - INFO - Checking SoC internal temperature
2019-08-05 11:34:25,841 - octoprint.plugins.navbartemp - INFO - Checking SoC internal temperature
2019-08-05 11:34:46,270 - octoprint.server.api.system - INFO - Performing command for custom:mainlight on
2019-08-05 11:34:53,107 - octoprint.server.api.system - INFO - Performing command for custom:mainlight off
2019-08-05 11:34:55,896 - octoprint.plugins.navbartemp - INFO - Checking SoC internal temperature
2019-08-05 11:34:58,310 - tornado.access - WARNING - 403 GET /sockjs/websocket (::ffff:10.10.0.20) 1.81ms
2019-08-05 11:35:25,959 - octoprint.plugins.navbartemp - INFO - Checking SoC internal temperature
2019-08-05 11:35:49,670 - tornado.access - WARNING - 403 GET /sockjs/websocket (::ffff:10.10.0.20) 2.17ms
2019-08-05 11:35:56,012 - octoprint.plugins.navbartemp - INFO - Checking SoC internal temperature
2019-08-05 11:36:26,069 - octoprint.plugins.navbartemp - INFO - Checking SoC internal temperature

First I tried to switch light via web interface and it worked @ 11:34:46

After that I tried to switch light via app 3 times and no entry was created. I thought the tornado.access WARNING was created due the issue, but after the third try there is no additional tornado.access entry - so I think this is another „issue“?!

Anyway... with web interface everything works fine ...

Any guess? Any help?

Sounds like a systemic problem with Safari/iOS to be honest.

iOS 9 only accepts certificates signed with a SHA-256 hash. So, the problem most likely is with the cert file given to you by your employer. Ask them to generate a new certificate using SHA-256 instead of SHA-1 and serve the new certificate instead. – Brendon Roberto Apr 19 '16 at 18:54

Backing up, it's possible that Safari/iOS is trying to play safe for you. For example, it might not do websockets without encryption. And then next, it might not to that encryption unless the hashes are at least 256-bits.

Jump down to the nginx fix described later in that thread and noting that you're using haproxy instead for the average OctoPi-imaged installation.