Skip to content

Conversation

@soimkim
Copy link
Contributor

@soimkim soimkim commented Feb 11, 2025

Description

Update message format when module-info.json cannot be read.

  • AS-IS :

     read_module_info_from_build_output_file()
    File "/home/worker/scanner/venv312/lib/python3.12/site-packages/fosslight_android/android_binary_analysis.py", line 187, in read_module_info_from_build_output_file
    module_info_json_obj = json.loads(f.read())
                           ^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
    json.decoder.JSONDecodeError: Unterminated string starting at: line 2708299 column 7 (char 65011702)
    
  • TO-BE:

    [FOSSLIGHT_ANDROID] READ module-info.json :out/target/product/generic/module-info.json
    [FOSSLIGHT_ANDROID] [ERROR] Failed to read:Unterminated string starting at: line 2708299 column 7 (char 65011702)
    

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Refactoring, Maintenance
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@soimkim soimkim self-assigned this Feb 11, 2025
@soimkim soimkim requested a review from ethanleelge February 11, 2025 06:08
@soimkim soimkim added the chore [PR/Issue] Refactoring, maintenance the code label Feb 11, 2025
@soimkim soimkim changed the title Update message when module-info.json cannot be read Update message format when module-info.json cannot be read Feb 11, 2025
@ethanleelge ethanleelge merged commit 47b1a0b into main Feb 11, 2025
4 checks passed
@soimkim soimkim deleted the msg branch February 11, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore [PR/Issue] Refactoring, maintenance the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants