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

In Chucker, when I go to any response and in search box I type: {" then it crashes and also the app crashes. #1341

Open
dokaniaayush opened this issue Feb 5, 2025 · 0 comments

Comments

@dokaniaayush
Copy link

In Chucker, I can see a list of requests made. When I open a request and navigate to the response page, if I type {" in the search box, Chucker crashes, and the app crashes as well.

I am using the latest version of Chucker (4.1.0).

This issue occurred when I copied a JSON response, converted it to a string, and pasted it into Chucker’s search box to search within the response. Both Chucker and the app crashed. From this, I found that searching for {" causes the crash.

Crash Log:

java.util.regex.PatternSyntaxException: Syntax error in regexp pattern near index 1
{"id":....}
 ^
at com.android.icu.util.regex.PatternNative.compileImpl(Native Method)
at com.android.icu.util.regex.PatternNative.<init>(PatternNative.java:39)
at com.android.icu.util.regex.PatternNative.create(PatternNative.java:35)
at java.util.regex.Pattern.compile(Pattern.java:1426)
at java.util.regex.Pattern.<init>(Pattern.java:1401)
at java.util.regex.Pattern.compile(Pattern.java:985)
at com.chuckerteam.chucker.internal.support.SearchHighlightUtilKt.indicesOf(SearchHighlightUtil.kt:25)
at com.chuckerteam.chucker.internal.ui.transaction.TransactionBodyAdapter.highlightQueryWithColors$com_github_ChuckerTeam_Chucker_library(TransactionPayloadAdapter.kt:96)
at com.chuckerteam.chucker.internal.ui.transaction.TransactionPayloadFragment.onQueryTextChange(TransactionPayloadFragment.kt:318)
at androidx.appcompat.widget.SearchView.onTextChanged(SearchView.java:1198)
at androidx.appcompat.widget.SearchView$10.onTextChanged(SearchView.java:1736)
at android.widget.TextView.sendOnTextChanged(TextView.java:11037)
at android.widget.TextView.handleTextChanged(TextView.java:11144)
at android.widget.TextView$ChangeWatcher.onTextChanged(TextView.java:14032)
at android.text.SpannableStringBuilder.sendTextChanged(SpannableStringBuilder.java:1267)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:576)
at androidx.emoji2.text.SpannableBuilder.replace(SpannableBuilder.java:315)

Thanks in Advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant