-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Anchor fails to create in some cases #5391
Comments
Maybe there should be a check here to see if there are already 8 anchors? |
Is the 8 anchor max device-specific, or do all devices that support anchors have the same limit? |
Where do you need more than 8 anchors? Just having one anchor per room is enough, all the entities you add should be relative to the anchor. In aframe that should just be children of an entity where you added an anchor to it I guess. From Rik Cabanier (Meta) |
@vincentfretin the issue is not that a user intends to have 8 anchors, it is that through a variety of steps during the course of development and then subsequent usage a user is likely to reach this limit unintentionally without understanding how and not have a clear recourse to resolve given the cryptic error message. The deletion mechanism in line 76 https://github.com/aframevr/aframe/blob/v1.5.0/src/components/anchored.js#L76 assumes that a prior anchor of the same ID existed that it is deleting, it doesn't cover the case where other anchors have been created and not deleted in prior sessions. I'm simply suggesting that we implement slightly better error handling on the a-frame side such that when an a-frame developer adds |
Also consider that persistent anchors are per domain. If you deploy different pages on same domain you might get to the 8 anchors inadvertently. Even if the logic of each page correctly considers the 8 limit. |
Adding update, I keep running into this issue on a regular basis. I often encounter it after using the headset again after a few days off, which is odd since it would have already had a valid anchor from before but it is lost for some reason. Is there expiration for anchors? |
Description:
In some cases, attempting to create an anchor will fail which results in the desired anchor points not persisting across sessions despite setting
anchored="persistent: true"
on the entity.In the case where the anchor is not created, there is a console error:
Workaround:
In a vanilla three.js project we also encountered this error, and the answer from quest browser team was:
I did some digging and notice that there is already an attempt to delete an anchor if a new one is being created in its place
https://github.com/aframevr/aframe/blob/v1.5.0/src/components/anchored.js#L76
However in this case I think that while developing new scenes and testing different entities on which to attach anchors, a user can easily exceed the 8 anchor limit.
Here is the scenario that I think happened in my testing:
anchored
component on different parts of a scene includinga-scene
anda-entity
components. Some had anid
(as required in the docs) and some did not.Steps to reproduce (not verified yet, anyone up for it?):
id
in an existing or new a-frame scene, once per session (per browser load / close)Instead:
How to achieve this? A few options
XRSession.persistentAnchors
Environment
Note / research:
The text was updated successfully, but these errors were encountered: