Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Sync #330

Open
boogiewoogit opened this issue Nov 7, 2024 · 16 comments
Open

Unable to Sync #330

boogiewoogit opened this issue Nov 7, 2024 · 16 comments

Comments

@boogiewoogit
Copy link

boogiewoogit commented Nov 7, 2024

After setting up rmfakecloud (v0.0.18) on a webserver and rmfakecloud-proxy (v0.0.5) on a remarkable 2 (ver. 3.15.4.2), pairing worked and I can connect to a nextcloud integration on the remarkable (so for the most part, the setups must have been successful), but Check sync fails with Unable to sync document content.

journalctl -n 4 -u rmfakecloud-proxy on the remarkable:

-- Boot 5a3afeff71fd4b8d8c69aa5e75d1f1f9 --
Nov 07 13:28:57 reMarkable systemd[1]: Started rmfakecloud reverse proxy.
Nov 07 13:28:57 reMarkable rmfakecloud-proxy[208]: 2024/11/07 13:28:57 cert-file=/home/root/rmfakecloud/proxy.bundle.crt key-file=/home/root/rmfakecloud/proxy.key listen-addr=:443 upstream-url=https://my.domain
Nov 07 13:28:58 reMarkable rmfakecloud-proxy[208]: 2024/11/07 13:28:58 http: proxy error: dial tcp: lookup my.domain on 1.0.0.1:53: dial udp 1.0.0.1:53: connect: network is unreachable

journalctl -n 25 -u xochitl on the remarkable:

