Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriptions: Fix Nil assertion failed #3793

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SamantazFox
Copy link
Member

@SamantazFox SamantazFox commented May 7, 2023

Due to recent changes to libxml2 (between 2.9.14 and 2.10.4, See https://gitlab.gnome.org/GNOME/libxml2/-/issues/508), the HTML parser doesn't take into account the namespaces (xmlns).

Because HTML shouldn't contain namespaces anyway, there is no reason for use to keep using it. But switching to the XML parser means that we have to pass the namespaces to every single 'xpath_node(s)' method for it to be able to properly navigate the XML structure.

Closes #3743

Related: crystal-lang/crystal#13444
Thanks to @GaetanLepage and @Blacksmoke16 for their help investigating this!

Due to recent changes to libxml2 (between 2.9.14 and 2.10.4,
See https://gitlab.gnome.org/GNOME/libxml2/-/issues/508), the
HTML parser doesn't take into account the namespaces (xmlns).

Because HTML shouldn't contain namespaces anyway, there is no
reason for use to keep using it. But switching to the XML
parser means that we have to pass the namespaces to every
single 'xpath_node(s)' method for it to be able to properly
navigate the XML structure.
@SamantazFox SamantazFox requested a review from a team as a code owner May 7, 2023 23:07
@SamantazFox SamantazFox requested review from unixfox and removed request for a team May 7, 2023 23:07
@SamantazFox SamantazFox added need-code-review A crystal developper need to check if the code is correct. need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something labels May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-code-review A crystal developper need to check if the code is correct. need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Unable to add new subscriptions/import, Exception: Nil assertion failed (NilAssertionError)
1 participant