ocsms icon indicating copy to clipboard operation
ocsms copied to clipboard

2.0.2 fails to synch

Open fyah opened this issue 6 years ago • 3 comments

Steps to reproduce

  1. Use android app to synch messages

Expected behaviour

Messages are availalbe in the app

Actual behaviour

Message are not available in the app

Server configuration

Nextcloud/ownCloud version: 14.0.3

Client configuration

Android version: 8

Phone: 1+ 3

Nextcloud SMS app version: 2.0.4

Logs

{
  "reqId": "LahIBxJUjVKvfn8gKRcG",
  "level": 3,
  "time": "2018-11-12T17:32:39+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "zzz",
  "app": "index",
  "method": "POST",
  "url": "\/index.php\/apps\/ocsms\/push?format=json",
  "message": {
    "Exception": "Doctrine\\DBAL\\Exception\\DriverException",
    "Message": "An exception occurred while executing 'INSERT INTO `ocsms_smsdatas` (`user_id`, `added`, `lastmodified`, `sms_flags`, `sms_date`, `sms_id`, `sms_address`, `sms_msg`, `sms_mailbox`, `sms_type`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [\"zzz\", \"2018-11-12 17:32:38\", \"2018-11-12 17:32:38\", \"11\", 1539515634557, 13136, \"+336xxxxxxxxx\", \"\\ud83d\\ude02\\ud83e\\udd23\", 0, 1]:\n\nSQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\\xF0\\x9F\\x98\\x82\\xF0\\x9F...' for column 'sms_msg' at row 1",
    "Code": 0,
    "Trace": [
      {
        "file": "\/volume1\/web\/nextcloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php",
        "line": 128,
        "function": "convertException",
        "class": "Doctrine\\DBAL\\Driver\\AbstractMySQLDriver",
        "type": "->",
        "args": [
          "An exception occurred while executing 'INSERT INTO `ocsms_smsdatas` (`user_id`, `added`, `lastmodified`, `sms_flags`, `sms_date`, `sms_id`, `sms_address`, `sms_msg`, `sms_mailbox`, `sms_type`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [\"zzz\", \"2018-11-12 17:32:38\", \"2018-11-12 17:32:38\", \"11\", 1539515634557, 13136, \"+336xxxxxxxxx\", \"\\ud83d\\ude02\\ud83e\\udd23\", 0, 1]:\n\nSQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\\xF0\\x9F\\x98\\x82\\xF0\\x9F...' for column 'sms_msg' at row 1",
          {
            "errorInfo": [
              "22007",
              1366,
              "Incorrect string value: '\\xF0\\x9F\\x98\\x82\\xF0\\x9F...' for column 'sms_msg' at row 1"
            ],
            "__class__": "Doctrine\\DBAL\\Driver\\PDOException"
          }
        ]
      },
      {
        "file": "\/volume1\/web\/nextcloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php",
        "line": 1015,
        "function": "driverExceptionDuringQuery",
        "class": "Doctrine\\DBAL\\DBALException",
        "type": "::",
        "args": [
          {
            "__class__": "Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"
          },
          {
            "errorInfo": [
              "22007",
              1366,
              "Incorrect string value: '\\xF0\\x9F\\x98\\x82\\xF0\\x9F...' for column 'sms_msg' at row 1"
            ],
            "__class__": "Doctrine\\DBAL\\Driver\\PDOException"
          },
          "INSERT INTO `ocsms_smsdatas` (`user_id`, `added`, `lastmodified`, `sms_flags`, `sms_date`, `sms_id`, `sms_address`, `sms_msg`, `sms_mailbox`, `sms_type`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
          {
            "1": "zzz",
            "2": "2018-11-12 17:32:38",
            "3": "2018-11-12 17:32:38",
            "4": "11",
            "5": 1539515634557,
            "6": 13136,
            "7": "+336xxxxxxxxx",
            "8": "\ud83d\ude02\ud83e\udd23",
            "9": 0,
            "10": 1
          }
        ]
      },
      {
        "file": "\/volume1\/web\/nextcloud\/lib\/private\/DB\/Connection.php",
        "line": 216,
        "function": "executeUpdate",
        "class": "Doctrine\\DBAL\\Connection",
        "type": "->",
        "args": [
          "INSERT INTO `ocsms_smsdatas` (`user_id`, `added`, `lastmodified`, `sms_flags`, `sms_date`, `sms_id`, `sms_address`, `sms_msg`, `sms_mailbox`, `sms_type`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
          [
            "zzz",
            "2018-11-12 17:32:38",
            "2018-11-12 17:32:38",
            "11",
            1539515634557,
            13136,
            "+336xxxxxxxxx",
            "\ud83d\ude02\ud83e\udd23",
            0,
            1
          ],
          [
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2
          ]
        ]
      },

fyah avatar Nov 12 '18 17:11 fyah

"Exception":"Doctrine\DBAL\Exception\DriverException","Message":"An exception occurred while executing 'INSERT INTO oc_ocsms_smsdatas (user_id, added, lastmodified, sms_flags, sms_date, sms_id, sms_address, sms_msg, sms_mailbox, sms_type) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["aguy", "2018-11-13 10:08:33", "2018-11-13 10:08:33", "00", 1542103847825, 10259, "+33651759711", "\ud83d\udc4d", 3, 1]:\n\nSQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x91\x8D' for column 'sms_msg' at row 1","Code":0,"Trace"

Idem :o( I was made modifications on nextcloud DB & oc_ocsms_smsdatas tables to change collation & character set. A strange thing are returned error is for 'datetime format' for column 'sms_msg' or encoding on Mariadb... I switch to other discussion on "nextcloud SMS"

Nextcloud 14.0.3 ocsms 2.0.4 Android 4.4.2

aguytech avatar Nov 13 '18 10:11 aguytech

wow interesting error, a date time format on a text colum it's quite anoying. What is your mariadb version ? Are you sure you configured your database correctly (like in the README.md ?)

nerzhul avatar Dec 10 '18 13:12 nerzhul

Hi, /usr/local/mariadb10/bin/mysqld Ver 10.3.7-MariaDB for Linux on (Source distribution)

I followed the following instructions https://docs.nextcloud.com/server/stable/admin_manual/configuration_database/mysql_4byte_support.html?highlight=byte

then I cleared all conversation from the web ui , reset the phone app and made a global synch

cannot see the same error in the logs, but not all sms are visible on the server, i can't tell why....

fyah avatar Dec 11 '18 11:12 fyah