Remote Virtual Studio USB Connection Problem

  • Issue category: ARDK Virtual Studio Tools
  • Device type & OS version:SE 2nd gen
  • Host machine & OS version: OSX 12.0.1
  • ARDK version:1.2.0
  • Unity version:2019.4.35f1

Hi, I’m trying to get virtual studio remote mode to work. I can successfully connect via internet, but I’m stuck on “Waiting for remote device to connect…” when I try USB mode. When I try to highlight my device in Unity’s Console window tab bar, I get this “Failed to connect to player” error.

Hi Noah,

The most common issue that I run into with the remote app is forgetting to check the “Development Build” and “Autoconnect Profiler” options in Build Settings before building the app. This might be what you’re encountering from what I can gather from your screenshot.

One thing that I did notice when trying to reproduce the issue earlier is that there were two different options for the iPhone device that I was trying to connect to in the Unity console. The one that worked for me consistently was “Unknown: iPhone (pid: … ) When choosing the other option (iPhonePlayer(iPhone … )) I was seeing the same behavior that you are reporting here.

Also, I didn’t see both device options right away in all cases, but they did both appear after I restarted the remote app and reconnected the device. And if you’re looking for an easy scene to test this with I’d recommend going with the PlaneAnchors scene from the ARDK example scenes.

Another consideration is that if you’re on an M1 Mac you may run into other issues with the remote app. We’re still working on bringing full M1 support to Lightship ARDK, and while most of the features already work, I did notice that the camera feed was not working properly on the M1 machine that I used for testing this - Instead of a camera feed I got only a green overlay in the Unity editor. We will investigate that issue and follow up on it.

In any case, please let us know if you’re still having this issue after checking the above. And if you haven’t already, you can check out our documentation page on remote. Thanks!

1 Like

Hi David, thanks for the detailed reply. Unfortunately I’m still stuck. I made sure that “Development Build” and “Autoconnect Profiler” are checked. I have an Intel processor, so that’s not the issue. My editor dropdown looks a little different than yours, and I can only get one option even with all the combinations of reconnecting and restarting the remote. That option gives me the “Failed to connect to player” error.


Here’s a potentially dumb but important question. We are supposed to use UnityRemote5 as our remote player?

One last clue I have is this error which appears after the fact.

Niantic.ARDK.VirtualStudio.AR._RemoteEditorARSession#: _RemoteEditorARSession should be destroyed by an explicit call to Dispose().
UnityEngine.Debug:LogError (object)
Niantic.ARDK.Utilities.Logging.UnityARLogHandler:Error (string) (at Assets/ARDK/Utilities/Logging/LogHandler/UnityARLogHandler.cs:41)
Niantic.ARDK.Utilities.Logging.ARLog:_Error (string) (at Assets/ARDK/Utilities/Logging/ARLog.cs:202)
Niantic.ARDK.VirtualStudio.AR._RemoteEditorARSession:Finalize () (at Assets/ARDK/VirtualStudio/AR/_RemoteEditorARSession.cs:89)

Hopefully you can make some sense of all this. Let me know if there’s any more information I can provide. Thank you. -Noah

That’s actually a pretty good question, and it may explain some of the issues that you are seeing. The Remote app that’s used for ARDK Lightship is not the same as the Unity Remote 5 app. It’s actually part of Lightship’s Virtual Studio tool kit that’s included in the ARDK example scene Unity package.

To use it, you will need to build the “ARDK Remote Feed App” scene, and then deploy it to a device that you’d like to use to test with. The “Installing the Remote Feed App” section of the documentation that I linked in my previous post will have more information on how to do that.

As far as the errors go, could you please let us know if you are still seeing those occur with the ARDK Remote Feed App as well, if you do end up going that route?

In any case, I hope that this helps.

Thanks!

2 Likes

Hi David. Wow I feel dumb. I can’t believe I didn’t realize it was a separate remote app that needs to be installed. That fixed the “Failed to connect to player” problem completely. I’ve successfully built and made the remote player work with the plane detection example.
Thanks for your help!

Another issue popped up when I tried to use it with a different project (I made sure the bundle identifiers match). I get this error when the frames start getting processed:

