-
-
Notifications
You must be signed in to change notification settings - Fork 341
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
Crash in org.snakeyaml.engine.v2.api.LoadSettingsBuilder #3889
Comments
The problem seems to be the use of named capturing groups in the regex: https://stackoverflow.com/questions/54861220/regex-pattern-error-on-api-21android-5-and-below I created an issue in snakeyaml: https://bitbucket.org/asomov/snakeyaml-engine/issues/34/patternsyntaxexception-due-to-named |
Since this is caused by a dependency of a dependency, I expect this to take quite a while to fix - if the maintainer of snakeyaml actually recognizes it as an issue, that is. As it is, StreetComplete is currently not working correctly for Android 5. Can you think of a workaround to not depend on snakeyaml? Maybe some older version of snakeyaml does not have this issue but still works fine with kaml and the older version of the dependency could be forced in our gradle? (I didn't find where actually the source code of snakeyaml is kept) |
I was also confused by that, but the source code is in a different Bitbucket repository: https://bitbucket.org/snakeyaml/snakeyaml-engine/src/master/
This is the commit that introduced this particular regexp: The latest kaml release that depends on that old version is v0.18.1 – we had to change a lot of stuff if we stuck to that version (if it would be possible at all), as we now use features last introduced in v0.42.0.
I don't know if or how that would be possible in Gradle. But it seems it would not work anyway, since snakeyaml-engine v2.3 had a breaking API change that was accounted for in kaml v0.31.0. So considering all of this, I only see three options:
|
The mantainer invited (us) to do a PR. Do you have time to do that? Otherwise I'd try because this is a kind of issue that we should try to fix before v42 moves out of beta. |
I don't have too much time right now, so please give it a go if you can :) |
I did the changes and posted a PR. The original issue seems to have vanished, https://bitbucket.org/asomov/snakeyaml-engine/issues is not accessible anymore and the PR vanished as well without me getting any notification about it. But looking at https://bitbucket.org/snakeyaml/snakeyaml-engine/commits/ it looks my PR was accepted. BitBucket has a weird UX. I guess the maintainer removed the duplicate issue tracker behind the first link because here is another: https://bitbucket.org/snakeyaml/snakeyaml-engine/issues?status=new&status=open |
Anyway, this is now blocked by waiting for a new release of snakeyaml. Comparing the releases on maven https://mvnrepository.com/artifact/org.snakeyaml/snakeyaml-engine with the recent commit history https://bitbucket.org/snakeyaml/snakeyaml-engine/commits/ looks like snakeyaml-engine is a project with an extremely slow release cycle. So I don't expect a new version soon. |
The PR can be found here: |
Confirmed by the library maintainer in https://bitbucket.org/snakeyaml/snakeyaml-engine/issues/34/support-https-githubcom-yaml-yaml-runtimes: "incorrectly resolved by PR which referenced issue 34 in an old repo"
Something that might work instead:
The commits since the last release look like they should be backwards-compatible, so kaml (expecting an older version) should probably continue to work fine. Only commit |
I was searching for that kind of option. I wasn't even able to create a jar with the checked out snakeyaml-engine repository (don't know how, I am only semi proficient with gradle, not maven). Maybe jitpack on the other hand can do that? I also posted on their communication channel, who knows, maybe they are about to release a new version anyway or have a separate maven repository for the SNAPSHOT version: https://groups.google.com/g/snakeyaml-core/c/BbMICOmishM |
There is a reproducible crash for org.snakeyaml.engine.v2.api.LoadSettingsBuilder (dependency of kaml).
The crash reports I got so far were both from Android 5.1 devies and both (so far) from people who installed the app from F-Droid.
cc @FloEdelmann
The text was updated successfully, but these errors were encountered: