davidcava / shadowsocks-libev-dsm

Synology DSM packages for Shadowsocks-libev.
GNU General Public License v3.0
94 stars 11 forks source link

Undefined array key "SynoToken" #16

Closed anamewing closed 1 year ago

anamewing commented 1 year ago

After clicking the installed app icon, get the following error message on a new webpage.

Warning: Undefined array key "SynoToken" in /volume1/@appstore/shadowsocks-libev/ui/authwithouttoken.php on line 15

Warning: Undefined array key "X-SYNO-TOKEN" in /volume1/@appstore/shadowsocks-libev/ui/authwithouttoken.php on line 15

Warning: Array to string conversion in /volume1/@appstore/shadowsocks-libev/ui/authwithouttoken.php on line 17

Warning: Array to string conversion in /volume1/@appstore/shadowsocks-libev/ui/authwithouttoken.php on line 30
Content-type: text/html; charset=utf-8

and then some HTML codes.

It worked well months ago when I first installed the package. I'm not sure when the error showed first. It might relate to that I updated to DSM 7.2-64570 recently.

davidcava commented 1 year ago

Might be a change in the setting or version of the default installed PHP runtime. I can try something, unfortunately Synology does not provide the upgrade to DSM 7.2 for my model, so I won't be able to test that it fixes the issue.

Bonk-Choy commented 1 year ago

I got the same error message. Thanks for making this app.

davidcava commented 1 year ago

I just published a new release where I added a directive that prevents PHP outputting the warnings, which I assume must have been the default behaviour before the DSM update. As I cannot test under DSM 7.2 I don't know if that is enough to restore a working UI, so please test and feedback.

Otherwise remind that the UI is just here to make it a bit easier to maintain the configuration files and start/stop the services. You can maintain the config files and start/stop the service through SSH, see the Usage section on Github main page for shadowsocks-libev-dsm.

anamewing commented 1 year ago

Thanks for the updates! I can confirm that version 3.3.5-3 has solved this issue on DSM 7.2-64570 update 1.

The only problem is that a new webpage with the configuration UI is shown when I click the app icon, instead of a small "window" inside the "DSM desktop" webpage. However, it is only a minor issue and does not affect the use of the package.

Thanks again for your quick fix.