amfora icon indicating copy to clipboard operation
amfora copied to clipboard

For some reason if you go through any of the two links of this site amfora hangs

Open lucasew opened this issue 3 years ago • 1 comments

I am developing a Gemini browser for native degoogled Android that I pretend to release at the end of the semester

During that development I stumbled with a bug: when I touch any of the two links on this site [1] agena raises an error but for some reason, amfora is also affected by the same bug.

Edit 1: Using amfora from nixpkgs

Amfora v1.9.2
Commit: unknown
Built by: unknown

Edit 2:

  • amfora gemini://g.mikf.pl/gemlog/2022-02-06-doings.gmi
  • press 1 or 2 to go to link 1 or 2
  • both links will make amfora hang and it's only possible to close it by killing the process or closing the terminal

On Agena it raises an IllegalArgumentException in that case so if that happens I use a regex to filter out unexpected symbols and try again parsing the URL.

[1] gemini://g.mikf.pl/gemlog/2022-02-06-doings.gmi

lucasew avatar May 05 '22 20:05 lucasew

I am not experiencing any hanging or freezing up. The links on that page are broken, because the person is putting a NO-BREAK SPACE (U+00A0) instead of a regular SPACE (U+0020). The Gemini specification states that link lines are defined as:

=>[<whitespace>]<URL>[<whitespace><USER-FRIENDLY LINK NAME>]

Where:

<whitespace> is any non-zero number of consecutive spaces or tabs

Is NO-BREAK SPACE included in that? Maybe, although I would guess that solderpunk would say no because it makes Gemini client implementations more complex. I suspect he only intended the regular space when writing "spaces". In any case, forming links this way is unexpected and will break a lot of clients. Authors should not do it.


Can you provide more information on what exactly is causing Amfora to freeze up? How are you "touch"ing the links? And what is the output of amfora -v?

Thank you, and good luck with your browser!

makew0rld avatar May 05 '22 21:05 makew0rld

(sorry for an erroneous comment, already deleted it.)

Anyway, hello.

I am now wondering if i should correct the nbsp to a space considering it's a bug example now and i would break reproducibility 😆

It appeared there because i went for a flow involving many various text/document editors on various devices and esoteric operating systems and one must have done that

mkf avatar Oct 30 '22 08:10 mkf

Tbh I think that spacing issue is a nice way to make the spec more complete. What if Gemini gets more adoption and people start defacing sites to add these spaces just to crash the clients.

AGENA already deals with it and doesn't crash. The problem IMO is to fail silently.

lucasew avatar Oct 30 '22 12:10 lucasew

The problem IMO is to fail silently.

@lucasew to be clear, this is what I observe on my end. I haven't been able to reproduce any crashing, at least not with the latest commit. As of right now, I consider this a non-issue.

I am now wondering if i should correct the nbsp to a space considering it's a bug example now and i would break reproducibility :laughing:

@mkf don't worry about fixing it, go right ahead :smile:. If you have the time you could add another page to your site with the broken links and put that URL here, as a test case.

makew0rld avatar Oct 30 '22 16:10 makew0rld

Closing because this issue was never reproduced with the latest code.

makew0rld avatar Oct 15 '23 18:10 makew0rld