google-ar / three.ar.js

A helper three.js library for building AR web experiences that run in WebARonARKit and WebARonARCore
https://developers.google.com/ar/develop/web/getting-started
Apache License 2.0
2.91k stars 365 forks source link

Testing Workflow #108

Closed decoye closed 6 years ago

decoye commented 6 years ago

Hey Guys,

i've decided to put some time into learning three.ar. Ive setup a bunch of the examples and changed its behaviours, now some questions and problems arise.

First of all id like to know what your testing environment looks like. I#ve setup a nodejs server so i can check the apps i create from my phone in a wifi environment running from my computer, but i have a hardtime getting information about things that dont workout.

Am i just too earlie and i should wait until webar has become more noob friendly, or do i just miss some of the magic?

best.

jsantell commented 6 years ago

If you're using WebARonARCore, you can use chrome://inspect if connected over USB (more info) -- and if you don't need devtools, and your phone and computer are on the same network, you should be able to access your computer's server by going to http://{COMPUTER_LOCAL_IP}:{HOST} unless you have ports locked down

decoye commented 6 years ago

The tip with the usb and chrome inspect is amasing!

my phone and computer are indeed on the same network, but im serving the files from my computer to my phone, and therefore i cant see the console on my phone so i cant really debug what the issue is.

I dont really understand your note about accessing the server ip from my phone to get debug data.

I will now try it with the USB Connection and hopefully will succeed. Thanks for your help!

jsantell commented 6 years ago

The wireless solution of going to your host computer's local network IP doesn't give you debugging/devtools, but nice to not be tethered to move around doing AR stuff -- the USB will give you the devtools access though

decoye commented 6 years ago

again thank you for pointing me to the usb solution. its amazing.

but the wireless solution i still dont get what it will do for me.

im sure im not seeing something important here, but i really dont understand. i request my page from the host. e.g. 192.168.1.1:3000/index.html.

how can i wirelessly be debugging things from here on?

jsantell commented 6 years ago

You cannot wirelessly debug/use devtools, only for accessing the page, sorry if I was unclear

decoye commented 6 years ago

i figured that, thanks for still caring tho.

vincentfretin commented 6 years ago

Hi, maybe I misunderstood your conversation, but you can have devtools on your host for debugging the page on your phone with Wi-Fi (without the usb cable). First connect it with usb to your host and then:

sudo adb tcpip 5555
# change this command with the ip of the phone, look at Settings > About device > Status > Ip Address
sudo adb connect 192.168.1.21:5555

remove your usb cable, and the phone will still be there in the Remote devices. I learned that from https://developer.oculus.com/documentation/vrweb/latest/concepts/carmel-remote-debugging/#carmel-remote-debugging-section-1

decoye commented 6 years ago

oh that sounds amazing?

seems hacky tho, how long will it stay there? until you close the phone?

vincentfretin commented 6 years ago

Until you stop debugging mode on the phone or reboot it I think, and until you reboot your machine of course.