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

IDAlreadyInUseError when creating document and subscribing to onChildCreated event #360

Closed
Frost-bit opened this issue Feb 14, 2019 · 0 comments · Fixed by #424
Closed

Comments

@Frost-bit
Copy link

In the same file I create a new document inside a container called notes:

createNote(title, content, topics) {
	let newNote = {
	    title: title,
	    content: content,
	    hasMemberRelation: "topics",
	    isMemberOfRelation: "notes"
        };
        return this.notes.$create(newNote)
	    .then(() => {
		//add members to the new document
		//...
	    })

...and subscribe to the event of the creation of new notes with:

subscribe() {
	this.notes.$onChildCreated(sendEmail);
    }

I am getting the error IDAlreadyInUseError at Object._addPointer (carbonldp/Registry/Registry.js:110:23), even if without the subscription, the code for creating the document works perfectly.

cecir205 added a commit that referenced this issue Dec 3, 2020
Fix #360 $IDAlreadyInUseError error when executing onChildCreated using real-time capabilities and when requesting a $get of a non-existent resource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants