AR.js Location Based issues (on iOS 17.6 with Safari) with A-Frame (Mobile AR)

I’m working on my bachelor thesis which is related to AR and accessibility. In that response, I’m developing a mobile AR application that is supposed to run on iOS and Android browsers.

I’ve chosen AR.js location-based (https://ar-js-org.github.io/AR.js-Docs/location-based/) since it is supposed to work on both OS. The plan was to put pins into the camera image at special locations to improve navigation.

During my early stages of testing, I found out that the provided sample on the ar.js website worked perfectly fine on the stock Android browser of my colleague. On Safari I can’t get it to work.

Upon loading the page, the prompts for GPS, device orientation and camera are popping up and can be selected. But none of the placed elements are shown in the camera-view. HTTPS is used to load the page.

I’m using the following code (while using it within Angular but that shouldn’t affect anything). This mostly represents the example code from the ar.js website.

Note: this is using the suggested (old) version of A-Frame (1.3.0). When using the new one (1.6.0) I can’t get anything to work.

<html>
  <head>
    <title>AR.js A-Frame Location-based</title>

    <!-- old A-Frame (from example of ar.js)-->
    <script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>

    <!-- new A-Frame (directly from aframe.io). It isn't even starting the camera -->
    <!--  <script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script> -->

    <!-- these should be the most up-to-date versions (since it's the master branch) -->
    <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>
  </head>


  <body>
    <a-scene vr-mode-ui='enabled: false' arjs='sourceType: webcam; videoTexture: true; debugUIEnabled: false' renderer='antialias: true; alpha: true'>
      <a-camera gps-new-camera='gpsMinDistance: 5'></a-camera>

      <!-- Box which is to be displayed. Obviously the coordinates are not my real ones -->
      <a-entity material='color: red' geometry='primitive: box' gps-new-entity-place="latitude: 10; longitude: 20" 
      scale="10 10 10"></a-entity>

      <!-- Solution from another stackoverflow post. Didn't fix it for me (Coordinates aren't real) -->
      <a-box material="color: blue" gps-entity-place="latitude: 10; longitude: 20" position="0 350 0" scale="3.5 3.5 3.5" rotation="0 180 0"> </a-box>

    
    </a-scene>
  </body>
</html>

I also get an error when loading the page (see screenshot). I can’t find really useful information regarding dpdb.webvr.rocks since it causes “Failed to load the resource: No connection to server”. Maybe this has something to do with the whole thing not working?

(https://i.sstatic.net/O7t38218.png)

I tried a few things but honestly I’m currently disappointed and tired atm. Some things I tried included:

  • Switching versions
  • Testing on different iOS devices
  • Trying multiple browsers (Chrome and Firefox on iOS)
  • Trying other features of AR.js (which do work! for example marker based)
  • Did some research. Other people got it working in iOS 11 and up. But those videos don’t feature how they did it …
  • Followed Issues with AR.js Location-Based Example from Documentation. Did not help in my situation.

Keep in mind that the app did work on my colleagues Android device. I’m currently thinking that the GPS position is not correctly provided to the framework by the phone. But I might be wrong …

Maybe someone has similar problems, is more familiar with the framework or maybe I’m overseeing an obvious mistake.

Looking forward to all replies.

Regards Sven.

New contributor

Sven Luipold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật