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

Error in running extraction from module SMS: expected string or bytes-like object, got 'NoneType' #526

Open
stereotypy opened this issue Sep 2, 2024 · 2 comments
Assignees
Labels
android bug Something isn't working

Comments

@stereotypy
Copy link

stereotypy commented Sep 2, 2024

When running MVT on android I'm getting this crash on SMS

                  Traceback (most recent call last):                                                                                                        
                    File "/home/x/.local/share/pipx/venvs/mvt/lib/python3.12/site-packages/mvt/common/module.py", line 167, in run_module              
                      exec_or_profile("module.run()", globals(), locals())                                                                                  
                    File "/home/x/.local/share/pipx/venvs/mvt/lib/python3.12/site-packages/mvt/common/utils.py", line 262, in exec_or_profile          
                      exec(module, globals, locals)                                                                                                         
                    File "<string>", line 1, in <module>                                                                                                    
                    File "/home/x/.local/share/pipx/venvs/mvt/lib/python3.12/site-packages/mvt/android/modules/adb/sms.py", line 156, in run           
                      self._adb_process_file(                                                                                                               
                    File "/home/x/.local/share/pipx/venvs/mvt/lib/python3.12/site-packages/mvt/android/modules/adb/base.py", line 301, in              
                  _adb_process_file                                                                                                                         
                      process_routine(local_path)                                                                                                           
                    File "/home/x/.local/share/pipx/venvs/mvt/lib/python3.12/site-packages/mvt/android/modules/adb/sms.py", line 116, in _parse_db     
                      links = check_for_links(message["body"])                                                                                              
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                              
                    File "/home/x/.local/share/pipx/venvs/mvt/lib/python3.12/site-packages/mvt/common/utils.py", line 151, in check_for_links          
                      return re.findall(r"(?P<url>https?://[^\s]+)", text, re.IGNORECASE)                                                                   
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                   
                    File "/usr/lib/python3.12/re/__init__.py", line 217, in findall                                                                         
                      return _compile(pattern, flags).findall(string)                                                                                       
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                       
                  TypeError: expected string or bytes-like object, got 'NoneType'  
@Te-k
Copy link
Contributor

Te-k commented Sep 10, 2024

It sounds like you have an empty body in your SMS database, first time I see that but we should fix that. I'll try to do it later this week

@Te-k Te-k added bug Something isn't working android labels Sep 10, 2024
@Te-k Te-k self-assigned this Sep 10, 2024
Te-k added a commit that referenced this issue Sep 10, 2024
DonnchaC added a commit that referenced this issue Oct 16, 2024
Co-authored-by: Donncha Ó Cearbhaill <[email protected]>
@Te-k
Copy link
Contributor

Te-k commented Oct 28, 2024

Hi, this fix is merged, could you try now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants