Announcing: Mælstrøm, a Magic Wormhole client

There is no problem if you only need/want a cli version. I would like a qml wrapper.

The easiest would be using QProcess, but I guess you could also simply import the original croc project and do some CGO exports and call the functions directly.

Yeah, I looked at that route. It’s ugly. I mean, cgo does the best it can, but it’s ugly. At the moment I’m thinking of building a library from croc with python bindings so that it could be swapped in situ into Mælstrøm but I’m about out of time :slight_smile:

I’m totally in favor of making Maelstrom capable of steering several backends! Let me know what you need from my side.
Please keep in mind though that I would like this to be harbour-compatible.

First though, I must get the basic functionality right and get it published.

4 Likes

I have some tips thanks to @Rikudou_Sennin but I’m not sure when i can get to it … things just got busy :slight_smile:

this could be cool !!!
i have seen some time ago app for android, where sender generated qr code, receiver just scan the code and file is on the way…
just dreaming now how this could be fine for sharing between SFOS, iOS and Droid users

1 Like

Wormhole supports exactly this, and it is on the TODO list (tracked in #15).

Unfortunately, this feature has a python dependency which needs python 3.11. So we have to wait for Sailfish OS 5.1 which will have this python update.

[EDIT: Fixed in master (0.2.1) - but now we depend on pillow…

4 Likes

i always depend on pillow and it’s allowed!

Status update: First beta version which can send only has been submitted to Harbour. Lets see how that goes.

6 Likes

tested harbour-maelstrom-0.2.9-1.1.aarch64.rpm

from phone to linux cli:
first file transfer was fine, any other attempt to pulldown->Start Transfer goes to this page:


instead of this:

Back/Cancel show this:

app must be killed to send another file.

[W] unknown:465 - file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:465:13: QML State: Binding loop detected for property "when"
[W] unknown:490 - file:///usr/lib64/qt5/qml/Sailfish/Silica/private/PulleyMenuBase.qml:490: TypeError: Cannot call method 'earlyClick' of null
[W] unknown:221 - file:///usr/share/harbour-maelstrom/qml/pages/Send.qml:221: ReferenceError: reset is not defined
2 Likes

Thanks very much for testing and the feedback!

Up until today I was fighting with file receiving which was a bitch to get working.
It does now, rudimentarily, since an hour or so.

I have to work on all the “states” the app and the wormhole can be in - missing handling of changes in the state lead to the things you describe.

It will get better, I promise! :slight_smile:

Tracked in #20.

3 Likes

“Initial and relatively small messages are sent via the “Mailbox” server. This lets the two peers contact a well-known resource,…”

Does this mean that if you do not have an (external) internet connection, it doesn’t work?

With the default setup, probably not.

However, there is this Milestone - if it is reached you can run and use your own rendezvous server.
Maybe even start one on-demand on the phone?

Anyway, if you are in the same LAN without Internet connection, you’ll probably be more happy using KDE Connect.

1 Like

no worries, we are all happy for what you do for SFOS :slight_smile:
btw unable to send file to app on iOS or Android

I don’t have an iOS device that I can install apps on - which app is that, and is there source code or a feature list available?

1 Like

Wormhole app JSON failure tracked as #21

2 Likes

it is exciting, so testing now 0.3 from your git
it looks like there is general problem with rust client on the other side (ios and android are build on rust too

Mælstrøm → wormhole-william (v0.18) does not work in 0.3 it was working in 0.29 - now stuck on Exchanging keys
wormhole-william → Mælstrøm WORKS :check_mark:

Mælstrøm → wormhole-rs ( wormhole-rs 0.7.6)

Error: 
   0: Could not get an offer
   1: Corrupt JSON message received
   2: invalid type: floating point `39679.0`, expected u16 at line 1 column 179

wormohole-rs → Mælstrøm

Error: 
   0: Send process failed
   1: Corrupt JSON message received
   2: invalid type: sequence, expected unit at line 1 column 17

Mælstrøm → Warp (linux gtk app)
sending failed
TransferError: ProtocolJson(Error("invalid type: floating point 38909.0, expected u16", line: 1, column: 179))

ERROR magic_wormhole::core > Received invalid data from peer: '{"transit": {"abilities-v1": [{"type": "direct-tcp-v1"}, {"type": "relay-v1"}], "hints-v1": [{"hostname": "127.0.0.1", "port": 38909.0, "priority": 0.0, "type": "direct-tcp-v1"}, {"hints": [{"hostname": "transit.magic-wormhole.io", "port": 4001.0, "priority": 0.0, "type": "direct-tcp-v1"}], "type": "relay-v1"}]}}'

Warp → Mælstrøm
TransferError: ProtocolJson(Error("invalid type: sequence, expected unit", line: 1, column: 17))

ERROR magic_wormhole::core > Received invalid data from peer: '{"abilities-v1": [{"type": "direct-tcp-v1"}, {"type": "relay-v1"}], "hints-v1": [{"hostname": "127.0.0.1", "port": 45579.0, "priority": 0.0, "type": "direct-tcp-v1"}, {"hints": [{"hostname": "transit.magic-wormhole.io", "port": 4001.0, "priority": 0.0, "type": "direct-tcp-v1"}], "type": "relay-v1"}]}'

Mælstrøm scan QR but says it is not meant for receiving:

trying to run directly from Sailfish IDE but

:-1: error: The remote executable must be set in order to run a custom remote run configuration.

tried sailfish-qml harbour-maelstrom, or /usr/bin/sailfish-qml harbour-maelstrom but it will combine with install folder like: /opt/sdk/harbour-maelstrom/usr/bin/sailfish-qml harbour-maelstrom so i can only build rpm and then run it manually

can you please point me what to set to be able to run it directly from IDE?

Sorry, I never use the SDK :wink:

For testing I just run directly on the device from the code repo: qmlscene qml/harbour-maelstrom.qml.

I discovered something like that as well - Problem seems to be the copying around Python objects, and PyOtherSide objects and QML objects.
At some point int values get converted to floats, and that is then regarded as invalid JSON by some parsers.

This is a problem especially with TCP ports, but the problem is a general one.