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

Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $ #3405

Closed
nirav-tukadiya opened this issue May 3, 2024 · 5 comments

Comments

@nirav-tukadiya
Copy link

Integration

sentry-android

Build System

Gradle

AGP Version

8.2.2

Proguard

Enabled

Version

7.3.0

Steps to Reproduce

run assembleRelease

Expected Result

It should fetch the sentry SDK version and continue building the project

Actual Result

Error:
Could not resolve io.sentry:sentry-android-navigation:7.3.0.
> Could not parse module metadata **/io/sentry/sentry-android-navigation/7.3.0/sentry-android-navigation-7.3.0.module
> Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $

@markushi
Copy link
Member

markushi commented May 6, 2024

@nirav-tukadiya this looks odd! Could you try a fresh build, ensuring no packages/caches are corrupt?

Something like this should be able to achieve this:

./gradlew --refresh-dependencies --no-daemon --no-build-cache --rerun-tasks assembleRelease

@nirav-tukadiya
Copy link
Author

@markushi Fresh run with below command works. What do you think could have corrupted the cache?

FYI, This was only happening for 7.3.0 and we have migrated to 7.4.0 but would like to understand in detail so that we could fix the root cause and migrating latest version may not be feasible all the time and also, caching tasks is important is we build 4 different flavors and would like to save time on build.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 6, 2024
@romtsn
Copy link
Member

romtsn commented May 6, 2024

the root cause is that we don't publish the .module files yet, (see issue), and in your case gradle (or some plugin) did not check for its presence and tried to parse a non-existent file, hence it failed. Not sure what exactly caused them to think there's a module metadata file when it's not present, but yeah we should fix it.

@nirav-tukadiya
Copy link
Author

thanks for clarification. @romtsn

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 6, 2024
@markushi
Copy link
Member

markushi commented May 8, 2024

Closing this in favor of #2233

@markushi markushi closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in Mobile & Cross Platform SDK May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Archived in project
Development

No branches or pull requests

4 participants