Failed to decode XOR-URL: UnkownBase

So, my first time trying deliberately to create a version 1 with nrs add ?v=1 led to an odd confusion about what was occurring.

It looked successful as NRS Map updated (version 1):

Having safe://hello33 working I was expecting safe://hello33?v=0 should still be available but instead in the mobile browser, it gives
For safe://hello33?v=0 it gives “Error Page not found No such public name exists”.


Oddly irritating, because it doesn’t help be sure what is occurring, I note safe://hello33?v=0 becomes safe://hello33/?v=0
which seems an odd addition of the forward slash given the way nrs talks of ?v= without that.
Would prefer the translation is not adding that / as surely url protocol is that ? is a delimiter and the petty correcting of users input seems unneeded.

The key part below being that where NRS safe://hello33 did exist, then in the mobile browser at least it appears to not be there, throwing this error on CLI:

$ safe dog safe://hello33
[2020-04-17T15:25:56Z ERROR safe] safe-cli error: [Error] InvalidXorUrl - Failed to decode XOR-URL: UnkownBase

What is that error suggesting?

At the least, I was expecting that safe://hello33?v=0 should still be available but instead in the mobile browser, it gives
For safe://hello33?v=0 it gives “Error Page not found No such public name exists”.
For safe://hello33?v=1 it gives “Error Page not found No such data exists”.

As if it’s trying to read [hello33?v=0] as PublicName…

In the desktop browser, it’s different, with safe://hello33?v=0 displaying the html only without the css… which surely is wrong but is something at odds with the mobile browser giving an error. For safe://hello33?v=1 desktop browser displays nothing - no error. Would have expected both browsers to display the html+css as was and in full.

Created with this and the difference between uploads is just me tweaking css file and html to see it better flex for the mobile.

$ safe files put ./www/ --recursive
FilesContainer created at: "safe://hnyynysuen9knds8dg9y6x1bbi167pfb3uso34i9zud1uofbbwgm6ifaaobnc"
+  ./www/favicon.ico  safe://hbwybyddc49peadeqqbpfn75wmitabsoiwsdw7j9spcytb4k5crin6refu 
+  ./www/index.html   safe://hbhybyns97ejsb46bryguc345hokaugu9apnfzscakm4keh9kn6zuneby3 
+  ./www/style.css    safe://hbhyyynybsdixcxo5btiycsjwih673p4w388wez5d6z7pd34snyd85xp5g 
$ safe nrs create hello33 --link safe://hnyynysuen9knds8dg9y6x1bbi167pfb3uso34i9zud1uofbbwgm6ifaaobnc?v=0
New NRS Map for "safe://hello33" created at: "safe://hnyydyz3j63uspszz1ie8u5f88yur6d4a1c6h9uytyrqa1obiuankcoekkbqh"
+  hello33  safe://hnyynysuen9knds8dg9y6x1bbi167pfb3uso34i9zud1uofbbwgm6ifaaobnc?v=0 
$ safe files put ./www/ --recursive
FilesContainer created at: "safe://hnyynyz5fs48mafjsdzg8a4rckkw9xtwhaoi9cwjh7ptf8wto1nor67aiebnc"
+  ./www/favicon.ico  safe://hbwybyddc49peadeqqbpfn75wmitabsoiwsdw7j9spcytb4k5crin6refu 
+  ./www/index.html   safe://hbhybydxegp49arz45zrd1re4qjqxmjmj86oorb1bn57p5sutmn4phpp8d 
+  ./www/style.css    safe://hbhyyynzzm6611pzseexy1utif1hwrgo8yddwehzgxna3bjim8eke4jckr 
$ safe nrs create hello33 --link safe://safe://hnyynyz5fs48mafjsdzg8a4rckkw9xtwhaoi9cwjh7ptf8wto1nor67aiebnc?v=1
[2020-04-17T15:24:12Z ERROR safe] safe-cli error: [Error] ContentError - NRS name already exists. Please use 'nrs add' command to add sub names to it
$ safe nrs add hello33 --link safe://safe://hnyynyz5fs48mafjsdzg8a4rckkw9xtwhaoi9cwjh7ptf8wto1nor67aiebnc?v=1
NRS Map updated (version 1): "safe://hnyydyz3j63uspszz1ie8u5f88yur6d4a1c6h9uytyrqa1obiuankcoekkbqh"
+  hello33  safe://safe://hnyynyz5fs48mafjsdzg8a4rckkw9xtwhaoi9cwjh7ptf8wto1nor67aiebnc?v=1 
$ safe dog safe://hello33
[2020-04-17T15:25:56Z ERROR safe] safe-cli error: [Error] InvalidXorUrl - Failed to decode XOR-URL: UnkownBase
$ safe dog safe://hello33?v=0
Native data type: PublishedSeqAppendOnlyData
Version: 0
Type tag: 1100
XOR name: 0xa6817d421d8e337c1e7c821acbdd694399da19d57f798e5381421a197ea97188
XOR-URL: safe://hnyynysuen9knds8dg9y6x1bbi167pfb3uso34i9zud1uofbbwgm6ifaaobnc?v=0

