This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
repush.sh script stuck for ever #34
Comments
Hi,
Many thanks, downloading your new script solved the problem when the tablet is connected to the laptop and when copying with the following command :
repush.sh file.pdf
But the command is still stuck after entering password when tablet is connected and using :
repush.sh -r xxx.xxx.x.xx file.pdf
… De: "Raphaël Rigo" ***@***.***>
À: "reHackable/scripts" ***@***.***>
Cc: "Gilles Quéméner" ***@***.***>, "Author"
***@***.***>
Envoyé: Vendredi 12 Février 2021 00:02:24
Objet: Re: [reHackable/scripts] repush.sh script stuck for ever (#34)
This is probably issue [ #31 | #31 ]
, you can try the fix in the PR: [
#35 | #35 ]
—
You are receiving this because you authored the thread.
Reply to this email directly, [
#34 (comment) | view
it on GitHub ] , or [
https://github.com/notifications/unsubscribe-auth/AAQU2CZEM7VVKKS7BLQYOUTS6ROYBANCNFSM4XPBCBKQ
| unsubscribe ] .
|
It's probably because the Web UI is disabled when the rM is disconnected. |
Here are the outputs that you want :
1) First test: tablet is connected to laptop and USB interface is OFF
~$ bash -x reMarkable/scripts/host/repush.sh -r xxx.xxx.x.xx wcs.pdf
+ VERSION=4.1
+ SSH_ADDRESS=10.11.99.1
+ WEBUI_ADDRESS=10.11.99.1:80
+ PORT=9000
+ shopt -s nullglob
+ getopts :vhdr:p⭕ opt
+ case "$opt" in
+ SSH_ADDRESS=xxx.xxx.x.xx
+ REMOTE=1
+ getopts :vhdr:p⭕ opt
+ shift 2
+ '[' -z wcs.pdf ']'
+ for f in "$@"
+ check_file wcs.pdf
++ file -F '|' wcs.pdf
+ file_cmd_output='wcs.pdf| PDF document, version 1.1'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| directory'
+ '[' '!' -e wcs.pdf ']'
+ '[' -z ']'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| PDF'
+ '[' -z ']'
+ echo wcs.pdf
+ grep -qi '\.pdf$'
+ echo wcs.pdf
+ grep -q '"'
+ return 1
+ '[' 1 -eq 0 ']'
+ '[' 1 ']'
+ nc -z localhost 9000
+ echo 'repush: Port 9000 is already used by a different process!'
repush: Port 9000 is already used by a different process!
+ exit -1
2) Second test: tablet is connected to laptop and USB interface is ON
~$ bash -x reMarkable/scripts/host/repush.sh -r xxx.xxx.x.xx wcs.pdf
+ VERSION=4.1
+ SSH_ADDRESS=10.11.99.1
+ WEBUI_ADDRESS=10.11.99.1:80
+ PORT=9000
+ shopt -s nullglob
+ getopts :vhdr:p⭕ opt
+ case "$opt" in
+ SSH_ADDRESS=xxx.xxx.x.xx
+ REMOTE=1
+ getopts :vhdr:p⭕ opt
+ shift 2
+ '[' -z wcs.pdf ']'
+ for f in "$@"
+ check_file wcs.pdf
++ file -F '|' wcs.pdf
+ file_cmd_output='wcs.pdf| PDF document, version 1.1'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| directory'
+ '[' '!' -e wcs.pdf ']'
+ '[' -z ']'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| PDF'
+ '[' -z ']'
+ echo wcs.pdf
+ grep -qi '\.pdf$'
+ echo wcs.pdf
+ grep -q '"'
+ return 1
+ '[' 1 -eq 0 ']'
+ '[' 1 ']'
+ nc -z localhost 9000
+ echo 'repush: Port 9000 is already used by a different process!'
repush: Port 9000 is already used by a different process!
+ exit -1
3) Third test: tablet is not connected to laptop and therefore USB interface is OFF by default
~$ bash -x reMarkable/scripts/host/repush.sh -r xxx.xxx.x.xx wcs.pdf
+ VERSION=4.1
+ SSH_ADDRESS=10.11.99.1
+ WEBUI_ADDRESS=10.11.99.1:80
+ PORT=9000
+ shopt -s nullglob
+ getopts :vhdr:p⭕ opt
+ case "$opt" in
+ SSH_ADDRESS=xxx.xxx.x.xx
+ REMOTE=1
+ getopts :vhdr:p⭕ opt
+ shift 2
+ '[' -z wcs.pdf ']'
+ for f in "$@"
+ check_file wcs.pdf
++ file -F '|' wcs.pdf
+ file_cmd_output='wcs.pdf| PDF document, version 1.1'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| directory'
+ '[' '!' -e wcs.pdf ']'
+ '[' -z ']'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| PDF'
+ '[' -z ']'
+ echo wcs.pdf
+ grep -qi '\.pdf$'
+ echo wcs.pdf
+ grep -q '"'
+ return 1
+ '[' 1 -eq 0 ']'
+ '[' 1 ']'
+ nc -z localhost 9000
+ echo 'repush: Port 9000 is already used by a different process!'
repush: Port 9000 is already used by a different process!
+ exit -1
Gilles
… De: "Raphaël Rigo" ***@***.***>
À: "reHackable/scripts" ***@***.***>
Cc: "Gilles Quéméner" ***@***.***>, "Author"
***@***.***>
Envoyé: Vendredi 12 Février 2021 09:33:49
Objet: Re: [reHackable/scripts] repush.sh script stuck for ever (#34)
It's probably because the Web UI is disabled when the rM is disconnected.
Can you post the output of bash -x repush.sh -r x.x.x.x file.pdf ?
—
You are receiving this because you authored the thread.
Reply to this email directly, [
#34 (comment) | view
it on GitHub ] , or [
https://github.com/notifications/unsubscribe-auth/AAQU2CYWZXA4W7CA7ACO373S6TRW3ANCNFSM4XPBCBKQ
| unsubscribe ] .
|
As the script outputs: |
So, I have killed the ssh (not the ssh-agent from the list of ps -u command) and reran your command.
I was asked a first time for the password, but connection was refused, then I have entered it a second time and it worked (note however that it was correctly typed the first time).
~$ bash -x reMarkable/scripts/host/repush.sh -r xxx.xxx.x.xx wcs.pdf
+ VERSION=4.1
+ SSH_ADDRESS=10.11.99.1
+ WEBUI_ADDRESS=10.11.99.1:80
+ PORT=9000
+ shopt -s nullglob
+ getopts :vhdr:p⭕ opt
+ case "$opt" in
+ SSH_ADDRESS=xxx.xxx.x.xx
+ REMOTE=1
+ getopts :vhdr:p⭕ opt
+ shift 2
+ '[' -z wcs.pdf ']'
+ for f in "$@"
+ check_file wcs.pdf
++ file -F '|' wcs.pdf
+ file_cmd_output='wcs.pdf| PDF document, version 1.1'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| directory'
+ '[' '!' -e wcs.pdf ']'
+ '[' -z ']'
+ grep -q '| PDF'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ '[' -z ']'
+ grep -qi '\.pdf$'
+ echo wcs.pdf
+ echo wcs.pdf
+ grep -q '"'
+ return 1
+ '[' 1 -eq 0 ']'
+ '[' 1 ']'
+ nc -z localhost 9000
+ ssh -o ConnectTimeout=5 -M -S remarkable-ssh -q -f -L 9000:10.11.99.1:80 [email protected] -N
[email protected]'s password:
+ SSH_RET=0
+ WEBUI_ADDRESS=localhost:9000
+ '[' 0 -ne 0 ']'
+ for f in "$@"
++ basename wcs.pdf pdf
+ uuid_of_root_file wcs.
+ RET_UUID=
+ rmtgrep lF '"visibleName": "wcs."' '~/.local/share/remarkable/xochitl/*.metadata'
+ escaped_regex='\"visibleName\": \"wcs.\"'
++ ssh -S remarkable-ssh [email protected] 'grep -lF "\"visibleName\": \"wcs.\"" ~/.local/share/remarkable/xochitl/*.metadata'
Control socket connect(remarkable-ssh): Connection refused
[email protected]'s password:
+ RET_MATCH=
+ matches_by_name=
+ '[' -z '' ']'
+ return
+ '[' '!' -z ']'
+ rm -rf /tmp/repush
+ mkdir -p /tmp/repush
+ OUTPUT_UUID=
+ '[' '' ']'
+ TOTAL=0
+ SUCCESS=0
+ for f in "$@"
+ ROOT_UUID=
+ push wcs.pdf
+ (( TOTAL++ ))
++ file -F '|' wcs.pdf
+ file_cmd_output='wcs.pdf| PDF document, version 1.1'
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| \(PDF\|directory\)'
+ extension=pdf
+ echo 'wcs.pdf| PDF document, version 1.1'
+ grep -q '| directory'
+ directory=
++ basename wcs.pdf .pdf
+ placeholder_basename=wcs
+ '[' ']'
+ placeholder=/tmp/repush/wcs
+ [[ pdf == \p\d\f ]]
+ create_placeholder_pdf /tmp/repush/wcs
+ echo %PDF-1.
+ echo '1 0 obj<</Pages 2 0 R>>endobj'
+ echo '2 0 obj<</Kids[3 0 R]/Count 1>>endobj'
+ echo '3 0 obj<</Parent 2 0 R>>endobj'
+ echo -n 'trailer <</Root 1 0 R>>'
+ true
+ curl --connect-timeout 2 --silent --output /dev/null --form 'file=@"/tmp/repush/wcs"' http://localhost:9000/upload
Gilles
… De: "Raphaël Rigo" ***@***.***>
À: "reHackable/scripts" ***@***.***>
Cc: "Gilles Quéméner" ***@***.***>, "Author"
***@***.***>
Envoyé: Vendredi 12 Février 2021 09:52:21
Objet: Re: [reHackable/scripts] repush.sh script stuck for ever (#34)
As the script outputs: repush: Port 9000 is already used by a different process!
, you have a leftover SSH session, kill it.
—
You are receiving this because you authored the thread.
Reply to this email directly, [
#34 (comment) | view
it on GitHub ] , or [
https://github.com/notifications/unsubscribe-auth/AAQU2C37TRHLTTPPPODJ4ITS6TT4LANCNFSM4XPBCBKQ
| unsubscribe ] .
|
the script does not work without the cable |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I have installed your scripts on my laptop running under Linux Ubuntu 20.04.
I enabled the USB Web UI on the remarkable 2 tablet.
Typing the following command:
reMarkable/scripts/host/repush.sh -r xxx.xxx.x.xx wcs.pdf
[email protected]'s password:
with good IP address and password, nothing happens, no error message and no file copied on the tablet. It stays there forever.
After killing the command with CTRL c, I get an error message if I try to rerun the command w/o restarting the reMarkable 2 tablet:
repush: Port 9000 is already used by a different process!
Any hints on how to solve this problem is very welcome.
Thanks,
Gilles
The text was updated successfully, but these errors were encountered: