Ar.js: Possible issues with AR.js using CDN links

Created on 17 Jul 2019  路  9Comments  路  Source: jeromeetienne/AR.js

Describe the bug
Basic examples that load AR.js and assets using CDN links do not seem to work, including the basic examples (locally and the codepen).

To Reproduce
Steps to reproduce the behavior:

  1. Go to the GitHub repository
  2. Navigate to the 'Get Started' section
  3. Click on 'See codepen'
  4. Try to use the 'hiro' marker to see the basic cube.

Expected behavior
The basic project works as expected, and a cube is displayed over the hiro marker.

Result
No cube is displayed, and the project does not work. Found errors on the console that seem to be related to the assets (see attached).
Tried with the examples that use the 'vendor' folder (AR.js included locally) and they do seem to work.

Screenshots
2019-07-18_01-37-46

Desktop (please complete the following information):

  • OS: Mac OS Mojave
  • Browser: Chrome (also reproduced on Safari and FF)
  • Version: Chrome v75

Additional Context
I am a bit new to AR.js, but I am a fairly experienced coder, and I spent enough time trying this out to suspect something is broken. Saw that 1.7.3 was released maybe less than an hour ago, so I am filing this just in case.

All 9 comments

@jpyepez Sorry for your troubles! i tested the Codepen with ar.js 1.7.3 and it works for me as expected, i can see the yellow cube while the Hiro pattern is detected.
Tested on Desktop:
Ubuntu 16.04
Browser: Chromium 75.0.3770.100 (64 bit)
That's pretty strange, Maybe try with another Browser and report here if you have other issues.

@kalwalt Thank you for your reply! You are totally right. The codepen does work on Safari and latest Firefox versions, but the example on Chrome is still broken.

However, when trying to run the code locally, I do get an issue that seems to be related to the hiro pattern. Not sure if this requires any additional definitions to properly work with aframe, but it seems like it can't find the pattern file, which causes the program to exit somehow. Here's a screenshot of the firefox console.

2019-07-18_09-08-56

Please let me know if it's user error, but hopefully it helps if it's an actual bug.
Thank you!!

@jpyepez maybe it is an issue with the Browser and the OS.

Not sure if this requires any additional definitions to properly work with aframe, but it seems like it can't find the pattern file, which causes the program to exit somehow. Here's a screenshot of the firefox console.

The Hiro pattern, as i remember, should be loaded automatically, don't know why it's not properly downloaded...

Yeah, I imagined that would be the case for the pattern. The Chrome console errors seem to be a bit more specific, adding a screenshot just in case:

2019-07-18_10-29-14

Hi, yes yesterday I released a new version. I saw something went wrong, but couldn't figure exactly what.
Readme Codepen is working for me with Chrome.

Anyway, I tried now to release a new version, 1.7.5. Try to run codepen now or your example and let me know

should work with this

<script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.7.5/aframe/build/aframe-ar.js"></script>

and also with this

<script src="https://raw.githack.com/jeromeetienne/AR.js/1.7.5/aframe/build/aframe-ar.js"></script>

cnd.rawgit should not be used tho. It will be deprecated by rawgit. Use raw.githack instead

That did it! Tried codepen and locally, and it worked in Safari and Firefox.

The interesting part is that I was wondering why Chrome was not working, and after taking a closer look and trying out incognito mode, AR.js worked as expected. It appears that ad blockers such as AdBlock and uBlock Origin interfere with certain assets loading correctly (for example camera_para.dat). This is probably a separate issue though, if you consider it would be helpful, I'd be glad to file it.

Thanks all!

@jpyepez great! Can you try both the import ways in my post above? If you have time it would help 馃槉

Oh sorry! Forgot to mention that part. I did test the links, and the example works with both (just double checked just in case). Seems like it's good to go. 馃檶

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MP619212 picture MP619212  路  59Comments

MirkoAlo picture MirkoAlo  路  37Comments

DJviolin picture DJviolin  路  33Comments

nicolocarpignoli picture nicolocarpignoli  路  27Comments

hipstermojo picture hipstermojo  路  42Comments