eternal-flame-AD / gotify-broadcast

A plugin which brings broadcasts to gotify.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gotify 2.0.5 do not run with this plugin

profy12 opened this issue · comments

I'm unable to run with this plugin (plugin version 2.0.5 with gotify 2.0.5)

gotify@gotify:/var/www/gotify$ ls p/
broadcast.so
gotify@gotify:/var/www/gotify$ ./gotify-linux-amd64
Starting Gotify version 2.0.5@2019-04-14-14:11:45

(Error 1406: Data too long for column 'config' at row 1) 
[2019-06-07 14:57:14]  
panic: Error 1406: Data too long for column 'config' at row 1

goroutine 1 [running]:
github.com/gotify/server/router.Create(0xc00009a298, 0xc000086240, 0xc0000d6000, 0x48, 0xc0000982b0)
	/proj/router/router.go:46 +0x311f
main.main()
	/proj/app.go:51 +0x382

My config file :

gotify@gotify:/var/www/gotify$ cat config.yml 
server:
  listenaddr: "" # the address to bind on, leave empty to bind on all addresses
  port: 8080 # the port for the http server
  ssl:
    enabled: false # if https should be enabled
    redirecttohttps: true # redirect to https if site is accessed by http
    listenaddr: "" # the address to bind on, leave empty to bind on all addresses
    port: 443 # the https port
    certfile: # the cert file (leave empty when using letsencrypt)
    certkey: # the cert key (leave empty when using letsencrypt)
    letsencrypt:
      enabled: false # if the certificate should be requested from letsencrypt
      accepttos: false # if you accept the tos from letsencrypt
      cache: data/certs # the directory of the cache from letsencrypt
      hosts: # the hosts for which letsencrypt should request certificates
        - mydomain.tld
        - myotherdomain.tld
  responseheaders: # response headers are added to every response (default: none)
    Access-Control-Allow-Origin: "*"
    Access-Control-Allow-Methods: "GET,POST"
  stream:
    allowedorigins: # allowed origins for websocket connections (same origin is always allowed, default only same origin)
      - ".+.lan"
      - "localhost"
database: # see below
  dialect: mysql
  connection: gotify:******************@/gotify?charset=utf8&parseTime=True&loc=Local
defaultuser: # on database creation, gotify creates an admin user (these values will only be used for the first start, if you want to edit the user after the first start use the WebUI)
  name: admin # the username of the default user
  pass: *************** # the password of the default user
passstrength: 12 # the bcrypt password strength (higher = better but also slower)
uploadedimagesdir: /var/www/gotify/data/images # the directory for storing uploaded images
pluginsdir: /var/www/gotify/p # the directory where plugin resides (leave empty to disable plugins)

This looks like a database issue. I'll take a look at this.

If you created the database scheme with gotify prior to 2.0.4, the problem might be due to a configuration error fixed in 2.0.4. Can you try creating a new database and try if the initialization could be done successfully then? Thanks

It's a fresh install with gotify 2.0.5, but you are right I will try initialize directly with your plugin activated.

still same error

This is a problem with gotify. I have filed it as gotify/server#195.

So maybe a alter table can solve temporary the problem, which new column type do you sugest ?

I tried a longblob, which works on mysql and mariadb but not postgres.

I confirm, it's running on MySQL 5.7 with

alter table `plugin_confs` modify column config LONGBLOB;