ddvk / rmfakecloud

host your own cloud for the remarkable
GNU Affero General Public License v3.0
705 stars 57 forks source link

sync breaks on 3.3.2.1666 #237

Closed zcy85611 closed 1 year ago

zcy85611 commented 1 year ago

I just updated to 3.3.2.1666, with everything unchanged, the sync on remarkable breaks

reMarkable can be paired with server, but the sync icon shows not connected and no files can be synced

on windows client v3.30.772 seems to be fine, files sync on server and windows client

I'm using sync 1.5 and v0.0.13.2, when I downgrade to 3.2.2.1581, everything works fine

I assume there is something changed on 3.3.2.1666 to break the sync, would you please help look into it please? thanks

xochitl log by [press check sync]

-- Logs begin at Tue 2023-04-18 12:50:59 UTC. --
Apr 27 10:38:39 reMarkable xochitl[239]: 10:38:39.683 default                  QIODevice::write (QSslSocket): device not open
Apr 27 10:38:39 reMarkable xochitl[239]: 10:38:39.688 rm.network.notifications Notifications socket is not OK: UnconnectedState (checkIfShouldConnect /usr/src/debug/xochitl/override+gitAUTOINC+6a003d604f-r0/git/src/notifications/src/notifications.cpp:187)
Apr 27 10:39:10 reMarkable xochitl[239]: 10:39:10.677 default                  QIODevice::write (QSslSocket): device not open
Apr 27 10:39:10 reMarkable xochitl[239]: 10:39:10.682 rm.network.notifications Notifications socket is not OK: UnconnectedState (checkIfShouldConnect /usr/src/debug/xochitl/override+gitAUTOINC+6a003d604f-r0/git/src/notifications/src/notifications.cpp:187)
Apr 27 10:39:41 reMarkable xochitl[239]: 10:39:41.677 default                  QIODevice::write (QSslSocket): device not open
Apr 27 10:39:41 reMarkable xochitl[239]: 10:39:41.682 rm.network.notifications Notifications socket is not OK: UnconnectedState (checkIfShouldConnect /usr/src/debug/xochitl/override+gitAUTOINC+6a003d604f-r0/git/src/notifications/src/notifications.cpp:187)
Apr 27 10:40:12 reMarkable xochitl[239]: 10:40:12.677 default                  QIODevice::write (QSslSocket): device not open
Apr 27 10:40:12 reMarkable xochitl[239]: 10:40:12.682 rm.network.notifications Notifications socket is not OK: UnconnectedState (checkIfShouldConnect /usr/src/debug/xochitl/override+gitAUTOINC+6a003d604f-r0/git/src/notifications/src/notifications.cpp:187)
Apr 27 10:40:43 reMarkable xochitl[239]: 10:40:43.677 default                  QIODevice::write (QSslSocket): device not open
Apr 27 10:40:43 reMarkable xochitl[239]: 10:40:43.682 rm.network.notifications Notifications socket is not OK: UnconnectedState (checkIfShouldConnect /usr/src/debug/xochitl/override+gitAUTOINC+6a003d604f-r0/git/src/notifications/src/notifications.cpp:187)

sync log

-- Logs begin at Tue 2023-04-18 12:50:59 UTC. --
Apr 27 10:16:27 reMarkable systemd[1]: Stopping reMarkable Document Sync...
Apr 27 10:16:27 reMarkable systemd[1]: sync.service: Succeeded.
Apr 27 10:16:27 reMarkable systemd[1]: Stopped reMarkable Document Sync.
-- Reboot --
Apr 27 10:16:52 reMarkable systemd[1]: Started reMarkable Document Sync.
Apr 27 10:16:52 reMarkable sync[240]: Lock in temp location
Apr 27 10:16:52 reMarkable sync[240]: Installing crash handler
Apr 27 10:16:52 reMarkable sync[240]: installed crash handler
Apr 27 10:16:52 reMarkable sync[240]: Running service...
Apr 27 10:21:29 reMarkable sync[240]: rm.synchronizer.tree:  - time consuming hash of "bc8936e3-d4d5-4c50-903d-8a0936429b0e.pdf" took 508.524754ms
Apr 27 10:30:24 reMarkable sync[240]: rm.synchronizer.tree:  - time consuming hash of "f2ffa664-2c1a-4b45-bb93-d1856d134630.pdf" took 506.773638ms
-- Logs begin at Tue 2023-04-18 12:50:59 UTC. --
Apr 27 10:16:27 reMarkable systemd[1]: Stopping reMarkable Document Sync...
Apr 27 10:16:27 reMarkable systemd[1]: sync.service: Succeeded.
Apr 27 10:16:27 reMarkable systemd[1]: Stopped reMarkable Document Sync.
-- Reboot --
Apr 27 10:16:52 reMarkable systemd[1]: Started reMarkable Document Sync.
Apr 27 10:16:52 reMarkable sync[240]: Lock in temp location
Apr 27 10:16:52 reMarkable sync[240]: Installing crash handler
Apr 27 10:16:52 reMarkable sync[240]: installed crash handler
Apr 27 10:16:52 reMarkable sync[240]: Running service...
Apr 27 10:21:29 reMarkable sync[240]: rm.synchronizer.tree:  - time consuming hash of "bc8936e3-d4d5-4c50-903d-8a0936429b0e.pdf" took 508.524754ms
Apr 27 10:30:24 reMarkable sync[240]: rm.synchronizer.tree:  - time consuming hash of "f2ffa664-2c1a-4b45-bb93-d1856d134630.pdf" took 506.773638ms
nemunaire commented 1 year ago