Nov 07 13:29:01 reMarkable xochitl[210]: 13:29:01.479 rm.updates.betaprogram   Unable to get cloud state, network not available (getCloudState /home/runner/work/xochitl/xochitl/src/updates/src/betaprogram.cpp:104)
Nov 07 13:29:01 reMarkable xochitl[210]: 13:29:01.546 rm.user.authcli          User-authenticator configured with device-id 'RM110-153-12480', device-type 'remarkable-rm2', environment 'Environment::Prod', signing-mechanism 'secret' (configure /home/runner/work/xochitl/xochitl/src/xofm/modules/user/userauth/authcli.cpp:83)
Nov 07 13:29:01 reMarkable xochitl[210]: 13:29:01.546 rm.user.authcli          user-authenticator-cli whoami returned with error: Type::AlreadyRunning with message Executable user-authenticator-cli already running (operator()<tl::expected<std::__cxx11::basic_string<char>, processrunner::Error> > /home/runner/work/xochitl/xochitl/src/xofm/modules/user/userauth/authcli.cpp:320)
Nov 07 13:29:01 reMarkable xochitl[210]: 13:29:01.548 rm.network.usertoken     Scheduled token update at 2024-11-07 16:20:50.000000000, 10308451ms from now (scheduleUpdate /home/runner/work/xochitl/xochitl/src/xofm/libs/network/src/usertoken.cpp:133)
Nov 07 13:29:01 reMarkable xochitl[210]: 13:29:01.549 rm.network.usertoken     UserToken: setting a new userToken (odYPxsi87IcdygxtGuoY...) (setUserToken /home/runner/work/xochitl/xochitl/src/xofm/libs/network/src/usertoken.cpp:68)
Nov 07 13:29:01 reMarkable xochitl[210]: 13:29:01.994 default                  Lock in temp location
Nov 07 13:29:02 reMarkable xochitl[210]: 13:29:02.155 default                  HttpListener: Listening on port 80
Nov 07 13:29:02 reMarkable xochitl[210]: 13:29:02.170 rm.epaperkeyboardhandler No keymap set by QT settings or firmware, defaulting to US.
Nov 07 13:29:02 reMarkable xochitl[210]: 13:29:02.171 rm.epaperkeyboardhandler No keymap set by QT settings or firmware, defaulting to US.
Nov 07 13:29:03 reMarkable xochitl[210]: 13:29:03.859 xofm.modules.devicereporterDeviceReporter enabled (setup /home/runner/work/xochitl/xochitl/src/xofm/modules/devicereporter/devicereportermodule.cpp:53)
Nov 07 13:29:03 reMarkable xochitl[210]: 13:29:03.862 rm.batterymanager        Setting light sleep timer interval to 1200000ms (makeLightSleepTimer /home/runner/work/xochitl/xochitl/src/xofm/libs/batterymanager/src/batterymanager.cpp:666)
Nov 07 13:29:03 reMarkable xochitl[210]: 13:29:03.863 rm.batterymanager        Setting power off timer interval to 43200000ms (makePowerOffTimer /home/runner/work/xochitl/xochitl/src/xofm/libs/batterymanager/src/batterymanager.cpp:681)
Nov 07 13:29:03 reMarkable xochitl[210]: 13:29:03.864 rm.batterymanager        Setting light sleep timer interval to 1200000ms (makeLightSleepTimer /home/runner/work/xochitl/xochitl/src/xofm/libs/batterymanager/src/batterymanager.cpp:666)
Nov 07 13:29:08 reMarkable xochitl[210]: 13:29:08.483 rm.network.transaction   Attempting to execute transaction RequestId=13 with an active request. Skipped (execute /home/runner/work/xochitl/xochitl/src/xofm/libs/network/src/http-transaction.cpp:136)
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.635 rm.updates.betaprogram   Request finished. Was dispatched at: 2024-11-07T13:29:08.408 (networkRequestFinished /home/runner/work/xochitl/xochitl/src/updates/src/betaprogram.cpp:275)
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.652 rm.updates.betaprogram   Failed to remove project_key file: /home/root/.config/remarkable/memfault_project_key.conf (handleProjectKey /home/runner/work/xochitl/xochitl/src/updates/src/betaprogram.cpp:47)
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.664 default                  QSortFilterProxyModel: invalid inserted rows reported by source model
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.850 rm.network.usertoken     Scheduled token update at 2024-11-07 16:24:09.000000000, 10499149ms from now (scheduleUpdate /home/runner/work/xochitl/xochitl/src/xofm/libs/network/src/usertoken.cpp:133)
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.851 rm.network.usertoken     UserToken: setting a new userToken (eyJhbGciOiJIUzI1NiIs...) (setUserToken /home/runner/work/xochitl/xochitl/src/xofm/libs/network/src/usertoken.cpp:68)
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.852 rm.network.notifications Notifications socket is not OK: UnconnectedState (checkIfShouldConnect /home/runner/work/xochitl/xochitl/src/notifications/src/notifications.cpp:279)
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.865 rm.network.notifications Notifications socket is not OK: UnconnectedState (checkIfShouldConnect /home/runner/work/xochitl/xochitl/src/notifications/src/notifications.cpp:279)
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.866 rm.network.notifications Notifications socket is not OK: UnconnectedState (checkIfShouldConnect /home/runner/work/xochitl/xochitl/src/notifications/src/notifications.cpp:279)
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.867 rm.epaperkeyboardhandler No keymap set by QT settings or firmware, defaulting to US.
Nov 07 13:29:09 reMarkable xochitl[210]: 13:29:09.868 rm.epaperkeyboardhandler No keymap set by QT settings or firmware, defaulting to US.
Nov 07 13:29:10 reMarkable xochitl[210]: 13:29:10.864 rm.report.jsonsender     error posting to https://internal.cloud.remarkable.com/report/v1 - Received with http code: optional(404: Not found) (operator()<const network::Reply> /home/runner/work/xochitl/xochitl/src/report/src/jsonsender.cpp:49)
Nov 07 13:29:11 reMarkable xochitl[210]: 13:29:11.779 rm.network.transaction   Attempting to execute transaction RequestId=16 with an active request. Skipped (execute /home/runner/work/xochitl/xochitl/src/xofm/libs/network/src/http-transaction.cpp:136)

nginx.conf on the rmfakecloud-server:

	server {
		listen 0.0.0.0:80 ;
		listen [::0]:80 ;
		server_name my.domain ;
		location / {
			return 301 https://$host$request_uri;
		}
	}
	server {
		listen 0.0.0.0:443 ssl ;
		listen [::0]:443 ssl ;
		server_name my.domain ;
		http2 on;
		ssl_certificate /var/lib/acme/my.domain/fullchain.pem;
		ssl_certificate_key /var/lib/acme/my.domain/key.pem;
		ssl_trusted_certificate /var/lib/acme/my.domain/chain.pem;
		ssl_conf_command Options KTLS;
		location / {
			proxy_pass http://[::]:3069;
			proxy_http_version 1.1;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection $connection_upgrade;
			proxy_ssl_server_name on;
			proxy_read_timeout 1d;
			proxy_send_timeout 1d;
                        proxy_set_header        Host $host;
                        proxy_set_header        X-Real-IP $remote_addr;
                        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                        proxy_set_header        X-Forwarded-Proto $scheme;
                        proxy_set_header        X-Forwarded-Host $host;
                        proxy_set_header        X-Forwarded-Server $host;

		}
		client_max_body_size 200M;
	}
@2Belette
Copy link

2Belette commented Nov 7, 2024

