nerzhul / ncsms-android

repository for the ncsms on Android
95 stars 38 forks source link

Can't restore SMS on a new phone #198

Closed e-caille closed 6 years ago

e-caille commented 6 years ago
### Steps to reproduce 1. Have an existing Nextcloud account with SMS on the server 2. Add account in App 3. Give permissions and click on Restore my SMS in the app ### Expected behaviour SMS should be restored from server ### Actual behaviour Nothing happen ### Server configuration **Nextcloud version:** 13.0 **PHP version:** 7.2.2 **Webserver:** apache 2.4.33 **HTTPS:** yes, certbot ### Client configuration **Android version:** 8.1 **Phone:** OnePlus 5T (dual SIM) **Nextcloud SMS app version:** 2.0.4 ### Logs Android : ``` 04-18 00:30:40.531 18134 18134 I RestoreMessagesActivity: Launching restore asynchronously 04-18 00:30:40.541 18134 23713 I ASyncSMSRecovery: Starting background recovery 04-18 00:30:41.039 18134 23713 I GoLog : DoGetMessagesCall: Unable to decode JSON response from server. Error was: json: cannot unmarshal string into Go struct field SmsMessage.mailbox of type int 04-18 00:30:41.039 18134 23713 E OCSMSOwnCloudClient: Invalid response received from server, either messages or last_id field is missing. 04-18 00:30:41.039 18134 23713 I ASyncSMSRecovery: Retrieved returns failure ``` Apache : ``` [18/Apr/2018:00:30:40 +0200] "GET /index.php/apps/ocsms/api/v2/messages/0/500?format=json HTTP/1.1" 200 88629 "-" "nextcloud-phonesync-go (2.0.4)" ```
nerzhul commented 6 years ago

Hello, thanks for the pointed. I think there is a mismatch in JSON types in the API which was hidden by java serialization before, but golang serialization is more strict, and that should be fixed in server part

nerzhul commented 6 years ago

issue solved by publishing server app 1.12.6, please update