Closed pwFoo closed 4 years ago
It would be trivial to add the line number but the problem is comments in json. They are stripped before parsing and that changes the line numbers. I'll look into it.
fixed.
Thanks, I'll deploy after new docker image is available.
Hi @or-else, have you fixed the error in the generated config or just improved the error message?
Waiting for the image with the fix for generated config file to test it. When will a new tinode/tinode-mysql published?
I've added more verbose error logging. I can't fix your error because I don't see it. If you need help please pull the generated config from the container and look at it. The error is likely to be obvious.
Hi, looks like a problem in the second line?!
{
½ "listen": ":18080",
Don't know how it could be config related because I don't configure / change the listen port?
Well, there is a problem in this line, but something is wrong elsewhere. The line like you have shown would produce an error invalid character 'Â' looking for beginning of object key string
. But you have reported the error invalid character '"' after object key:value pair
. So do please make sure you pull correct config file and the file is not corrupted.
I would guess you have quoted some string which does not need quoting. You probably have something like
"key": ""value""
Generated config. Haven't found a possible cause by a "
character.
{
"listen": ":18080",
"cache_control": 39600,
"static_mount": "/",
"grpc_listen": ":16061",
"api_key_salt": "<KEY>",
"max_message_size": 4194304,
"max_subscriber_count": 32,
"max_tag_count": 16,
"expvar": "",
"media": {
"use_handler": "fs",
"max_size": 33554432,
"gc_period": 60,
"gc_block_size": 100,
"handlers": {
"fs": {
"upload_dir": "uploads"
},
"s3":{
"access_key_id": "",
"secret_access_key": "",
"region": "",
"bucket": "",
"cors_origin": ["*"]
}
}
},
"tls": {
"enabled": false,
"http_redirect": ":80",
"strict_max_age": 604800,
"autocert": {
"cache": "/etc/letsencrypt/live/",
"email": "",
"domains": [""]
}
},
"auth_config": {
"logical_names": [],
"basic": {
"add_to_tags": true,
"min_login_length": 3,
"min_password_length": 6
},
"token": {
"expire_in": 1209600,
"serial_num": 1,
"key": "<KEY>"
}
},
"store_config": {
"uid_key": "<KEY>",
"adapters": {
"mysql": {
"database": "tinode",
"dsn": "root@tcp(mysql)/tinode?parseTime=true&collation=utf8mb4_unicode_ci"
},
"rethinkdb": {
"database": "tinode",
"addresses": "rethinkdb"
}
"mongodb": {
"database": "tinode",
"addresses": "mongodb",
"replica_set": "rs0"
}
}
},
"acc_validation": {
"email": {
"add_to_tags": true,
"required": ["auth"],
"config": {
"host_url": "https://chat.example.com",
"smtp_server": "smpt.example.com",
"smtp_port": "25",
"login": "",
"sender": "noreply@example.com",
"sender_password": "<SMTP_PW>",
"validation_body_templ": "./templ/email-validation-body.templ",
"validation_subject": "Tinode registration: confirm email",
"reset_body_templ": "./templ/email-password-reset.templ",
"reset_subject": "Reset Tinode password",
"headers": [],
"max_retries": 4,
"domains": [],
"debug_response": ""
}
},
"tel": {
"add_to_tags": true,
"config": {
"template": "./templ/sms-validation.templ",
"max_retries": 4,
"debug_response": ""
}
}
},
"push": [
{
"name":"fcm",
"config": {
"enabled": true,
"buffer": 1024,
"project_id": "",
"credentials_file": "/fcm/tinode-1586b-firebase-adminsdk-vima7-373057298f.json",
"time_to_live": 3600,
"include_android_notification": true,
"icon": "ic_logo_push",
"icon_color": "#3949AB"
}
}
],
"plugins": [
{
"enabled": false,
"name": "python_chat_bot",
"timeout": 20000,
"filters": {
"account": "C"
},
"failure_code": 0,
"failure_text": null,
"service_addr": "tcp://localhost:40051"
}
]
}
OK, here is the problem: https://github.com/tinode/chat/commit/960092cbc721d4d84a70c7e345b1e249e73100da
Thanks! So it should be fixed in the next build 👍
Docker has been released
Fixed with rc5 image. Closed. Thanks!
Hi @or-else, I updated my tinode docker swarm to latest and it breaks with the following error.
I started the container manually to try to do more debugging...
Any idea why there is an invalid character in the generated config? Environment configurationen
Any change to add the line to the error message for future debugging?