InvalidOperationException: The number of values to deserialize does not match the number of known fields for type Niantic.ARDK.AR.Camera._SerializableARCamera.
** Fields in the type: 10**
** Values to deserialize: 11.**
Niantic.ARDK.Utilities.BinarySerialization.ItemSerializers.SimpleSerializableSerializer.Deserialize (Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer deserializer) (at Assets/ARDK/Utilities/BinarySerialization/ItemSerializers/SimpleSerializableSerializer.cs:163)
Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer.Deserialize () (at Assets/ARDK/Utilities/BinarySerialization/BinaryDeserializer.cs:50)
Niantic.ARDK.Utilities.BinarySerialization.ItemSerializers.ArrayOfUnsealedSerializer1[T].DoDeserialize (Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer deserializer) (at Assets/ARDK/Utilities/BinarySerialization/ItemSerializers/ArrayOfUnsealedSerializer.cs:55)** **Niantic.ARDK.Utilities.BinarySerialization.ItemSerializers.BaseItemSerializer1[T].Deserialize (Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer deserializer) (at Assets/ARDK/Utilities/BinarySerialization/ItemSerializers/BaseItemSerializer.cs:41)
Niantic.ARDK.Utilities.BinarySerialization.ItemSerializers.SimpleSerializableSerializer.Deserialize (Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer deserializer) (at Assets/ARDK/Utilities/BinarySerialization/ItemSerializers/SimpleSerializableSerializer.cs:154)
Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer.Deserialize () (at Assets/ARDK/Utilities/BinarySerialization/BinaryDeserializer.cs:50)
Niantic.ARDK.Utilities.BinarySerialization.ItemSerializers.ArrayOfUnsealedSerializer1[T].DoDeserialize (Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer deserializer) (at Assets/ARDK/Utilities/BinarySerialization/ItemSerializers/ArrayOfUnsealedSerializer.cs:55)** **Niantic.ARDK.Utilities.BinarySerialization.ItemSerializers.BaseItemSerializer1[T].Deserialize (Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer deserializer) (at Assets/ARDK/Utilities/BinarySerialization/ItemSerializers/BaseItemSerializer.cs:41)
Niantic.ARDK.Utilities.BinarySerialization.ItemSerializers.SimpleSerializableSerializer.Deserialize (Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer deserializer) (at Assets/ARDK/Utilities/BinarySerialization/ItemSerializers/SimpleSerializableSerializer.cs:154)
Niantic.ARDK.Utilities.BinarySerialization.BinaryDeserializer.Deserialize () (at Assets/ARDK/Utilities/BinarySerialization/BinaryDeserializer.cs:50)
Niantic.ARDK.Utilities.BinarySerialization.GlobalSerializer.Deserialize (System.IO.Stream stream) (at Assets/ARDK/Utilities/BinarySerialization/GlobalSerializer.cs:412)
Niantic.ARDK.Utilities.Extensions._ObjectSerializationExtensions.DeserializeFromArray[T] (System.Byte[] byteArray) (at Assets/ARDK/Utilities/Extensions/_ObjectSerializationExtensions.cs:32)
Niantic.ARDK.VirtualStudio.Remote._EasyConnection._MessageReceived (UnityEngine.Networking.PlayerConnection.MessageEventArgs args) (at Assets/ARDK/VirtualStudio/Remote/_EasyConnection.cs:109)
Niantic.ARDK.VirtualStudio.Remote.RemoteMessageHandler.Callback (UnityEngine.Networking.PlayerConnection.MessageEventArgs e) (at Assets/ARDK/VirtualStudio/Remote/_UsbRemoteConnection.cs:184)
UnityEngine.Events.InvokableCall1[T1].Invoke (T1 args0) (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:207)** **UnityEngine.Events.UnityEvent1[T0].Invoke (T0 arg0) (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent/UnityEvent_1.cs:58)
UnityEngine.Networking.PlayerConnection.PlayerEditorConnectionEvents.InvokeMessageIdSubscribers (System.Guid messageId, System.Byte[] data, System.Int32 playerId) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Networking/PlayerConnection/PlayerEditorConnectionEvents.cs:66)
UnityEditor.Networking.PlayerConnection.EditorConnection.MessageCallbackInternal (System.IntPtr data, System.UInt64 size, System.UInt64 guid, System.String messageId) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Networking/PlayerConnection/EditorConnection.cs:190)

Any ideas?

Hi Noah,

Glad to hear that it’s working now. And to be fair, the names are quite similar so it’s understandable that there would be some confusion there. In regard to your follow up question, would you perhaps be able to start a new thread related to the error that you’re encountering? Some information that would be helpful to include would be:

  • The projects/scenes that you are having trouble with
  • Your specific use case (i.e. what you’re trying to accomplish)
  • Whether or not your project contains custom code, or is part of the ARDK example scenes

Thank you!

2 Likes

This topic was automatically closed 2 hours after the last reply. New replies are no longer allowed.