Same issue here but on Paper pro. After updating from 3.14 to 3.15 I am unable to sync anymore.
Dav integration still work, but impossible to syn files with an unable to sync to the bar below

@davidpkj
Copy link
Contributor

davidpkj commented Nov 7, 2024

Same issue for me on RMPP after updating to 3.15.4.2. Even though I had already a long-standing sync account on my server, I got similar errors as martinetd I do not have the errors boogiewoogit has (at all). Applying #327 with and without SohnyBohny's addition did not fix the issue. Removing .tree also did not fix the issue.

@Eeems
Copy link
Contributor

Eeems commented Nov 7, 2024

error posting to https://internal.cloud.remarkable.com/report/v1 - Received with http code: optional(404: Not found) (operator()<const network::Reply> /home/runner/work/xochitl/xochitl/src/report/src/jsonsender.cpp:49)

The /report/v1 endpoint appears to be new.

@ddvk
Copy link
Owner

ddvk commented Nov 15, 2024

3.15.4.2 expects some checksums (crc32) in the response headers, which are currently missing in rmfakecloud

@ddvk
Copy link
Owner

ddvk commented Nov 17, 2024

should work in 0.0.20

@2Belette
Copy link

Thanks @ddvk ! I am on 0.0.21 and everything is working great in term of files synchronization.
I am unable to see the web UI and got 404 message ?

Btw, the documentation should maybe updated from "go version 1.16 at least" to "go version 1.23 at least"

@ddvk
Copy link
Owner

ddvk commented Nov 18, 2024

@2Belette what's your setup? reverse proxy, direct?

@2Belette
Copy link

yes reverse proxy, I haven't changed the configuration. I should better clarify in the first place, sorry, and I also tried to connect directly without the reverse proxy and same issue : 404 page not found.
My config are :

export STORAGE_URL=https://xxx
export PORT=80
export DATADIR=/usr/local/lib/rmfakecloud
export LOGLEVEL=debug
export RM_TRUST_PROXY=IPAddressofmyproxy

I haven't changed it either from 0.0.19

@ddvk
Copy link
Owner

ddvk commented Nov 18, 2024

and you're using the container, binary or build it yourself?

@2Belette
Copy link

I build it myself

@ddvk
Copy link
Owner

ddvk commented Nov 18, 2024

in that case something was not ok with the ui build i.e. not embedded correctly or something, do a:

make clean
rm -fr ui/node_modules
make
dist/rmfakecloud-x64

the ui should work on localhost:3000

@2Belette
Copy link

very cool ! after the clean, everything back on track :) and I also enjoy discovering the new stuff 👍 well done

@MrHappy
Copy link

MrHappy commented Nov 21, 2024

I'm on v0.0.21 and RM2.15.1.1189 and it connects, but does not sync.

journalctl -n 25 -u xochitl
Nov 21 12:26:31 reMarkable xochitl[6638]: 11:26:31.909 rm.network.notifications Notification error: QAbstractSocket::ConnectionRefusedError "Invalid statusline in response: </body></html>." 1000 ""

rmfakecloudctl status

Status: enabled (active)
Upstream server: https://<MYURL> (invalid)
Run `rmfakecloudctl disable` to disable rmfakecloud-proxy.
Run `rmfakecloudctl set-upstream https://<server>` to set the upstream server.

Tried the above, but nothing seems to fix it.
Also I cannot find other clues what might be wrong.

-- edit
changing STORAGE_URL from https://MYURL to https://local.appspot.com/ (in the docker-compose-file) fixed it for me.

      #- STORAGE_URL=https://<MYURL>
      - STORAGE_URL=https://local.appspot.com/

The url on my device I left unchanged.
Does not look like it should be/work this way.

@Eeems
Copy link
Contributor

Eeems commented Nov 21, 2024

For future reference you can read the output of rmfakecloudctl status to see how to change that value without having to modify the file.

@ddvk
Copy link
Owner

ddvk commented Nov 22, 2024

just removing STORAGE_URL should also work.
although on 2.15 this should have worked.

ddvk added a commit that referenced this issue Nov 22, 2024
@ddvk
Copy link
Owner

ddvk commented Nov 22, 2024

@MrHappy it was a regression (a change broke the old api)

martinetd added a commit to martinetd/nixpkgs that referenced this issue Nov 23, 2024
- fix regression in 0.0.21 for old remarkable tablet versions
(see ddvk/rmfakecloud#330 )
- fix build with new UI...
martinetd added a commit to martinetd/nixpkgs that referenced this issue Nov 23, 2024
- fix regression in 0.0.21 for old remarkable tablet versions
(see ddvk/rmfakecloud#330 )
- fix build with new UI...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants