App development experiences

A topic about the practicalities of development from the developer perspective, and difficulties that Autonomi might not be aware of from their own testing.

I’m developing a demo app which acts as both publisher (CLI) and viewer (GUI) using Tauri to target Desktop (Windows, Mac an Linux) and Mobile (Android).

For the most part testing using a local testnet has been a breeze although now and again something goes wrong and it can be hard to know what to do to fix it. I usually sort that out, which has been vital because testing the app using the testnets has never worked well enough for me to continue development.

This post is to highlight both those issues. This morning I can’t get my testnet to function (after weeks of no problems) and so I am trying the PunchBowl testnet. As usual it isn’t reliable enough, currently it is uploading multiple files (which is an improvement) but is failing to store a Register. Creation appears to work but then I get an error. Here’s an extract from my app CLI console:

Creating versions register, please wait...
VersionsRegister::sync() - this can take a while...
Successfully made payment of 0.000000011 for a Register (At a cost per record of NanoTokens(11).)
Successfully stored wallet with cached payment proofs, and new balance 0.999999393.
Failed to create website versions register online. Network Error Record not stored by nodes, it could be invalid, else you should retry: NetworkAddress::RecordKey(abe0ee - 773b325b7463ff6d733b76c329523cf11ef1d67844d4f3ca3a3b99ab8902af10).

Caused by:
    Record not stored by nodes, it could be invalid, else you should retry: NetworkAddress::RecordKey(abe0ee - 773b325b7463ff6d733b76c329523cf11ef1d67844d4f3ca3a3b99ab8902af10)

Location:
    src/awe_website_versions.rs:367:25
Network Error Record not stored by nodes, it could be invalid, else you should retry: NetworkAddress::RecordKey(abe0ee - 773b325b7463ff6d733b76c329523cf11ef1d67844d4f3ca3a3b99ab8902af10).
   Uploading: v2-autonomi-demo
   ERROR: failed to read register address from: 
   Website not published, exiting.

This has been working fine for weeks using local tesnets (including yesterday) so I’m confident it isn’t the app, although it is possible. Perhaps I’m not using the correct version of all safe_network crates I’m using? I’ll take a look at that next. EDIT: my local testnet problem was a node-manager issue, fix was ‘pkill safenode’ although more dramatic fixed were suggested here: Node Manager UX and Issues - #546 by happybeing - Safe-Node - Autonomi Forum (Safe)

EDIT: running the commands again succeeded for uploading of several websites so I guess the Register may have landed in a bad spot or some other error triggered the apparent failure to find it after creation.

Knowing which versions of the safe_network crates to use is another potential issue for app developers, so it would be helpful to have documentation on how to ensure this. For now I’ve written a script that creates the entries for my Cargo toml based on the safe_network/Cargo.lock in ‘stable’ (with or without a path setting for local debugging of sn code when needed.

For the most part development has been working well though, and is a lot of fun and I thoroughly recommend Tauri (now trying v2 beta).