Website versions?v=0

So, below throws an error, detailed in last two lines, from having successfully actioned the first line, which has ?v=1 at the end, from me guessing how to update a webpage version.

First line below perhaps should not action ???

$ safe nrs add testab2 --link safe://hnyynywegffy5qets53js1edh7j6r8xuajy4qphqg8zeotwt8k974ymwpebnc?v=1
NRS Map updated (version 3): "safe://hnyydywbu3oiyepfmtoriorng3gxrmezctb3iwoybhahcaencpbkdu8mdhbqh"
+  testab2  safe://hnyynywegffy5qets53js1edh7j6r8xuajy4qphqg8zeotwt8k974ymwpebnc?v=1 
$ safe dog safe://testab2
[2020-04-04T12:57:27Z ERROR safe] safe-cli error: [Error] VersionNotFound - Version '1' is invalid for FilesContainer found at "safe://hnyynywegffy5qets53js1edh7j6r8xuajy4qphqg8zeotwt8k974ymwpebnc?v=1"
$ safe files ls safe://testab2
[2020-04-04T12:58:04Z ERROR safe] safe-cli error: Make sure the URL targets a FilesContainer.
[Error] VersionNotFound - Version '1' is invalid for FilesContainer found at "safe://testab2"

Pasted below then the abc below that I was walking through, duplicating and wondering what versioning is.

How is version of a webpage intended to be created?

I’ve seen one of the sites already have a simple toggle in the browser for the version of the webpage. However for safe://testab2 that toggle doesn’t seem to appear. Still guesswork finds safe://testab2/?v=4 is there and safe://testab2/?v=0 is the original.

Full walkthrough that I was doing if of interest.

$ safe files put ./test/ --recursive
FilesContainer created at: "safe://hnyynyi3qiqdeu5sjpz64jcw18ohxkqy9nh58m13degm4rg7c3x1pwqqtnbnc"
+  ./test/index.html  safe://hbhybydqmxohppr7bxuokinh9xyz3gd9jh1yr1s5anmrh4m8wuaoayrfn1 
$ safe files put ./test/ --recursive
FilesContainer created at: "safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc"
+  ./test/index.html  safe://hbhybydqmxohppr7bxuokinh9xyz3gd9jh1yr1s5anmrh4m8wuaoayrfn1 
$ safe files put ./test/ --recursive
FilesContainer created at: "safe://hnyynywegffy5qets53js1edh7j6r8xuajy4qphqg8zeotwt8k974ymwpebnc"
+  ./test/index.html  safe://hbhybydqmxohppr7bxuokinh9xyz3gd9jh1yr1s5anmrh4m8wuaoayrfn1 
$ safe nrs create testab2 --link safe://hnyynyi3qiqdeu5sjpz64jcw18ohxkqy9nh58m13degm4rg7c3x1pwqqtnbnc?v=0
New NRS Map for "safe://testab2" created at: "safe://hnyydywbu3oiyepfmtoriorng3gxrmezctb3iwoybhahcaencpbkdu8mdhbqh"
+  testab2  safe://hnyynyi3qiqdeu5sjpz64jcw18ohxkqy9nh58m13degm4rg7c3x1pwqqtnbnc?v=0 
$ safe dog safe://testab2
Native data type: PublishedSeqAppendOnlyData
Version: 0
Type tag: 1100
XOR name: 0x72eab8689eec96dfda4b2923c38f5381f173675cb234197a21baccbe4da39d11
XOR-URL: safe://hnyynyi3qiqdeu5sjpz64jcw18ohxkqy9nh58m13degm4rg7c3x1pwqqtnbnc?v=0

Resolved using NRS Map:
PublicName: "testab2"
Container XOR-URL: safe://hnyydywbu3oiyepfmtoriorng3gxrmezctb3iwoybhahcaencpbkdu8mdhbqh
Native data type: PublishedSeqAppendOnlyData
Type tag: 1500
XOR name: 0x033cc2a0434ab8c09581046c99e45a2ec88735a4001e638cc204c6854399d63e
Version: 0
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| NRS name/subname | Created              | Modified             | Link                                                                     |
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| testab2          | 2020-04-04T12:54:59Z | 2020-04-04T12:54:59Z | safe://hnyynyi3qiqdeu5sjpz64jcw18ohxkqy9nh58m13degm4rg7c3x1pwqqtnbnc?v=0 |
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
$ safe nrs add testab2 --link safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc?v=0
NRS Map updated (version 1): "safe://hnyydywbu3oiyepfmtoriorng3gxrmezctb3iwoybhahcaencpbkdu8mdhbqh"
+  testab2  safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc?v=0 
$ safe dog safe://testab2
Native data type: PublishedSeqAppendOnlyData
Version: 0
Type tag: 1100
XOR name: 0xbc5b07401a80625bf80528381ae54c1f2194f94067be23dbb49530f6b288a3e5
XOR-URL: safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc?v=0

