Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location based example not working on Android #538

Closed
molleindustria opened this issue May 8, 2023 · 5 comments
Closed

Location based example not working on Android #538

molleindustria opened this issue May 8, 2023 · 5 comments

Comments

@molleindustria
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
The location based example on the repository main page doesn't work on Android, blank screen. The console errors are reported below.

If the current behavior is a bug, please provide the steps to reproduce.

Copy pasted the code, uploaded on my server and accessed it through chrome on android.

Console errors:
Cannot read properties of undefined (reading 'degToRad') at i._haversineDist (aframe-ar.js:1:1647120) at HTMLElement.<anonymous> (aframe-ar.js:1:1646650) at HTMLElement.<anonymous> (a-node.js:263:16) at i._sendGpsUpdateEvent (aframe-ar.js:1:1645044) at Object.gpsupdate (aframe-ar.js:1:1643347) at g._gpsReceived (aframe-ar.js:1:787585) at aframe-ar.js:1:785950 _haversineDist @ aframe-ar.js:1 (anonymous) @ aframe-ar.js:1 (anonymous) @ a-node.js:263 _sendGpsUpdateEvent @ aframe-ar.js:1 (anonymous) @ aframe-ar.js:1 _gpsReceived @ aframe-ar.js:1 (anonymous) @ aframe-ar.js:1 ar-threex-location-only.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'degToRad') at l.update (ar-threex-location-only.js:1:7033) at i.tick (aframe-ar.js:1:1647739) at HTMLElement.value (a-scene.js:709:34) at HTMLElement.value (a-scene.js:759:36) at bind.js:12:17 at f (three.js:24703:38) at e (three.js:15038:4) update @ ar-threex-location-only.js:1 tick @ aframe-ar.js:1 value @ a-scene.js:709 value @ a-scene.js:759 (anonymous) @ bind.js:12 f @ three.js:24703 e @ three.js:15038 requestAnimationFrame (async) e @ three.js:15040 requestAnimationFrame (async) e @ three.js:15040 requestAnimationFrame (async) e @ three.js:15040 requestAnimationFrame (async) start @ three.js:15051 Qt.setAnimationLoop @ three.js:24717 (anonymous) @ a-scene.js:672 (anonymous) @ a-node.js:263 (anonymous) @ a-node.js:128 Promise.then (async) value @ a-node.js:125 value @ a-entity.js:245 (anonymous) @ a-scene.js:680 setTimeout (async) value @ a-scene.js:679 value @ a-scene.js:155 (anonymous) @ a-scene.js:129 (anonymous) @ a-node.js:263 checkUserCamera @ camera.js:98 (anonymous) @ camera.js:58 (anonymous) @ a-node.js:263 value @ a-entity.js:156 init @ camera.js:28 initComponent @ component.js:320 updateProperties @ component.js:302 module.exports.Component @ component.js:78 i @ component.js:662 value @ a-entity.js:332 value @ a-entity.js:495 value @ a-entity.js:463 (anonymous) @ a-entity.js:249 (anonymous) @ a-node.js:127 Promise.then (async) value @ a-node.js:125 value @ a-entity.js:245 value @ a-entity.js:88 value @ a-register-element.js:160 value @ a-register-element.js:160 m @ document-register-element.js:2 l @ document-register-element.js:2 f @ document-register-element.js:2

@malejogs
Copy link

There is an error in the documentation for the versions:

Location-based AR.js

For the A-Frame version:

<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>

<script type='text/javascript' src='https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar-threex-location-only.js'></script>

<script type='text/javascript' src='https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js'></script>


the latest version of ARjs now needs aframe 1.3.0, I recommend you to place a specific version of the packages to avoid these errors, you can try with the ones below:

<script type="text/javascript" src="https://aframe.io/releases/1.3.0/aframe.min.js" ></script>

<script type="text/javascript" src="https://www.unpkg.com/@ar-js-org/ar.js@3.4.5/three.js/build/ar-threex-location-only.js" ></script>

<script type="text/javascript" src="https://www.unpkg.com/@ar-js-org/ar.js@3.4.5/aframe/build/aframe-ar.js"></script>

@crithes
Copy link

crithes commented May 16, 2023

But the positioning is not available

@nickw1
Copy link
Collaborator

nickw1 commented Jun 21, 2023

@malejogs thanks for that, will update the docs. Sorry for late reply, I have been very busy with work the last few weeks.

@nickw1
Copy link
Collaborator

nickw1 commented Jul 13, 2023

Have now updated the docs, sorry for the delay. They should now use A-Frame 1.3.0. Will close this now but feel free to reopen if you still have problems.

@nickw1 nickw1 closed this as completed Jul 13, 2023
@allestaire
Copy link

allestaire commented Mar 13, 2024

There is still no clear information to this, got tried the above suggestion but still not working

I see
This is the new docs

Nice got it work somehow, the text is showing now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants