Clancey / vscode-comet

Other
31 stars 11 forks source link

Error "Cannot read property 'map' of undefined" appears after clicking on "Select a device" with Android target #16

Closed JaneySprings closed 2 years ago

JaneySprings commented 2 years ago

OS: MacOS 12.1 VSCode: 1.64.2 Plugin: Comet for .NET Mobile v0.3.15 Android Studio: Bumblebee 2021.1.1 Patch 1 Dotnet SDK: 6.0.200

iOS works perfectly!

hez2010 commented 2 years ago

It has been fixed in the main branch by https://github.com/Clancey/vscode-comet/pull/15. But the version containing the fix hasn't been released yet.

@Clancey Can you publish a new release on the vscode extension marketplace? Otherwise users cannot use comet on vscode for Android at all when they're building and debugging apps against API level 31+.

Clancey commented 2 years ago

Just told CI to push a new version

JaneySprings commented 2 years ago

@hez2010 It looks like nothing has changed, but thanks for the answer!

image
hez2010 commented 2 years ago

Can you try calling mobile-debug manually and see the inner exception?

hez2010 commented 2 years ago
cd ~/.vscode/extensions/clancey.comet-debug-0.3.16/src/mobile-debug/bin/Debug/net6.0
dotnet ./mobile-debug.dll util -c=devices
JaneySprings commented 2 years ago

Output: {"id":"25b133b5-720e-4087-a988-b434f9b4071d","command":"devices","error":"The given key 'tag.display' was not present in the dictionary."}

hez2010 commented 2 years ago

It turns out to be no tag.diaply in your avd config.ini. I've sent a PR #18 to fix this. To workaround this issue, you may add some dummy config lines in your avd config.ini:

tag.display=Default
tag.id=default
JaneySprings commented 2 years ago

Thank you so much, it works!

image