Resolved using NRS Map:
PublicName: "testab2"
Container XOR-URL: safe://hnyydywbu3oiyepfmtoriorng3gxrmezctb3iwoybhahcaencpbkdu8mdhbqh
Native data type: PublishedSeqAppendOnlyData
Type tag: 1500
XOR name: 0x033cc2a0434ab8c09581046c99e45a2ec88735a4001e638cc204c6854399d63e
Version: 1
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| NRS name/subname | Created              | Modified             | Link                                                                     |
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| testab2          | 2020-04-04T12:55:56Z | 2020-04-04T12:55:56Z | safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc?v=0 |
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
$ safe files ls safe://testab2
Files of FilesContainer (version 0) at "safe://testab2":
Files: 1   Size: 126   Total Files: 1   Total Size: 126
SIZE  CREATED               MODIFIED              NAME 
126   2020-04-04T12:53:09Z  2020-04-04T12:53:09Z  index.html 
$ safe nrs add testab2 --link safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc?v=0
NRS Map updated (version 2): "safe://hnyydywbu3oiyepfmtoriorng3gxrmezctb3iwoybhahcaencpbkdu8mdhbqh"
+  testab2  safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc?v=0 
$ safe dog safe://testab2
Native data type: PublishedSeqAppendOnlyData
Version: 0
Type tag: 1100
XOR name: 0xbc5b07401a80625bf80528381ae54c1f2194f94067be23dbb49530f6b288a3e5
XOR-URL: safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc?v=0

Resolved using NRS Map:
PublicName: "testab2"
Container XOR-URL: safe://hnyydywbu3oiyepfmtoriorng3gxrmezctb3iwoybhahcaencpbkdu8mdhbqh
Native data type: PublishedSeqAppendOnlyData
Type tag: 1500
XOR name: 0x033cc2a0434ab8c09581046c99e45a2ec88735a4001e638cc204c6854399d63e
Version: 2
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| NRS name/subname | Created              | Modified             | Link                                                                     |
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| testab2          | 2020-04-04T12:56:52Z | 2020-04-04T12:56:52Z | safe://hnyynys6fsb4ydkygrs9aywwdogzfjox1df83ebu5he65s1kub7i1tnt6kbnc?v=0 |
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
$ safe nrs add testab2 --link safe://hnyynywegffy5qets53js1edh7j6r8xuajy4qphqg8zeotwt8k974ymwpebnc?v=1
NRS Map updated (version 3): "safe://hnyydywbu3oiyepfmtoriorng3gxrmezctb3iwoybhahcaencpbkdu8mdhbqh"
+  testab2  safe://hnyynywegffy5qets53js1edh7j6r8xuajy4qphqg8zeotwt8k974ymwpebnc?v=1 
$ safe dog safe://testab2
[2020-04-04T12:57:27Z ERROR safe] safe-cli error: [Error] VersionNotFound - Version '1' is invalid for FilesContainer found at "safe://hnyynywegffy5qets53js1edh7j6r8xuajy4qphqg8zeotwt8k974ymwpebnc?v=1"
$ safe files ls safe://testab2
[2020-04-04T12:58:04Z ERROR safe] safe-cli error: Make sure the URL targets a FilesContainer.
[Error] VersionNotFound - Version '1' is invalid for FilesContainer found at "safe://testab2"
3 Likes

Another query is :

why do these exist

safe files tree safe://hello?v=2
safe files tree safe://hello?v=3

but these error?

safe files tree safe://hello?v=0
safe files tree safe://hello?v=1

with

ERROR safe] safe-cli error: Make sure the URL targets a FilesContainer.
[Error] NetDataError - Failed to get current version: [Error] NetDataError - Failed to get Sequenced Append Only Data: NetDataError("Failed to get Sequenced Append Only Data indices: CoreError(Data error -> Requested data not found - CoreError::DataError -> NoSuchData)")

trivially 4 doesn’t exist atm; so gives rightly

$ safe files tree safe://hello?v=4
[2020-04-04T15:16:35Z ERROR safe] safe-cli error: Make sure the URL targets a FilesContainer.
[Error] InvalidInput - The location couldn't be resolved from the NRS URL provided
1 Like

The first command create a NRS map that points to a version of file container that doesn’t exist yet. The initial version of a file container created with safe files put is 0 and you ended the link with ?=1 which means second version.

You need to modify some files in the source directory and issue a safe files sync on this file container to create the second version.Then you will see that your safe dog and safe ls commands will work.

4 Likes

This topic was automatically closed after 60 days. New replies are no longer allowed.