I'm on 3.3.2.1666 also, but the sync works well for me.

Regarding the logs, I have the same Notifications socket is not OK and rm.synchronizer.tree: - time consuming hash of. That should be normal.

Can you also provide rmfakecloud logs?

zcy85611 commented 1 year ago

I'm on 3.3.2.1666 also, but the sync works well for me.

Regarding the logs, I have the same Notifications socket is not OK and rm.synchronizer.tree: - time consuming hash of. That should be normal.

Can you also provide rmfakecloud logs?

no errors on the server, I found that I have to open a file and exit it, then it starts to sync, but still the sync icon on the left corner show it's not connected. the same thing happens on desktop client, if I just drag a file into the client, it won't sync, untill I open a file and exit


Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg=16825992786fd6d83dc550ce0eac8e948ac487389b61aa8e6ab64e583e716971da0c371d7c
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="Write: somepath/sync/cde610e79602d2069dbf4d75691361ce1a6729fc45eecee5c10007ebb3588408"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="[GIN] 2023/04/27 - 12:36:18 | 200 |    47.03286ms |       127.0.0.1 | PUT      \"/blobstorage?blobid=cde610e79602d2069dbf4d75691361ce1a6729fc45eecee5c10007ebb3588408&exp=1682599278&scope=write&signature=6fd6d83dc550ce0eac8e948ac487389b61aa8e6ab64e583e716971da0c371d7c&uid=admin\""
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="[auth-middleware] UserId: admin deviceId: RM110-somecode newSync: true"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="[GIN] 2023/04/27 - 12:36:18 | 200 |   45.628842ms |       127.0.0.1 | POST     \"/sync/v2/signed-urls/uploads\""
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg=1682599278be1d88cdc6d2b07934c0a475e98f9a3759cf20e3a1d093891ccdc94cba01c964
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="Client sent generation:19"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="Write: somepath/sync/root"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="[GIN] 2023/04/27 - 12:36:18 | 200 |   47.176482ms |       127.0.0.1 | PUT      \"/blobstorage?blobid=root&exp=1682599278&scope=write&signature=be1d88cdc6d2b07934c0a475e98f9a3759cf20e3a1d093891ccdc94cba01c964&uid=admin\""
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="[auth-middleware] UserId: admin deviceId: RM110-somecode newSync: true"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="Sync completeV2"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="got sync completed, gen: 20"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="notify sync from: RM110-somecode"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="[GIN] 2023/04/27 - 12:36:18 | 200 |   51.905957ms |       127.0.0.1 | POST     \"/sync/v2/sync-complete\""
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="hub: dispatching notification"
Thu Apr 27 20:36:18 2023 rMcloud[7814]: time="2023-04-27T12:36:18Z" level=info msg="Broadcast notification, for all devices of  uid:admin id 834948258"
zeigerpuppy commented 1 year ago

I am also getting sync problems with 3.3.2.1666

Installed using automagic script:

sh -c "$(wget https://raw.githubusercontent.com/ddvk/rmfakecloud/master/scripts/device/automagic.sh -O-)"

installer seems fine

Connecting to raw.githubusercontent.com (185.199.109.133:443)
wget: note: TLS certificate validation not implemented
writing to stdout
-                    100% |*****************************************************************************************************|   275  0:00:00 ETA
written to stdout
Getting the installer...
Connecting to github.com (20.248.137.48:443)
wget: note: TLS certificate validation not implemented
Connecting to objects.githubusercontent.com (185.199.109.133:443)
saving to 'installer.sh'
installer.sh         100% |*****************************************************************************************************| 2000k  0:00:00 ETA
'installer.sh' saved
Running the installer...
Extracting embedded binary...
~/rmfakecloud ~/scripts/rmfakecloud_new
CA exists
Private key exists
Pub key exists
crt exists
The cert has been already installed, it will be removed and reinstalled!!!
Clearing symlinks in /etc/ssl/certs...
done.
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Clearing symlinks in /etc/ssl/certs...
done.
Updating certificates in /etc/ssl/certs...
rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Enter your own cloud url [http(s)://somehost:port] >https://rm.myserver.net
Setting cloud sync to: https://rm.myserver.net
Patching /etc/hosts
# rmfake_start
Stoping xochitl..
Fixing sync status...
Starting xochitl...

Yes, my server does have valid SSL cert from LetsEncrypt (working fine prior to update).

I can connect to rmfakecloud but testing sync (device -> server) does not work.

not sure if this message during install is significant?

 rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL
zeigerpuppy commented 1 year ago

Similar errors with trying to send email from tablet, log.txt:

Apr 30 22:49:10.805 Warning: Notifications socket is not OK: UnconnectedState (/usr/src/debug/xochitl/override+gitAUTOINC+6a003d604f-r0/git/src/notifications/src/notifications.cpp:187, checkIfShouldConnect)
Apr 30 22:49:10.969 Warning: Bad Gateway (:0, )
Apr 30 22:49:13.965 Warning: Bad Gateway (:0, )
Apr 30 22:49:23.085 Warning: Error on sending mail with url "https://internal.cloud.remarkable.com/share/v1/email" with error ContentNotFoundError (/usr/src/debug/xochitl/override+gitAUTOINC+6a003d604f-r0/git/src/sendmail.cpp:621, handleError)

ping of internal.cloud.remarkable.com returns 127.0.0.1 so proxy seems ok

ping of rmfakecloud server address is also OK

zeigerpuppy commented 1 year ago

I agree @pacop my issue seems a bit different:

This issue may also be relevant: https://github.com/ddvk/rmfakecloud/issues/235