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.

Function getting crashed while initiating pair request.

See original GitHub issue

Describe the bug

When I try to scan with command atvremote scan. It is working properly and showing the multiple devices. But when I am trying to pair with my device, or any other device, it is getting crashed.

Screenshot from 2021-10-06 11-25-37

Error log

[root:/home/amoghsaxena/Desktop/tmp]# atvremote --id DC:56:E7:59:79:46 --protocol mrp pair

Traceback (most recent call last):
  File "/home/amoghsaxena/Desktop/tmp/.direnv/python-3.9.5/lib/python3.9/site-packages/pyatv/scripts/atvremote.py", line 716, in _run_application
    return await cli_handler(loop)
  File "/home/amoghsaxena/Desktop/tmp/.direnv/python-3.9.5/lib/python3.9/site-packages/pyatv/scripts/atvremote.py", line 504, in cli_handler
    return await _exec_command(glob_cmds, args.command[0], print_result=False)
  File "/home/amoghsaxena/Desktop/tmp/.direnv/python-3.9.5/lib/python3.9/site-packages/pyatv/scripts/atvremote.py", line 682, in _exec_command
    value = await tmp(*args)
  File "/home/amoghsaxena/Desktop/tmp/.direnv/python-3.9.5/lib/python3.9/site-packages/pyatv/scripts/atvremote.py", line 175, in pair
    pairing = await pair(conf, self.args.protocol, self.loop, **options)
  File "/home/amoghsaxena/Desktop/tmp/.direnv/python-3.9.5/lib/python3.9/site-packages/pyatv/__init__.py", line 114, in pair
    raise exceptions.NoServiceError(f"no service available for {protocol}")
pyatv.exceptions.NoServiceError: no service available for Protocol.MRP

>>> An error occurred, full stack trace above

Screenshot from 2021-10-05 15-06-15

How to reproduce the bug?

pip3 install pyatv
atvremote scan
atvremote --id <ID> --protocol mrp pair

What is expected behavior?

atvremote --id 00:11:22:33:44:54 --protocol mrp pair
Enter PIN on screen: 1234
Pairing seems to have succeeded, yey!
You may now use these credentials: 1650c36b816812561ee1a2ce55441c4d59aeee8287d3d0b90ad41e221c2ccc9b:eb6d47687f82327501d26e77bc3ee8b752034ad397c80cba37d91132717a1721:61383462633431372d383336362d346464632d386533622d333964356265303932663132:39376263616162332d356330652d343136362d623634302d326438656135616161636237

Operating System

Lunix

Python

3.9

pyatv

0.9.2

Device

Apple TV 4

Additional context

Please Help.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
postlundcommented, Oct 6, 2021

tvOS 15 will work as long as you include AirPlay credentials. MRP is tunneled over AirPlay in tvOS 15.

1reaction
postlundcommented, Oct 6, 2021

As I said, it is expected for MRP and tvOS 15 so just ignore that. Does pairing airplay work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server crashes when it receives a request while it is already ...
With the try/catch block, any requests sent while one was still processing are just ignored and the error message is display on the...
Read more >
"NO_CRASH_STACK + 0" Crash (only on testflight)
When I built an app for Testflight with Xcode 13.1 (App Store version), it crashes on launch when installed from TestFlight, as everyone ......
Read more >
Crashes | Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal.
Read more >
[nodemon] app crashed - waiting for file changes before ...
I am using express and mqtt, when I type some variable that wasn't declared I get that error. [nodemon] app crashed - waiting...
Read more >
When Even Crashing Doesn't Work | Random ASCII
Notice that the function that crashed is not even listed! This makes routine bug investigation an expert-level problem. Sometimes the crash call ......
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