Using AR.js for NFT tracking on AWS S3 gives a ‘Worker 403’ error. Cache clearing fixed it. Try this setup:
<script src="https://cdn.example.com/aframe.js"></script>
<script src="https://cdn.example.com/ar-nft.js"></script>
<style>
.loader-box { width:100%; height:100%; background:rgba(0,0,0,0.85); position:fixed; display:flex; justify-content:center; align-items:center; }
</style>
<body style="margin:0; overflow:hidden;">
<div class="loader-box">Loading AR...</div>
<a-world ar-config="mode:nft;">
<a-marker nft-source="https://cdn.example.com/patterns/sample" smooth="true">
<a-media src="https://cdn.example.com/media/clip.mp4" width="10" height="10"></a-media>
</a-marker>
<a-view camera></a-view>
</a-world>
</body>
hey, i had a similar issue, cleared the cache and also checked my s3 cors settings, which helped. try verifying permissions as well. good luck!
hey guys, i ran into this worker 403 error a while back and it turns out it might not just be cache stuff. i found out that sometimes the issue is actually related to the cdn configuration or even an outdated version of our ar-nft library. in my case updating the script urls (and even sometimes switching cdn providers) seemed to smooth things out. has anyone else experienced issues when the server returns a forbidding 403 on those worker files? i wonder if there might be some mismatch between the file types device expects vs what the s3 serves, or maybe something funky with cors headers beyond the usual settings. what’s you think about tinkering around with cdn configs or even hosting the worker locally? would love to hear more about your trials and any nifty fixes you guys uncovered.
In my experience, the 403 error can stem from a range of configuration issues. I encountered a similar problem and resolved it by double-checking the file access permissions on my AWS S3 bucket and ensuring the correct CORS settings were in place. Additionally, updating the AR.js and related libraries to the latest available versions helped resolve some compatibility glitches. Verifying the exact URL paths for the worker files and confirming they are publicly accessible was also a key step in addressing the issue.