question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

valid MAC coiuld not be determined

See original GitHub issue

I got my google play music auth code but then tuijam fails with this error:

Traceback (most recent call last):
  File "/home/mark/.local/bin/tuijam", line 11, in <module>
    load_entry_point('tuijam==0.7.1', 'console_scripts', 'tuijam')()
  File "/home/mark/.local/lib/python3.7/site-packages/tuijam/app.py", line 630, in main
    app.login()
  File "/home/mark/.local/lib/python3.7/site-packages/tuijam/app.py", line 121, in login
    locale=locale.getdefaultlocale()[0])
  File "/home/mark/.local/lib/python3.7/site-packages/gmusicapi/clients/mobileclient.py", line 184, in oauth_login
    return self._login(session_login, device_id, locale)
  File "/home/mark/.local/lib/python3.7/site-packages/gmusicapi/clients/mobileclient.py", line 125, in _login
    raise OSError("a valid MAC could not be determined."
OSError: a valid MAC could not be determined. Provide an android_id (and be sure to provide the same one on future runs).

I’m running python 3.7.5

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
silentjaycommented, May 20, 2020

If anyone wants a hacky way to get tuijam running around this issue: change line 123 in /home/YOUR_USER/.local/lib/python3.8/site-packages/gmusicapi/clients/mobileclient.py
mac_int = getmac() to mac_int = <YOUR_MAC_AS_INTEGER>

yeah nasty, but I wasn’t prepared to let a google play music browser tab to continue to steal 500mb of ram anymore.

0reactions
cfangmeiercommented, May 6, 2020

It should be pretty straight forward to support an optional MAC from the config file. In earlier versions, tuijam would query gmusicapi for an android id and use that, but it was simpler to just use the MAC address under the assumption that it would always work. Obviously, this is not the case. A more robust solution may look like:

  1. If supplied, try to login using a MAC specified in the config file.
  2. If 1 fails, try to determine and use the MAC as is done currently.
  3. If 2 fails, query the api for android ids. Iterate through them until finding one that works. (Optionally - store the working id in the config file)
  4. If 3 fails, give up!
Read more comments on GitHub >

github_iconTop Results From Across the Web

OSError("a valid MAC could not be determined.") #408 - GitHub
I started getting this error on every login attempt on a Windows 10 machine. Until a couple of days before it didn't complain...
Read more >
Open a Mac app from an unidentified developer - Apple Support
However, the app has not been reviewed, and macOS can't check whether the app has been modified or broken since it was released....
Read more >
How do I fix the invalid certificate error on Mac? - MacPaw
Within a few minutes, the issue should disappear. Click on the Apple menu and choose System Settings.
Read more >
Fixing Mac OS X Install Errors “can't be verified ... - OSXDaily
It may have been corrupted or tampered with during downloading” message, or a more vague “An error occurred while preparing the installation.
Read more >
How to validate MAC address using Regular Expression
The given string contains 'H', the valid hexadecimal digits should be followed by letter from a-f, A-F, and 0-9. Therefore, it is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found