Resolved using NRS Map:
PublicName: "hello33"
Container XOR-URL: safe://hnyydyz3j63uspszz1ie8u5f88yur6d4a1c6h9uytyrqa1obiuankcoekkbqh?v=0
Native data type: PublishedSeqAppendOnlyData
Type tag: 1500
XOR name: 0xf29f66766daf7955079eca738264f0f58933dcfcc11011d8940359e04a6410a5
Version: 0
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| NRS name/subname | Created              | Modified             | Link                                                                     |
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
| hello33          | 2020-04-17T15:07:34Z | 2020-04-17T15:07:34Z | safe://hnyynysuen9knds8dg9y6x1bbi167pfb3uso34i9zud1uofbbwgm6ifaaobnc?v=0 |
+------------------+----------------------+----------------------+--------------------------------------------------------------------------+
$ safe dog safe://hello33?v=1
[2020-04-17T15:26:31Z ERROR safe] safe-cli error: [Error] InvalidXorUrl - Failed to decode XOR-URL: UnkownBase
$ 
4 Likes

Just to note that this error UnknownBase seems unrelated to NRS?v=1

Doing similar upload just now I’m getting

Failed to decode XOR-URL: UnkownBase

from

$ safe files put ./www/ --recursive
FilesContainer created at: "safe://hnyynys7jbdi8nx3o9c5x7uhp8bzf5kfbi6czwo89hutiaxqjyegi6o1aebnc"
+  ./www/favicon.ico  safe://hbwybyddc49peadeqqbpfn75wmitabsoiwsdw7j9spcytb4k5crin6refu 
+  ./www/index.html   safe://hbhybydxegp49arz45zrd1re4qjqxmjmj86oorb1bn57p5sutmn4phpp8d 
+  ./www/style.css    safe://hbhyyyd93d4zbwcuzede6ceux44jexfjcn4w6pz658s7rkposd6yu6ocjj 
$ safe nrs create hello44b --link safe://safe://hnyynys7jbdi8nx3o9c5x7uhp8bzf5kfbi6czwo89hutiaxqjyegi6o1aebnc?v=0
New NRS Map for "safe://hello44b" created at: "safe://hnyydys1esnnbtpctug1gmqz4r9cipfsn7yq9ctni9y998ybkapapxbi1ybqh"
+  hello44b  safe://safe://hnyynys7jbdi8nx3o9c5x7uhp8bzf5kfbi6czwo89hutiaxqjyegi6o1aebnc?v=0 
$ safe dog safe://hello44b
[2020-04-17T16:08:52Z ERROR safe] safe-cli error: [Error] InvalidXorUrl - Failed to decode XOR-URL: UnkownBase

safe nrs create hello44b --link safe://safe://hnyynys7...
It seems to be that you provided an invalid link with safe://safe://, and there seems to be a bug in the validator of the link url when the nrs is being created, we may need to enhance the error to show the url we couldn’t resolve when trying to fetch the content

5 Likes

Note also needs a catch for where no protocol has been suggested.

So, this looks like it worked

$ safe nrs create dataprivacy --link hnyynysi3na6cnaqesi35psmoag4s7hzckzet5w1u1dubajosispudich6bnc?v=0
New NRS Map for "safe://dataprivacy" created at: "safe://hnyydyzezpkgw8p1wej813nz5i893xj4drhx35zegakka6hsi9hf65t47abqh"
+  dataprivacy  hnyynysi3na6cnaqesi35psmoag4s7hzckzet5w1u1dubajosispudich6bnc?v=0 

but then gets error

$ safe dog safe://dataprivacy
[2020-04-18T09:10:58Z ERROR safe] safe-cli error: [Error] InvalidXorUrl - Problem parsing the safe:// URL "hnyynysi3na6cnaqesi35psmoag4s7hzckzet5w1u1dubajosispudich6bnc?v=0": relative URL without a base
2 Likes