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

ICloud indexer error #59

Open
fsgeek opened this issue Aug 10, 2024 · 3 comments
Open

ICloud indexer error #59

fsgeek opened this issue Aug 10, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@fsgeek
Copy link
Contributor

fsgeek commented Aug 10, 2024

After merging the iCloud indexer script I tried running it and received the following error:

(wam) PS C:\Users\TonyMason\source\repos\indaleko-test> py .\IndalekoICloudIndexer.py --help
ic| log_file_name: 'indaleko-plt=iCloud-svc=indexer-ts=2024_08_10T19#56#22.661652+00#00.log'
Enter your iCloud username (or press Enter to select from the list above): *****@gmail.com
Enter your iCloud password:
Traceback (most recent call last):
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 312, in <module>
    main()
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 274, in main
    indexer = IndalekoICloudIndexer(timestamp=timestamp)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 52, in __init__
    self.query_user_for_credentials()
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 116, in query_user_for_credentials
    self._store_credentials(user_id, password)
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 126, in _store_credentials
    self.auth_logger.debug(f"Stored credentials for {username}")
    ^^^^^^^^^^^^^^^^
AttributeError: 'IndalekoICloudIndexer' object has no attribute 'auth_logger'

This script is new, so I don't think this is a merge-related issue.

@fsgeek fsgeek added the bug Something isn't working label Aug 10, 2024
@fsgeek fsgeek self-assigned this Aug 10, 2024
@fsgeek
Copy link
Contributor Author

fsgeek commented Aug 10, 2024

I commented out the four calls to auth_logger and made some progress, but I ended up with a zero length data file. Maybe that's because there isn't anything, but the script doesn't provide me with any output.

@fsgeek
Copy link
Contributor Author

fsgeek commented Aug 10, 2024

Good grief this is some strange behavior:

(wam) PS C:\Users\TonyMason\source\repos\indaleko-test> py .\IndalekoICloudIndexer.py
ic| log_file_name: 'indaleko-plt=iCloud-svc=indexer-ts=2024_08_10T20#11#57.728810+00#00.log'
Enter your iCloud username (or press Enter to select from the list above): [email protected]
Enter your iCloud password:
Traceback (most recent call last):
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 312, in <module>
    main()
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 274, in main
    indexer = IndalekoICloudIndexer(timestamp=timestamp)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 52, in __init__
    self.query_user_for_credentials()
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 116, in query_user_for_credentials
    self._store_credentials(user_id, password)
  File "C:\Users\TonyMason\source\repos\indaleko-test\IndalekoICloudIndexer.py", line 126, in _store_credentials
    self.auth_logger.debug(f"Stored credentials for {username}")
    ^^^^^^^^^^^^^^^^
AttributeError: 'IndalekoICloudIndexer' object has no attribute 'auth_logger'
(wam) PS C:\Users\TonyMason\source\repos\indaleko-test> py .\IndalekoICloudIndexer.py
ic| log_file_name: 'indaleko-plt=iCloud-svc=indexer-ts=2024_08_10T20#13#22.953611+00#00.log'
Enter your iCloud username (or press Enter to select from the list above): *****@********.com
ic| self.record: {'Attributes': {},
                  'Data': 'xAJ7fQ==',
                  'SourceIdentifier': {'Identifier': 'c3e03488-660c-42f5-8277-1c8073fb2144',
                                       'Version': '1.1'},
                  'Timestamp': '2024-08-10T20:09:07.110763+00:00'}
Enter your iCloud username (or press Enter to select from the list above): *****@********.com
Enter your iCloud username (or press Enter to select from the list above): *****@********.com
Enter the code you received on one of your approved devices: 913489
(wam) PS C:\Users\TonyMason\source\repos\indaleko-test> ls data\*cloud*


    Directory: C:\Users\TonyMason\source\repos\indaleko-test\data


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         8/10/2024   1:14 PM           2192 indaleko-plt=iCloud-svc=indexer-user_id=*****@********.com-ts=2024_08_10T20#13#22.952606+00#00.jsonl
-a----         8/10/2024   1:10 PM              0 indaleko-plt=iCloud-svc=indexer-user_id=*******@gmail.com-ts=2024_08_10T20#09#31.957305+00#00.jsonl

I'm not sure why it failed on first invocation (that line was, literally, commented out). But the script asked me for my identity info multiple times before I was able to go through the authentication flow.

This time I did get some data output, so that's good.

@fsgeek
Copy link
Contributor Author

fsgeek commented Aug 10, 2024

@ZeeOneOtter - you may have some insight here.

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

No branches or pull requests

1 participant